asciidoctor 1.5.6.2 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of asciidoctor might be problematic. Click here for more details.

Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +330 -143
  3. data/README-fr.adoc +441 -0
  4. data/README-jp.adoc +418 -0
  5. data/README-zh_CN.adoc +430 -0
  6. data/README.adoc +454 -0
  7. data/Rakefile +57 -0
  8. data/asciidoctor.gemspec +7 -1
  9. data/data/locale/attributes-ar.adoc +22 -0
  10. data/data/locale/attributes-bg.adoc +22 -0
  11. data/data/locale/attributes-ca.adoc +22 -0
  12. data/data/locale/attributes-cs.adoc +22 -0
  13. data/data/locale/attributes-da.adoc +22 -0
  14. data/data/locale/attributes-de.adoc +22 -0
  15. data/data/locale/attributes-en.adoc +23 -0
  16. data/data/locale/attributes-es.adoc +22 -0
  17. data/data/locale/attributes-fa.adoc +22 -0
  18. data/data/locale/attributes-fi.adoc +22 -0
  19. data/data/locale/attributes-fr.adoc +22 -0
  20. data/data/locale/attributes-hu.adoc +22 -0
  21. data/data/locale/attributes-id.adoc +22 -0
  22. data/data/locale/attributes-it.adoc +22 -0
  23. data/data/locale/attributes-ja.adoc +22 -0
  24. data/data/locale/attributes-kr.adoc +22 -0
  25. data/data/locale/attributes-nb.adoc +22 -0
  26. data/data/locale/attributes-nl.adoc +22 -0
  27. data/data/locale/attributes-nn.adoc +22 -0
  28. data/data/locale/attributes-pl.adoc +22 -0
  29. data/data/locale/attributes-pt.adoc +22 -0
  30. data/data/locale/attributes-pt_BR.adoc +22 -0
  31. data/data/locale/attributes-ro.adoc +22 -0
  32. data/data/locale/attributes-ru.adoc +22 -0
  33. data/data/locale/attributes-sr.adoc +22 -0
  34. data/data/locale/attributes-sr_Latn.adoc +22 -0
  35. data/data/locale/attributes-tr.adoc +22 -0
  36. data/data/locale/attributes-uk.adoc +22 -0
  37. data/data/locale/attributes-zh_CN.adoc +22 -0
  38. data/data/locale/attributes-zh_TW.adoc +22 -0
  39. data/data/locale/attributes.adoc +8 -649
  40. data/data/stylesheets/asciidoctor-default.css +77 -72
  41. data/features/xref.feature +366 -7
  42. data/lib/asciidoctor.rb +107 -93
  43. data/lib/asciidoctor/abstract_block.rb +247 -239
  44. data/lib/asciidoctor/abstract_node.rb +56 -58
  45. data/lib/asciidoctor/block.rb +3 -3
  46. data/lib/asciidoctor/callouts.rb +1 -1
  47. data/lib/asciidoctor/cli/invoker.rb +36 -9
  48. data/lib/asciidoctor/cli/options.rb +63 -25
  49. data/lib/asciidoctor/converter.rb +23 -13
  50. data/lib/asciidoctor/converter/base.rb +4 -0
  51. data/lib/asciidoctor/converter/docbook45.rb +16 -9
  52. data/lib/asciidoctor/converter/docbook5.rb +115 -97
  53. data/lib/asciidoctor/converter/factory.rb +29 -31
  54. data/lib/asciidoctor/converter/html5.rb +229 -192
  55. data/lib/asciidoctor/converter/manpage.rb +72 -50
  56. data/lib/asciidoctor/converter/template.rb +12 -12
  57. data/lib/asciidoctor/core_ext.rb +5 -1
  58. data/lib/asciidoctor/core_ext/1.8.7/base64/strict_encode64.rb +6 -0
  59. data/lib/asciidoctor/document.rb +168 -77
  60. data/lib/asciidoctor/extensions.rb +79 -47
  61. data/lib/asciidoctor/helpers.rb +33 -11
  62. data/lib/asciidoctor/inline.rb +3 -2
  63. data/lib/asciidoctor/list.rb +2 -1
  64. data/lib/asciidoctor/logging.rb +122 -0
  65. data/lib/asciidoctor/parser.rb +406 -382
  66. data/lib/asciidoctor/path_resolver.rb +169 -162
  67. data/lib/asciidoctor/reader.rb +166 -121
  68. data/lib/asciidoctor/section.rb +45 -28
  69. data/lib/asciidoctor/stylesheets.rb +13 -5
  70. data/lib/asciidoctor/substitutors.rb +328 -254
  71. data/lib/asciidoctor/table.rb +105 -48
  72. data/lib/asciidoctor/timings.rb +34 -6
  73. data/lib/asciidoctor/version.rb +1 -1
  74. data/man/asciidoctor.1 +41 -23
  75. data/man/asciidoctor.adoc +14 -8
  76. data/test/api_test.rb +1004 -0
  77. data/test/attributes_test.rb +241 -50
  78. data/test/blocks_test.rb +549 -124
  79. data/test/converter_test.rb +170 -78
  80. data/test/document_test.rb +208 -767
  81. data/test/extensions_test.rb +188 -53
  82. data/test/fixtures/custom-backends/slim/html5/block_paragraph.html.slim +1 -1
  83. data/test/fixtures/custom-backends/slim/html5/block_sidebar.html.slim +1 -1
  84. data/test/fixtures/file-with-missing-include.adoc +1 -0
  85. data/test/fixtures/include-file.jsx +8 -0
  86. data/test/fixtures/lists.adoc +96 -0
  87. data/test/fixtures/other-chapters.adoc +11 -0
  88. data/test/fixtures/outer-include.adoc +5 -0
  89. data/test/fixtures/sample.asciidoc +5 -1
  90. data/test/fixtures/subdir/index.adoc +3 -0
  91. data/test/fixtures/subdir/inner-include.adoc +3 -0
  92. data/test/fixtures/subdir/middle-include.adoc +5 -0
  93. data/test/fixtures/tagged-class-enclosed.rb +0 -1
  94. data/test/fixtures/unclosed-tag.adoc +3 -0
  95. data/test/fixtures/unexpected-end-tag.adoc +4 -0
  96. data/test/invoker_test.rb +101 -40
  97. data/test/links_test.rb +266 -72
  98. data/test/lists_test.rb +243 -45
  99. data/test/logger_test.rb +211 -0
  100. data/test/manpage_test.rb +124 -6
  101. data/test/options_test.rb +46 -1
  102. data/test/paragraphs_test.rb +23 -10
  103. data/test/parser_test.rb +30 -1
  104. data/test/paths_test.rb +115 -33
  105. data/test/preamble_test.rb +1 -1
  106. data/test/reader_test.rb +337 -81
  107. data/test/sections_test.rb +656 -72
  108. data/test/substitutions_test.rb +182 -57
  109. data/test/tables_test.rb +324 -57
  110. data/test/test_helper.rb +77 -32
  111. data/test/text_test.rb +7 -7
  112. metadata +67 -3
@@ -1,10 +1,9 @@
1
1
  /* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
2
- /* Remove comment around @import statement below when using as a custom stylesheet */
2
+ /* Uncomment @import statement below to use as custom stylesheet */
3
3
  /*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
4
4
  article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
5
5
  audio,canvas,video{display:inline-block}
6
6
  audio:not([controls]){display:none;height:0}
7
- [hidden],template{display:none}
8
7
  script{display:none!important}
9
8
  html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
10
9
  a{background:transparent}
@@ -34,12 +33,10 @@ button,select{text-transform:none}
34
33
  button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
35
34
  button[disabled],html input[disabled]{cursor:default}
36
35
  input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
37
- input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
38
- input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
39
36
  button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
40
37
  textarea{overflow:auto;vertical-align:top}
41
38
  table{border-collapse:collapse;border-spacing:0}
42
- *,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
39
+ *,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
43
40
  html,body{font-size:100%}
44
41
  body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
45
42
  a:hover{cursor:pointer}
@@ -57,8 +54,7 @@ img,object,svg{display:inline-block;vertical-align:middle}
57
54
  textarea{height:auto;min-height:50px}
58
55
  select{width:100%}
59
56
  .center{margin-left:auto;margin-right:auto}
60
- .spread{width:100%}
61
- p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
57
+ .stretch{width:100%}
62
58
  .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
63
59
  div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
64
60
  a{color:#2156a5;text-decoration:underline;line-height:inherit}
@@ -92,24 +88,24 @@ abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-
92
88
  abbr{text-transform:none}
93
89
  blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
94
90
  blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
95
- blockquote cite:before{content:"\2014 \0020"}
91
+ blockquote cite::before{content:"\2014 \0020"}
96
92
  blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
97
93
  blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
98
- @media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
94
+ @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
99
95
  h1{font-size:2.75em}
100
96
  h2{font-size:2.3125em}
101
97
  h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
102
98
  h4{font-size:1.4375em}}
103
99
  table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
104
- table thead,table tfoot{background:#f7f8f7;font-weight:bold}
100
+ table thead,table tfoot{background:#f7f8f7}
105
101
  table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
106
102
  table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
107
103
  table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7}
108
104
  table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
109
105
  h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
110
106
  h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
111
- .clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
112
- .clearfix:after,.float-group:after{clear:both}
107
+ .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
108
+ .clearfix::after,.float-group::after{clear:both}
113
109
  *:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
114
110
  *:not(pre)>code.nobreak{word-wrap:normal}
115
111
  *:not(pre)>code.nowrap{white-space:nowrap}
@@ -125,15 +121,15 @@ kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-bl
125
121
  .menuseq{word-spacing:-.02em}
126
122
  .menuseq b.caret{font-size:1.25em;line-height:.8}
127
123
  .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
128
- b.button:before,b.button:after{position:relative;top:-1px;font-weight:400}
129
- b.button:before{content:"[";padding:0 3px 0 2px}
130
- b.button:after{content:"]";padding:0 2px 0 3px}
124
+ b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
125
+ b.button::before{content:"[";padding:0 3px 0 2px}
126
+ b.button::after{content:"]";padding:0 2px 0 3px}
131
127
  p a>code:hover{color:rgba(0,0,0,.9)}
132
128
  #header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
133
- #header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}
134
- #header:after,#content:after,#footnotes:after,#footer:after{clear:both}
129
+ #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
130
+ #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
135
131
  #content{margin-top:1.25em}
136
- #content:before{content:none}
132
+ #content::before{content:none}
137
133
  #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
138
134
  #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8}
139
135
  #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px}
@@ -141,11 +137,11 @@ p a>code:hover{color:rgba(0,0,0,.9)}
141
137
  #header .details span:first-child{margin-left:-.125em}
142
138
  #header .details span.email a{color:rgba(0,0,0,.85)}
143
139
  #header .details br{display:none}
144
- #header .details br+span:before{content:"\00a0\2013\00a0"}
145
- #header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
146
- #header .details br+span#revremark:before{content:"\00a0|\00a0"}
140
+ #header .details br+span::before{content:"\00a0\2013\00a0"}
141
+ #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
142
+ #header .details br+span#revremark::before{content:"\00a0|\00a0"}
147
143
  #header #revnumber{text-transform:capitalize}
148
- #header #revnumber:after{content:"\00a0"}
144
+ #header #revnumber::after{content:"\00a0"}
149
145
  #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
150
146
  #toc{border-bottom:1px solid #efefed;padding-bottom:.5em}
151
147
  #toc>ul{margin-left:.125em}
@@ -156,7 +152,7 @@ p a>code:hover{color:rgba(0,0,0,.9)}
156
152
  #toc a{text-decoration:none}
157
153
  #toc a:active{text-decoration:underline}
158
154
  #toctitle{color:#7a2518;font-size:1.2em}
159
- @media only screen and (min-width:768px){#toctitle{font-size:1.375em}
155
+ @media screen and (min-width:768px){#toctitle{font-size:1.375em}
160
156
  body.toc2{padding-left:15em;padding-right:0}
161
157
  #toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
162
158
  #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
@@ -165,7 +161,7 @@ body.toc2{padding-left:15em;padding-right:0}
165
161
  #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
166
162
  body.toc2.toc-right{padding-left:0;padding-right:15em}
167
163
  body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}
168
- @media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
164
+ @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
169
165
  #toc.toc2{width:20em}
170
166
  #toc.toc2 #toctitle{font-size:1.375em}
171
167
  #toc.toc2>ul{font-size:.95em}
@@ -176,22 +172,25 @@ body.toc2.toc-right{padding-left:0;padding-right:20em}}
176
172
  #content #toc>:last-child{margin-bottom:0}
177
173
  #footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
178
174
  #footer-text{color:rgba(255,255,255,.8);line-height:1.44}
175
+ #content{margin-bottom:.625em}
179
176
  .sect1{padding-bottom:.625em}
180
- @media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
177
+ @media screen and (min-width:768px){#content{margin-bottom:1.25em}
178
+ .sect1{padding-bottom:1.25em}}
179
+ .sect1:last-child{padding-bottom:0}
181
180
  .sect1+.sect1{border-top:1px solid #efefed}
182
181
  #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
183
- #content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
182
+ #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
184
183
  #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
185
184
  #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
186
185
  #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
187
186
  .audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
188
187
  .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
189
- table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0}
190
- .paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)}
188
+ table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
189
+ .paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
191
190
  table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit}
192
191
  .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
193
192
  .admonitionblock>table td.icon{text-align:center;width:80px}
194
- .admonitionblock>table td.icon img{max-width:initial}
193
+ .admonitionblock>table td.icon img{max-width:none}
195
194
  .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
196
195
  .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)}
197
196
  .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
@@ -207,17 +206,17 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
207
206
  .sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
208
207
  .literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
209
208
  .literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
210
- @media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
211
- @media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
209
+ @media screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
210
+ @media screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
212
211
  .literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
213
212
  .listingblock pre.highlightjs{padding:0}
214
213
  .listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
215
214
  .listingblock pre.prettyprint{border-width:0}
216
215
  .listingblock>.content{position:relative}
217
- .listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
218
- .listingblock:hover code[data-lang]:before{display:block}
219
- .listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
220
- .listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
216
+ .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
217
+ .listingblock:hover code[data-lang]::before{display:block}
218
+ .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:#999}
219
+ .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
221
220
  table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
222
221
  table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
223
222
  table.pyhltable td.code{padding-left:.75em;padding-right:0}
@@ -228,35 +227,39 @@ table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
228
227
  .quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em}
229
228
  .quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
230
229
  .quoteblock blockquote{margin:0;padding:0;border:0}
231
- .quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
230
+ .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
232
231
  .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
233
232
  .quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right}
234
233
  .quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)}
235
234
  .quoteblock .quoteblock blockquote{padding:0 0 0 .75em}
236
- .quoteblock .quoteblock blockquote:before{display:none}
237
- .verseblock{margin:0 1em 1.25em 1em}
235
+ .quoteblock .quoteblock blockquote::before{display:none}
236
+ .verseblock{margin:0 1em 1.25em}
238
237
  .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
239
238
  .verseblock pre strong{font-weight:400}
240
239
  .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
241
240
  .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
242
241
  .quoteblock .attribution br,.verseblock .attribution br{display:none}
243
242
  .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
244
- .quoteblock.abstract{margin:0 0 1.25em 0;display:block}
245
- .quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
246
- .quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
243
+ .quoteblock.abstract{margin:0 1em 1.25em;display:block}
244
+ .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
245
+ .quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{word-spacing:0;line-height:1.6}
246
+ .quoteblock.abstract blockquote::before,.quoteblock.abstract p::before{display:none}
247
247
  table.tableblock{max-width:100%;border-collapse:separate}
248
- table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
248
+ p.tableblock:last-child{margin-bottom:0}
249
+ td.tableblock>.content{margin-bottom:-1.25em}
249
250
  table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
250
251
  table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
251
252
  table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
252
253
  table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
253
- table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px 0}
254
- table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0 0}
254
+ table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
255
+ table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
255
256
  table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
256
257
  table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
257
258
  table.frame-all{border-width:1px}
258
259
  table.frame-sides{border-width:0 1px}
259
- table.frame-topbot{border-width:1px 0}
260
+ table.frame-topbot,table.frame-ends{border-width:1px 0}
261
+ table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd){background:#f8f8f7}
262
+ table.stripes-none tr,table.stripes-odd tr:nth-of-type(even){background:none}
260
263
  th.halign-left,td.halign-left{text-align:left}
261
264
  th.halign-right,td.halign-right{text-align:right}
262
265
  th.halign-center,td.halign-center{text-align:center}
@@ -280,9 +283,8 @@ ul.unstyled,ol.unstyled{margin-left:0}
280
283
  ul.checklist{margin-left:.625em}
281
284
  ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
282
285
  ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
283
- ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}
284
- ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block}
285
- ul.inline>li>*{display:block}
286
+ ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
287
+ ul.inline>li{margin-left:1.25em}
286
288
  .unstyled dl dt{font-weight:400;font-style:normal}
287
289
  ol.arabic{list-style-type:decimal}
288
290
  ol.decimal{list-style-type:decimal-leading-zero}
@@ -296,9 +298,9 @@ ol.lowergreek{list-style-type:lower-greek}
296
298
  td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
297
299
  td.hdlist1{font-weight:bold;padding-bottom:1.25em}
298
300
  .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
299
- .colist>table tr>td:first-of-type{padding:.4em .75em 0 .75em;line-height:1;vertical-align:top}
300
- .colist>table tr>td:first-of-type img{max-width:initial}
301
- .colist>table tr>td:last-of-type{padding:.25em 0}
301
+ .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
302
+ .colist td:not([class]):first-child img{max-width:none}
303
+ .colist td:not([class]):last-child{padding:.25em 0}
302
304
  .thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
303
305
  .imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0}
304
306
  .imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em}
@@ -314,9 +316,9 @@ sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:sup
314
316
  sup.footnote a,sup.footnoteref a{text-decoration:none}
315
317
  sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
316
318
  #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
317
- #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
318
- #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em}
319
- #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
319
+ #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
320
+ #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
321
+ #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
320
322
  #footnotes .footnote:last-of-type{margin-bottom:0}
321
323
  #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
322
324
  .gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
@@ -362,15 +364,15 @@ div.unbreakable{page-break-inside:avoid}
362
364
  span.icon>.fa{cursor:default}
363
365
  a span.icon>.fa{cursor:inherit}
364
366
  .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
365
- .admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
366
- .admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
367
- .admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
368
- .admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
369
- .admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
367
+ .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
368
+ .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
369
+ .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
370
+ .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
371
+ .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
370
372
  .conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
371
373
  .conum[data-value] *{color:#fff!important}
372
374
  .conum[data-value]+b{display:none}
373
- .conum[data-value]:after{content:attr(data-value)}
375
+ .conum[data-value]::after{content:attr(data-value)}
374
376
  pre .conum[data-value]{position:relative;top:-.125em}
375
377
  b.conum *{color:inherit!important}
376
378
  .conum:not([data-value]):empty{display:none}
@@ -382,12 +384,13 @@ p{margin-bottom:1.25rem}
382
384
  .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
383
385
  .exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
384
386
  .print-only{display:none!important}
385
- @media print{@page{margin:1.25cm .75cm}
386
- *{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
387
+ @page{margin:1.25cm .75cm}
388
+ @media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
389
+ html{font-size:80%}
387
390
  a{color:inherit!important;text-decoration:underline!important}
388
391
  a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
389
- a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
390
- abbr[title]:after{content:" (" attr(title) ")"}
392
+ a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
393
+ abbr[title]::after{content:" (" attr(title) ")"}
391
394
  pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
392
395
  thead{display:table-header-group}
393
396
  svg{max-width:100%}
@@ -395,21 +398,23 @@ p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
395
398
  h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
396
399
  #toc,.sidebarblock,.exampleblock>.content{background:none!important}
397
400
  #toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important}
398
- .sect1{padding-bottom:0!important}
399
- .sect1+.sect1{border:0!important}
400
- #header>h1:first-child{margin-top:1.25rem}
401
401
  body.book #header{text-align:center}
402
- body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0}
402
+ body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
403
403
  body.book #header .details{border:0!important;display:block;padding:0!important}
404
404
  body.book #header .details span:first-child{margin-left:0!important}
405
405
  body.book #header .details br{display:block}
406
- body.book #header .details br+span:before{content:none!important}
406
+ body.book #header .details br+span::before{content:none!important}
407
407
  body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
408
408
  body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
409
- .listingblock code[data-lang]:before{display:block}
410
- #footer{background:none!important;padding:0 .9375em}
411
- #footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em}
409
+ .listingblock code[data-lang]::before{display:block}
410
+ #footer{padding:0 .9375em}
412
411
  .hide-on-print{display:none!important}
413
412
  .print-only{display:block!important}
414
413
  .hide-for-print{display:none!important}
415
414
  .show-for-print{display:inherit!important}}
415
+ @media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
416
+ .sect1{padding:0!important}
417
+ .sect1+.sect1{border:0}
418
+ #footer{background:none}
419
+ #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
420
+ @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
@@ -263,6 +263,147 @@ Feature: Cross References
263
263
  |to find a complete list of features.
264
264
  """
265
265
 
266
+ Scenario: Create a full cross reference to a numbered part
267
+ Given the AsciiDoc source
268
+ """
269
+ :doctype: book
270
+ :sectnums:
271
+ :partnums:
272
+ :xrefstyle: full
273
+
274
+ [preface]
275
+ = Preface
276
+
277
+ See <<p1>> for an introduction to the language.
278
+
279
+ [#p1]
280
+ = Language
281
+
282
+ == Syntax
283
+
284
+ This chapter covers the syntax.
285
+ """
286
+ When it is converted to html
287
+ Then the result should contain the HTML structure
288
+ """
289
+ |See
290
+ a<> href='#p1' Part I, &#8220;Language&#8221;
291
+ |for an introduction to the language.
292
+ """
293
+
294
+ Scenario: Create a short cross reference to a numbered part
295
+ Given the AsciiDoc source
296
+ """
297
+ :doctype: book
298
+ :sectnums:
299
+ :partnums:
300
+ :xrefstyle: short
301
+
302
+ [preface]
303
+ = Preface
304
+
305
+ See <<p1>> for an introduction to the language.
306
+
307
+ [#p1]
308
+ = Language
309
+
310
+ == Syntax
311
+
312
+ This chapter covers the syntax.
313
+ """
314
+ When it is converted to html
315
+ Then the result should contain the HTML structure
316
+ """
317
+ |See
318
+ a<> href='#p1' Part I
319
+ |for an introduction to the language.
320
+ """
321
+
322
+ Scenario: Create a basic cross reference to a numbered part
323
+ Given the AsciiDoc source
324
+ """
325
+ :doctype: book
326
+ :sectnums:
327
+ :partnums:
328
+ :xrefstyle: basic
329
+
330
+ [preface]
331
+ = Preface
332
+
333
+ See <<p1>> for an introduction to the language.
334
+
335
+ [#p1]
336
+ = Language
337
+
338
+ == Syntax
339
+
340
+ This chapter covers the syntax.
341
+ """
342
+ When it is converted to html
343
+ Then the result should contain the HTML structure
344
+ """
345
+ |See
346
+ a<> href='#p1' Language
347
+ |for an introduction to the language.
348
+ """
349
+
350
+ Scenario: Create a basic cross reference to an unnumbered part
351
+ Given the AsciiDoc source
352
+ """
353
+ :doctype: book
354
+ :sectnums:
355
+ :xrefstyle: full
356
+
357
+ [preface]
358
+ = Preface
359
+
360
+ See <<p1>> for an introduction to the language.
361
+
362
+ [#p1]
363
+ = Language
364
+
365
+ == Syntax
366
+
367
+ This chapter covers the syntax.
368
+ """
369
+ When it is converted to html
370
+ Then the result should contain the HTML structure
371
+ """
372
+ |See
373
+ a<> href='#p1' Language
374
+ |for an introduction to the language.
375
+ """
376
+
377
+ @wip
378
+ Scenario: Create a cross reference to a part using a custom part reference signifier
379
+ Given the AsciiDoc source
380
+ """
381
+ :doctype: book
382
+ :sectnums:
383
+ :partnums:
384
+ :xrefstyle: full
385
+ :part-refsig: P
386
+
387
+ [preface]
388
+ = Preface
389
+
390
+ See <<p1>> for an introduction to the language.
391
+
392
+ [#p1]
393
+ = Language
394
+
395
+ == Syntax
396
+
397
+ This chapter covers the syntax.
398
+ """
399
+ When it is converted to html
400
+ Then the result should contain the HTML structure
401
+ """
402
+ |See
403
+ a<> href='#p1' P I, &#8220;Language&#8221;
404
+ |for an introduction to the language.
405
+ """
406
+
266
407
  Scenario: Create a full cross reference to a numbered appendix
267
408
  Given the AsciiDoc source
268
409
  """
@@ -577,13 +718,13 @@ Feature: Cross References
577
718
  When it is converted to html
578
719
  Then the result should match the HTML structure
579
720
  """
580
- table.tableblock.frame-all.grid-all.spread
721
+ table.tableblock.frame-all.grid-all.stretch
581
722
  colgroup
582
723
  col style='width: 100%;'
583
724
  tbody
584
725
  tr
585
726
  td.tableblock.halign-left.valign-top
586
- div
727
+ div.content
587
728
  .paragraph: p
588
729
  |See
589
730
  a< href='#_install' Install
@@ -593,7 +734,7 @@ Feature: Cross References
593
734
  .paragraph: p Instructions go here.
594
735
  """
595
736
 
596
- Scenario: Create a cross reference using the target section title
737
+ Scenario: Create a cross reference using the title of the target section
597
738
  Given the AsciiDoc source
598
739
  """
599
740
  == Section One
@@ -617,7 +758,7 @@ Feature: Cross References
617
758
  a< href='#_section_one' Section One
618
759
  """
619
760
 
620
- Scenario: Create a natural cross reference using the reftext of the target section
761
+ Scenario: Create a cross reference using the reftext of the target section
621
762
  Given the AsciiDoc source
622
763
  """
623
764
  [reftext="the first section"]
@@ -654,7 +795,7 @@ Feature: Cross References
654
795
  xref< linkend='_section_one'/
655
796
  """
656
797
 
657
- Scenario: Create a cross reference using the formatted target title
798
+ Scenario: Create a cross reference using the formatted title of the target section
658
799
  Given the AsciiDoc source
659
800
  """
660
801
  == Section *One*
@@ -669,12 +810,230 @@ Feature: Cross References
669
810
  Then the result should match the HTML structure
670
811
  """
671
812
  .sect1
672
- h2#_section_strong_one_strong
813
+ h2#_section_one
673
814
  |Section <strong>One</strong>
674
815
  .sectionbody: .paragraph: p content
675
816
  .sect1
676
817
  h2#_section_two Section Two
677
818
  .sectionbody: .paragraph: p
678
819
  |refer to
679
- a< href='#_section_strong_one_strong' Section <strong>One</strong>
820
+ a< href='#_section_one' Section <strong>One</strong>
821
+ """
822
+
823
+ Scenario: Does not process a natural cross reference in compat mode
824
+ Given the AsciiDoc source
825
+ """
826
+ :compat-mode:
827
+
828
+ == Section One
829
+
830
+ content
831
+
832
+ == Section Two
833
+
834
+ refer to <<Section One>>
835
+ """
836
+ When it is converted to html
837
+ Then the result should match the HTML structure
838
+ """
839
+ .sect1
840
+ h2#_section_one
841
+ |Section One
842
+ .sectionbody: .paragraph: p content
843
+ .sect1
844
+ h2#_section_two Section Two
845
+ .sectionbody: .paragraph: p
846
+ |refer to
847
+ a< href='#Section One' [Section One]
848
+ """
849
+
850
+ Scenario: Parses text of xref macro as attributes if attribute signature found
851
+ Given the AsciiDoc source
852
+ """
853
+ == Section One
854
+
855
+ content
856
+
857
+ == Section Two
858
+
859
+ refer to xref:_section_one[role=next]
860
+ """
861
+ When it is converted to html
862
+ Then the result should match the HTML structure
863
+ """
864
+ .sect1
865
+ h2#_section_one
866
+ |Section One
867
+ .sectionbody: .paragraph: p content
868
+ .sect1
869
+ h2#_section_two Section Two
870
+ .sectionbody: .paragraph: p
871
+ |refer to
872
+ a< href='#_section_one' class='next' Section One
873
+ """
874
+
875
+ Scenario: Does not parse text of xref macro as attribute if attribute signature not found
876
+ Given the AsciiDoc source
877
+ """
878
+ == Section One
879
+
880
+ content
881
+
882
+ == Section Two
883
+
884
+ refer to xref:_section_one[One, Section One]
885
+ """
886
+ When it is converted to html
887
+ Then the result should match the HTML structure
888
+ """
889
+ .sect1
890
+ h2#_section_one
891
+ |Section One
892
+ .sectionbody: .paragraph: p content
893
+ .sect1
894
+ h2#_section_two Section Two
895
+ .sectionbody: .paragraph: p
896
+ |refer to
897
+ a< href='#_section_one' One, Section One
898
+ """
899
+
900
+ Scenario: Uses whole text of xref macro as link text if attribute signature found and text is enclosed in double quotes
901
+ Given the AsciiDoc source
902
+ """
903
+ == Section One
904
+
905
+ content
906
+
907
+ == Section Two
908
+
909
+ refer to xref:_section_one["Section One == Starting Point"]
910
+ """
911
+ When it is converted to html
912
+ Then the result should match the HTML structure
913
+ """
914
+ .sect1
915
+ h2#_section_one
916
+ |Section One
917
+ .sectionbody: .paragraph: p content
918
+ .sect1
919
+ h2#_section_two Section Two
920
+ .sectionbody: .paragraph: p
921
+ |refer to
922
+ a< href='#_section_one'
923
+ |Section One == Starting Point
924
+ """
925
+
926
+ Scenario: Does not parse text of xref macro as text if enclosed in double quotes but attribute signature not found
927
+ Given the AsciiDoc source
928
+ """
929
+ == Section One
930
+
931
+ content
932
+
933
+ == Section Two
934
+
935
+ refer to xref:_section_one["The Premier Section"]
936
+ """
937
+ When it is converted to html
938
+ Then the result should match the HTML structure
939
+ """
940
+ .sect1
941
+ h2#_section_one
942
+ |Section One
943
+ .sectionbody: .paragraph: p content
944
+ .sect1
945
+ h2#_section_two Section Two
946
+ .sectionbody: .paragraph: p
947
+ |refer to
948
+ a< href='#_section_one' "The Premier Section"
949
+ """
950
+
951
+ Scenario: Can escape double quotes in text of xref macro using backslashes when text is parsed as attributes
952
+ Given the AsciiDoc source
953
+ """
954
+ == Section One
955
+
956
+ content
957
+
958
+ == Section Two
959
+
960
+ refer to xref:_section_one["\"The Premier Section\"",role=spotlight]
961
+ """
962
+ When it is converted to html
963
+ Then the result should match the HTML structure
964
+ """
965
+ .sect1
966
+ h2#_section_one
967
+ |Section One
968
+ .sectionbody: .paragraph: p content
969
+ .sect1
970
+ h2#_section_two Section Two
971
+ .sectionbody: .paragraph: p
972
+ |refer to
973
+ a< href='#_section_one' class='spotlight' "The Premier Section"
974
+ """
975
+
976
+ Scenario: Override xrefstyle for a given part of the document
977
+ Given the AsciiDoc source
978
+ """
979
+ :xrefstyle: full
980
+ :doctype: book
981
+ :sectnums:
982
+
983
+ == Foo
984
+
985
+ refer to <<#_bar>>
986
+
987
+ == Bar
988
+ :xrefstyle: short
989
+
990
+ refer to xref:#_foo[xrefstyle=short]
991
+ """
992
+ When it is converted to html
993
+ Then the result should match the HTML structure
994
+ """
995
+ .sect1
996
+ h2#_foo 1. Foo
997
+ .sectionbody: .paragraph: p
998
+ |refer to
999
+ a< href='#_bar' Chapter 2, <em>Bar</em>
1000
+ .sect1
1001
+ h2#_bar 2. Bar
1002
+ .sectionbody: .paragraph: p
1003
+ |refer to
1004
+ a< href='#_foo' Chapter 1
1005
+ """
1006
+
1007
+ Scenario: Override xrefstyle for a specific reference by assigning the xrefstyle attribute on the xref macro
1008
+ Given the AsciiDoc source
1009
+ """
1010
+ :xrefstyle: full
1011
+ :doctype: book
1012
+ :sectnums:
1013
+
1014
+ == Foo
1015
+
1016
+ content
1017
+
1018
+ == Bar
1019
+
1020
+ refer to <<#_foo>>
1021
+
1022
+ refer to xref:#_foo[xrefstyle=short]
1023
+ """
1024
+ When it is converted to html
1025
+ Then the result should match the HTML structure
1026
+ """
1027
+ .sect1
1028
+ h2#_foo 1. Foo
1029
+ .sectionbody: .paragraph: p content
1030
+ .sect1
1031
+ h2#_bar 2. Bar
1032
+ .sectionbody
1033
+ .paragraph: p
1034
+ |refer to
1035
+ a< href='#_foo' Chapter 1, <em>Foo</em>
1036
+ .paragraph: p
1037
+ |refer to
1038
+ a< href='#_foo' Chapter 1
680
1039
  """