asciidoctor 1.5.8 → 2.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +11 -0
  3. data/CHANGELOG.adoc +628 -45
  4. data/LICENSE +2 -1
  5. data/README-de.adoc +28 -38
  6. data/README-fr.adoc +30 -43
  7. data/README-jp.adoc +255 -201
  8. data/README-zh_CN.adoc +40 -44
  9. data/README.adoc +170 -143
  10. data/asciidoctor.gemspec +22 -34
  11. data/bin/asciidoctor +5 -4
  12. data/data/locale/attributes-ar.adoc +4 -3
  13. data/data/locale/attributes-be.adoc +23 -0
  14. data/data/locale/attributes-bg.adoc +4 -3
  15. data/data/locale/attributes-ca.adoc +6 -5
  16. data/data/locale/attributes-cs.adoc +4 -3
  17. data/data/locale/attributes-da.adoc +6 -5
  18. data/data/locale/attributes-de.adoc +6 -5
  19. data/data/locale/attributes-en.adoc +4 -4
  20. data/data/locale/attributes-es.adoc +6 -5
  21. data/data/locale/attributes-fa.adoc +4 -3
  22. data/data/locale/attributes-fi.adoc +4 -3
  23. data/data/locale/attributes-fr.adoc +8 -7
  24. data/data/locale/attributes-hu.adoc +4 -3
  25. data/data/locale/attributes-id.adoc +4 -3
  26. data/data/locale/attributes-it.adoc +6 -5
  27. data/data/locale/attributes-ja.adoc +4 -3
  28. data/data/locale/{attributes-kr.adoc → attributes-ko.adoc} +4 -3
  29. data/data/locale/attributes-nb.adoc +4 -3
  30. data/data/locale/attributes-nl.adoc +6 -5
  31. data/data/locale/attributes-nn.adoc +4 -3
  32. data/data/locale/attributes-pl.adoc +8 -7
  33. data/data/locale/attributes-pt.adoc +6 -5
  34. data/data/locale/attributes-pt_BR.adoc +6 -5
  35. data/data/locale/attributes-ro.adoc +4 -3
  36. data/data/locale/attributes-ru.adoc +6 -5
  37. data/data/locale/attributes-sr.adoc +4 -4
  38. data/data/locale/attributes-sr_Latn.adoc +4 -4
  39. data/data/locale/attributes-sv.adoc +4 -4
  40. data/data/locale/attributes-th.adoc +23 -0
  41. data/data/locale/attributes-tr.adoc +4 -3
  42. data/data/locale/attributes-uk.adoc +6 -5
  43. data/data/locale/attributes-vi.adoc +23 -0
  44. data/data/locale/attributes-zh_CN.adoc +4 -3
  45. data/data/locale/attributes-zh_TW.adoc +4 -3
  46. data/data/reference/syntax.adoc +296 -0
  47. data/data/stylesheets/asciidoctor-default.css +120 -114
  48. data/data/stylesheets/coderay-asciidoctor.css +15 -17
  49. data/lib/asciidoctor/abstract_block.rb +146 -140
  50. data/lib/asciidoctor/abstract_node.rb +152 -170
  51. data/lib/asciidoctor/attribute_list.rb +77 -89
  52. data/lib/asciidoctor/block.rb +29 -28
  53. data/lib/asciidoctor/callouts.rb +4 -2
  54. data/lib/asciidoctor/cli/invoker.rb +20 -24
  55. data/lib/asciidoctor/cli/options.rb +107 -96
  56. data/lib/asciidoctor/cli.rb +3 -2
  57. data/lib/asciidoctor/convert.rb +199 -0
  58. data/lib/asciidoctor/converter/composite.rb +40 -48
  59. data/lib/asciidoctor/converter/docbook5.rb +627 -644
  60. data/lib/asciidoctor/converter/html5.rb +1053 -951
  61. data/lib/asciidoctor/converter/manpage.rb +581 -532
  62. data/lib/asciidoctor/converter/template.rb +232 -271
  63. data/lib/asciidoctor/converter.rb +370 -185
  64. data/lib/asciidoctor/core_ext/float/truncate.rb +20 -0
  65. data/lib/asciidoctor/core_ext/hash/merge.rb +8 -0
  66. data/lib/asciidoctor/core_ext/match_data/names.rb +7 -0
  67. data/lib/asciidoctor/core_ext/nil_or_empty.rb +1 -0
  68. data/lib/asciidoctor/core_ext/regexp/is_match.rb +4 -2
  69. data/lib/asciidoctor/core_ext.rb +8 -17
  70. data/lib/asciidoctor/document.rb +503 -461
  71. data/lib/asciidoctor/extensions.rb +127 -174
  72. data/lib/asciidoctor/helpers.rb +184 -107
  73. data/lib/asciidoctor/inline.rb +9 -12
  74. data/lib/asciidoctor/list.rb +11 -29
  75. data/lib/asciidoctor/load.rb +119 -0
  76. data/lib/asciidoctor/logging.rb +22 -17
  77. data/lib/asciidoctor/parser.rb +673 -719
  78. data/lib/asciidoctor/path_resolver.rb +48 -33
  79. data/lib/asciidoctor/reader.rb +383 -338
  80. data/lib/asciidoctor/rouge_ext.rb +39 -0
  81. data/lib/asciidoctor/rx.rb +723 -0
  82. data/lib/asciidoctor/section.rb +17 -16
  83. data/lib/asciidoctor/stylesheets.rb +19 -37
  84. data/lib/asciidoctor/substitutors.rb +926 -1022
  85. data/lib/asciidoctor/syntax_highlighter/coderay.rb +88 -0
  86. data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +34 -0
  87. data/lib/asciidoctor/syntax_highlighter/html_pipeline.rb +10 -0
  88. data/lib/asciidoctor/syntax_highlighter/prettify.rb +30 -0
  89. data/lib/asciidoctor/syntax_highlighter/pygments.rb +157 -0
  90. data/lib/asciidoctor/syntax_highlighter/rouge.rb +143 -0
  91. data/lib/asciidoctor/syntax_highlighter.rb +253 -0
  92. data/lib/asciidoctor/table.rb +152 -114
  93. data/lib/asciidoctor/timings.rb +7 -5
  94. data/lib/asciidoctor/version.rb +2 -1
  95. data/lib/asciidoctor/writer.rb +30 -0
  96. data/lib/asciidoctor.rb +266 -1340
  97. data/man/asciidoctor.1 +49 -47
  98. data/man/asciidoctor.adoc +54 -45
  99. metadata +50 -245
  100. data/CONTRIBUTING.adoc +0 -185
  101. data/Gemfile +0 -60
  102. data/Rakefile +0 -129
  103. data/bin/asciidoctor-safe +0 -15
  104. data/features/open_block.feature +0 -92
  105. data/features/pass_block.feature +0 -66
  106. data/features/step_definitions.rb +0 -49
  107. data/features/text_formatting.feature +0 -57
  108. data/features/xref.feature +0 -1039
  109. data/lib/asciidoctor/converter/base.rb +0 -59
  110. data/lib/asciidoctor/converter/docbook45.rb +0 -93
  111. data/lib/asciidoctor/converter/factory.rb +0 -226
  112. data/lib/asciidoctor/core_ext/1.8.7/base64/strict_encode64.rb +0 -6
  113. data/lib/asciidoctor/core_ext/1.8.7/concurrent/hash.rb +0 -5
  114. data/lib/asciidoctor/core_ext/1.8.7/hash/key.rb +0 -4
  115. data/lib/asciidoctor/core_ext/1.8.7/io/binread.rb +0 -6
  116. data/lib/asciidoctor/core_ext/1.8.7/io/write.rb +0 -5
  117. data/lib/asciidoctor/core_ext/1.8.7/string/chr.rb +0 -6
  118. data/lib/asciidoctor/core_ext/1.8.7/string/limit_bytesize.rb +0 -29
  119. data/lib/asciidoctor/core_ext/1.8.7/symbol/empty.rb +0 -6
  120. data/lib/asciidoctor/core_ext/1.8.7/symbol/length.rb +0 -6
  121. data/lib/asciidoctor/core_ext/string/limit_bytesize.rb +0 -10
  122. data/test/api_test.rb +0 -1240
  123. data/test/attribute_list_test.rb +0 -242
  124. data/test/attributes_test.rb +0 -1623
  125. data/test/blocks_test.rb +0 -3870
  126. data/test/converter_test.rb +0 -470
  127. data/test/document_test.rb +0 -1853
  128. data/test/extensions_test.rb +0 -1560
  129. data/test/fixtures/asciidoc_index.txt +0 -521
  130. data/test/fixtures/basic-docinfo-footer.html +0 -6
  131. data/test/fixtures/basic-docinfo-footer.xml +0 -8
  132. data/test/fixtures/basic-docinfo.html +0 -1
  133. data/test/fixtures/basic-docinfo.xml +0 -4
  134. data/test/fixtures/basic.asciidoc +0 -5
  135. data/test/fixtures/chapter-a.adoc +0 -3
  136. data/test/fixtures/child-include.adoc +0 -5
  137. data/test/fixtures/circle.svg +0 -9
  138. data/test/fixtures/custom-backends/erb/html5/block_paragraph.html.erb +0 -6
  139. data/test/fixtures/custom-backends/haml/docbook45/block_paragraph.xml.haml +0 -6
  140. data/test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml +0 -3
  141. data/test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml +0 -5
  142. data/test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml +0 -1
  143. data/test/fixtures/custom-backends/slim/docbook45/block_paragraph.xml.slim +0 -6
  144. data/test/fixtures/custom-backends/slim/html5/block_paragraph.html.slim +0 -3
  145. data/test/fixtures/custom-backends/slim/html5/block_sidebar.html.slim +0 -5
  146. data/test/fixtures/custom-docinfodir/basic-docinfo.html +0 -1
  147. data/test/fixtures/custom-docinfodir/docinfo.html +0 -1
  148. data/test/fixtures/docinfo-footer.html +0 -1
  149. data/test/fixtures/docinfo-footer.xml +0 -9
  150. data/test/fixtures/docinfo.html +0 -1
  151. data/test/fixtures/docinfo.xml +0 -3
  152. data/test/fixtures/doctime-localtime.adoc +0 -2
  153. data/test/fixtures/dot.gif +0 -0
  154. data/test/fixtures/encoding.asciidoc +0 -13
  155. data/test/fixtures/file-with-missing-include.adoc +0 -1
  156. data/test/fixtures/grandchild-include.adoc +0 -3
  157. data/test/fixtures/hello-asciidoctor.pdf +0 -69
  158. data/test/fixtures/include-file.asciidoc +0 -24
  159. data/test/fixtures/include-file.jsx +0 -8
  160. data/test/fixtures/include-file.ml +0 -3
  161. data/test/fixtures/include-file.xml +0 -5
  162. data/test/fixtures/lists.adoc +0 -96
  163. data/test/fixtures/master.adoc +0 -5
  164. data/test/fixtures/mismatched-end-tag.adoc +0 -7
  165. data/test/fixtures/other-chapters.adoc +0 -11
  166. data/test/fixtures/outer-include.adoc +0 -5
  167. data/test/fixtures/parent-include-restricted.adoc +0 -5
  168. data/test/fixtures/parent-include.adoc +0 -5
  169. data/test/fixtures/sample.asciidoc +0 -30
  170. data/test/fixtures/section-a.adoc +0 -4
  171. data/test/fixtures/stylesheets/custom.css +0 -3
  172. data/test/fixtures/subdir/index.adoc +0 -3
  173. data/test/fixtures/subdir/inner-include.adoc +0 -3
  174. data/test/fixtures/subdir/middle-include.adoc +0 -5
  175. data/test/fixtures/subs-docinfo.html +0 -2
  176. data/test/fixtures/subs.adoc +0 -6
  177. data/test/fixtures/tagged-class-enclosed.rb +0 -25
  178. data/test/fixtures/tagged-class.rb +0 -23
  179. data/test/fixtures/tip.gif +0 -0
  180. data/test/fixtures/unclosed-tag.adoc +0 -3
  181. data/test/fixtures/unexpected-end-tag.adoc +0 -4
  182. data/test/invoker_test.rb +0 -745
  183. data/test/links_test.rb +0 -855
  184. data/test/lists_test.rb +0 -5151
  185. data/test/logger_test.rb +0 -211
  186. data/test/manpage_test.rb +0 -660
  187. data/test/options_test.rb +0 -262
  188. data/test/paragraphs_test.rb +0 -562
  189. data/test/parser_test.rb +0 -742
  190. data/test/paths_test.rb +0 -395
  191. data/test/preamble_test.rb +0 -173
  192. data/test/reader_test.rb +0 -2161
  193. data/test/sections_test.rb +0 -3575
  194. data/test/substitutions_test.rb +0 -2066
  195. data/test/tables_test.rb +0 -2036
  196. data/test/test_helper.rb +0 -447
  197. data/test/text_test.rb +0 -309
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.8
4
+ version: 2.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
@@ -13,24 +13,10 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-10-28 00:00:00.000000000 Z
16
+ date: 2022-01-06 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
- name: asciimath
20
- requirement: !ruby/object:Gem::Requirement
21
- requirements:
22
- - - "~>"
23
- - !ruby/object:Gem::Version
24
- version: 1.0.0
25
- type: :development
26
- prerelease: false
27
- version_requirements: !ruby/object:Gem::Requirement
28
- requirements:
29
- - - "~>"
30
- - !ruby/object:Gem::Version
31
- version: 1.0.0
32
- - !ruby/object:Gem::Dependency
33
- name: coderay
19
+ name: concurrent-ruby
34
20
  requirement: !ruby/object:Gem::Requirement
35
21
  requirements:
36
22
  - - "~>"
@@ -49,98 +35,98 @@ dependencies:
49
35
  requirements:
50
36
  - - "~>"
51
37
  - !ruby/object:Gem::Version
52
- version: 2.4.0
38
+ version: 3.1.0
53
39
  type: :development
54
40
  prerelease: false
55
41
  version_requirements: !ruby/object:Gem::Requirement
56
42
  requirements:
57
43
  - - "~>"
58
44
  - !ruby/object:Gem::Version
59
- version: 2.4.0
45
+ version: 3.1.0
60
46
  - !ruby/object:Gem::Dependency
61
- name: erubis
47
+ name: erubi
62
48
  requirement: !ruby/object:Gem::Requirement
63
49
  requirements:
64
50
  - - "~>"
65
51
  - !ruby/object:Gem::Version
66
- version: 2.7.0
52
+ version: 1.10.0
67
53
  type: :development
68
54
  prerelease: false
69
55
  version_requirements: !ruby/object:Gem::Requirement
70
56
  requirements:
71
57
  - - "~>"
72
58
  - !ruby/object:Gem::Version
73
- version: 2.7.0
59
+ version: 1.10.0
74
60
  - !ruby/object:Gem::Dependency
75
61
  name: haml
76
62
  requirement: !ruby/object:Gem::Requirement
77
63
  requirements:
78
64
  - - "~>"
79
65
  - !ruby/object:Gem::Version
80
- version: 5.0.0
66
+ version: 5.2.0
81
67
  type: :development
82
68
  prerelease: false
83
69
  version_requirements: !ruby/object:Gem::Requirement
84
70
  requirements:
85
71
  - - "~>"
86
72
  - !ruby/object:Gem::Version
87
- version: 5.0.0
73
+ version: 5.2.0
88
74
  - !ruby/object:Gem::Dependency
89
- name: nokogiri
75
+ name: minitest
90
76
  requirement: !ruby/object:Gem::Requirement
91
77
  requirements:
92
78
  - - "~>"
93
79
  - !ruby/object:Gem::Version
94
- version: 1.8.5
80
+ version: 5.14.0
95
81
  type: :development
96
82
  prerelease: false
97
83
  version_requirements: !ruby/object:Gem::Requirement
98
84
  requirements:
99
85
  - - "~>"
100
86
  - !ruby/object:Gem::Version
101
- version: 1.8.5
87
+ version: 5.14.0
102
88
  - !ruby/object:Gem::Dependency
103
- name: rake
89
+ name: nokogiri
104
90
  requirement: !ruby/object:Gem::Requirement
105
91
  requirements:
106
92
  - - "~>"
107
93
  - !ruby/object:Gem::Version
108
- version: 10.0.0
94
+ version: 1.10.0
109
95
  type: :development
110
96
  prerelease: false
111
97
  version_requirements: !ruby/object:Gem::Requirement
112
98
  requirements:
113
99
  - - "~>"
114
100
  - !ruby/object:Gem::Version
115
- version: 10.0.0
101
+ version: 1.10.0
116
102
  - !ruby/object:Gem::Dependency
117
- name: rspec-expectations
103
+ name: rake
118
104
  requirement: !ruby/object:Gem::Requirement
119
105
  requirements:
120
106
  - - "~>"
121
107
  - !ruby/object:Gem::Version
122
- version: 2.14.0
108
+ version: 12.3.0
123
109
  type: :development
124
110
  prerelease: false
125
111
  version_requirements: !ruby/object:Gem::Requirement
126
112
  requirements:
127
113
  - - "~>"
128
114
  - !ruby/object:Gem::Version
129
- version: 2.14.0
115
+ version: 12.3.0
130
116
  - !ruby/object:Gem::Dependency
131
117
  name: slim
132
118
  requirement: !ruby/object:Gem::Requirement
133
119
  requirements:
134
120
  - - "~>"
135
121
  - !ruby/object:Gem::Version
136
- version: 4.0.0
122
+ version: 4.1.0
137
123
  type: :development
138
124
  prerelease: false
139
125
  version_requirements: !ruby/object:Gem::Requirement
140
126
  requirements:
141
127
  - - "~>"
142
128
  - !ruby/object:Gem::Version
143
- version: 4.0.0
129
+ version: 4.1.0
144
130
  - !ruby/object:Gem::Dependency
145
131
  name: tilt
146
132
  requirement: !ruby/object:Gem::Requirement
@@ -155,48 +141,27 @@ dependencies:
155
141
  - - "~>"
156
142
  - !ruby/object:Gem::Version
157
143
  version: 2.0.0
158
- - !ruby/object:Gem::Dependency
159
- name: minitest
160
- requirement: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - "~>"
163
- - !ruby/object:Gem::Version
164
- version: 5.3.0
165
- type: :development
166
- prerelease: false
167
- version_requirements: !ruby/object:Gem::Requirement
168
- requirements:
169
- - - "~>"
170
- - !ruby/object:Gem::Version
171
- version: 5.3.0
172
- description: A fast, open source text processor and publishing toolchain, written
173
- in Ruby, for converting AsciiDoc content to HTML5, DocBook 5 (or 4.5) and other
174
- formats.
144
+ description: A fast, open source text processor and publishing toolchain for converting
145
+ AsciiDoc content to HTML 5, DocBook 5, and other formats.
175
146
  email:
176
147
  - dan.j.allen@gmail.com
177
148
  executables:
178
149
  - asciidoctor
179
- - asciidoctor-safe
180
150
  extensions: []
181
- extra_rdoc_files:
182
- - CHANGELOG.adoc
183
- - CONTRIBUTING.adoc
184
- - LICENSE
151
+ extra_rdoc_files: []
185
152
  files:
153
+ - ".yardopts"
186
154
  - CHANGELOG.adoc
187
- - CONTRIBUTING.adoc
188
- - Gemfile
189
155
  - LICENSE
190
156
  - README-de.adoc
191
157
  - README-fr.adoc
192
158
  - README-jp.adoc
193
159
  - README-zh_CN.adoc
194
160
  - README.adoc
195
- - Rakefile
196
161
  - asciidoctor.gemspec
197
162
  - bin/asciidoctor
198
- - bin/asciidoctor-safe
199
163
  - data/locale/attributes-ar.adoc
164
+ - data/locale/attributes-be.adoc
200
165
  - data/locale/attributes-bg.adoc
201
166
  - data/locale/attributes-ca.adoc
202
167
  - data/locale/attributes-cs.adoc
@@ -211,7 +176,7 @@ files:
211
176
  - data/locale/attributes-id.adoc
212
177
  - data/locale/attributes-it.adoc
213
178
  - data/locale/attributes-ja.adoc
214
- - data/locale/attributes-kr.adoc
179
+ - data/locale/attributes-ko.adoc
215
180
  - data/locale/attributes-nb.adoc
216
181
  - data/locale/attributes-nl.adoc
217
182
  - data/locale/attributes-nn.adoc
@@ -223,18 +188,16 @@ files:
223
188
  - data/locale/attributes-sr.adoc
224
189
  - data/locale/attributes-sr_Latn.adoc
225
190
  - data/locale/attributes-sv.adoc
191
+ - data/locale/attributes-th.adoc
226
192
  - data/locale/attributes-tr.adoc
227
193
  - data/locale/attributes-uk.adoc
194
+ - data/locale/attributes-vi.adoc
228
195
  - data/locale/attributes-zh_CN.adoc
229
196
  - data/locale/attributes-zh_TW.adoc
230
197
  - data/locale/attributes.adoc
198
+ - data/reference/syntax.adoc
231
199
  - data/stylesheets/asciidoctor-default.css
232
200
  - data/stylesheets/coderay-asciidoctor.css
233
- - features/open_block.feature
234
- - features/pass_block.feature
235
- - features/step_definitions.rb
236
- - features/text_formatting.feature
237
- - features/xref.feature
238
201
  - lib/asciidoctor.rb
239
202
  - lib/asciidoctor/abstract_block.rb
240
203
  - lib/asciidoctor/abstract_node.rb
@@ -244,132 +207,57 @@ files:
244
207
  - lib/asciidoctor/cli.rb
245
208
  - lib/asciidoctor/cli/invoker.rb
246
209
  - lib/asciidoctor/cli/options.rb
210
+ - lib/asciidoctor/convert.rb
247
211
  - lib/asciidoctor/converter.rb
248
- - lib/asciidoctor/converter/base.rb
249
212
  - lib/asciidoctor/converter/composite.rb
250
- - lib/asciidoctor/converter/docbook45.rb
251
213
  - lib/asciidoctor/converter/docbook5.rb
252
- - lib/asciidoctor/converter/factory.rb
253
214
  - lib/asciidoctor/converter/html5.rb
254
215
  - lib/asciidoctor/converter/manpage.rb
255
216
  - lib/asciidoctor/converter/template.rb
256
217
  - lib/asciidoctor/core_ext.rb
257
- - lib/asciidoctor/core_ext/1.8.7/base64/strict_encode64.rb
258
- - lib/asciidoctor/core_ext/1.8.7/concurrent/hash.rb
259
- - lib/asciidoctor/core_ext/1.8.7/hash/key.rb
260
- - lib/asciidoctor/core_ext/1.8.7/io/binread.rb
261
- - lib/asciidoctor/core_ext/1.8.7/io/write.rb
262
- - lib/asciidoctor/core_ext/1.8.7/string/chr.rb
263
- - lib/asciidoctor/core_ext/1.8.7/string/limit_bytesize.rb
264
- - lib/asciidoctor/core_ext/1.8.7/symbol/empty.rb
265
- - lib/asciidoctor/core_ext/1.8.7/symbol/length.rb
218
+ - lib/asciidoctor/core_ext/float/truncate.rb
219
+ - lib/asciidoctor/core_ext/hash/merge.rb
220
+ - lib/asciidoctor/core_ext/match_data/names.rb
266
221
  - lib/asciidoctor/core_ext/nil_or_empty.rb
267
222
  - lib/asciidoctor/core_ext/regexp/is_match.rb
268
- - lib/asciidoctor/core_ext/string/limit_bytesize.rb
269
223
  - lib/asciidoctor/document.rb
270
224
  - lib/asciidoctor/extensions.rb
271
225
  - lib/asciidoctor/helpers.rb
272
226
  - lib/asciidoctor/inline.rb
273
227
  - lib/asciidoctor/list.rb
228
+ - lib/asciidoctor/load.rb
274
229
  - lib/asciidoctor/logging.rb
275
230
  - lib/asciidoctor/parser.rb
276
231
  - lib/asciidoctor/path_resolver.rb
277
232
  - lib/asciidoctor/reader.rb
233
+ - lib/asciidoctor/rouge_ext.rb
234
+ - lib/asciidoctor/rx.rb
278
235
  - lib/asciidoctor/section.rb
279
236
  - lib/asciidoctor/stylesheets.rb
280
237
  - lib/asciidoctor/substitutors.rb
238
+ - lib/asciidoctor/syntax_highlighter.rb
239
+ - lib/asciidoctor/syntax_highlighter/coderay.rb
240
+ - lib/asciidoctor/syntax_highlighter/highlightjs.rb
241
+ - lib/asciidoctor/syntax_highlighter/html_pipeline.rb
242
+ - lib/asciidoctor/syntax_highlighter/prettify.rb
243
+ - lib/asciidoctor/syntax_highlighter/pygments.rb
244
+ - lib/asciidoctor/syntax_highlighter/rouge.rb
281
245
  - lib/asciidoctor/table.rb
282
246
  - lib/asciidoctor/timings.rb
283
247
  - lib/asciidoctor/version.rb
248
+ - lib/asciidoctor/writer.rb
284
249
  - man/asciidoctor.1
285
250
  - man/asciidoctor.adoc
286
- - test/api_test.rb
287
- - test/attribute_list_test.rb
288
- - test/attributes_test.rb
289
- - test/blocks_test.rb
290
- - test/converter_test.rb
291
- - test/document_test.rb
292
- - test/extensions_test.rb
293
- - test/fixtures/asciidoc_index.txt
294
- - test/fixtures/basic-docinfo-footer.html
295
- - test/fixtures/basic-docinfo-footer.xml
296
- - test/fixtures/basic-docinfo.html
297
- - test/fixtures/basic-docinfo.xml
298
- - test/fixtures/basic.asciidoc
299
- - test/fixtures/chapter-a.adoc
300
- - test/fixtures/child-include.adoc
301
- - test/fixtures/circle.svg
302
- - test/fixtures/custom-backends/erb/html5/block_paragraph.html.erb
303
- - test/fixtures/custom-backends/haml/docbook45/block_paragraph.xml.haml
304
- - test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml
305
- - test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml
306
- - test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml
307
- - test/fixtures/custom-backends/slim/docbook45/block_paragraph.xml.slim
308
- - test/fixtures/custom-backends/slim/html5/block_paragraph.html.slim
309
- - test/fixtures/custom-backends/slim/html5/block_sidebar.html.slim
310
- - test/fixtures/custom-docinfodir/basic-docinfo.html
311
- - test/fixtures/custom-docinfodir/docinfo.html
312
- - test/fixtures/docinfo-footer.html
313
- - test/fixtures/docinfo-footer.xml
314
- - test/fixtures/docinfo.html
315
- - test/fixtures/docinfo.xml
316
- - test/fixtures/doctime-localtime.adoc
317
- - test/fixtures/dot.gif
318
- - test/fixtures/encoding.asciidoc
319
- - test/fixtures/file-with-missing-include.adoc
320
- - test/fixtures/grandchild-include.adoc
321
- - test/fixtures/hello-asciidoctor.pdf
322
- - test/fixtures/include-file.asciidoc
323
- - test/fixtures/include-file.jsx
324
- - test/fixtures/include-file.ml
325
- - test/fixtures/include-file.xml
326
- - test/fixtures/lists.adoc
327
- - test/fixtures/master.adoc
328
- - test/fixtures/mismatched-end-tag.adoc
329
- - test/fixtures/other-chapters.adoc
330
- - test/fixtures/outer-include.adoc
331
- - test/fixtures/parent-include-restricted.adoc
332
- - test/fixtures/parent-include.adoc
333
- - test/fixtures/sample.asciidoc
334
- - test/fixtures/section-a.adoc
335
- - test/fixtures/stylesheets/custom.css
336
- - test/fixtures/subdir/index.adoc
337
- - test/fixtures/subdir/inner-include.adoc
338
- - test/fixtures/subdir/middle-include.adoc
339
- - test/fixtures/subs-docinfo.html
340
- - test/fixtures/subs.adoc
341
- - test/fixtures/tagged-class-enclosed.rb
342
- - test/fixtures/tagged-class.rb
343
- - test/fixtures/tip.gif
344
- - test/fixtures/unclosed-tag.adoc
345
- - test/fixtures/unexpected-end-tag.adoc
346
- - test/invoker_test.rb
347
- - test/links_test.rb
348
- - test/lists_test.rb
349
- - test/logger_test.rb
350
- - test/manpage_test.rb
351
- - test/options_test.rb
352
- - test/paragraphs_test.rb
353
- - test/parser_test.rb
354
- - test/paths_test.rb
355
- - test/preamble_test.rb
356
- - test/reader_test.rb
357
- - test/sections_test.rb
358
- - test/substitutions_test.rb
359
- - test/tables_test.rb
360
- - test/test_helper.rb
361
- - test/text_test.rb
362
- homepage: http://asciidoctor.org
251
+ homepage: https://asciidoctor.org
363
252
  licenses:
364
253
  - MIT
365
254
  metadata:
366
255
  bug_tracker_uri: https://github.com/asciidoctor/asciidoctor/issues
367
- changelog_uri: https://github.com/asciidoctor/asciidoctor/blob/master/CHANGELOG.adoc
256
+ changelog_uri: https://github.com/asciidoctor/asciidoctor/blob/HEAD/CHANGELOG.adoc
368
257
  mailing_list_uri: http://discuss.asciidoctor.org
369
258
  source_code_uri: https://github.com/asciidoctor/asciidoctor
370
259
  post_install_message:
371
- rdoc_options:
372
- - "--charset=UTF-8"
260
+ rdoc_options: []
373
261
  require_paths:
374
262
  - lib
375
263
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -383,91 +271,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
383
271
  - !ruby/object:Gem::Version
384
272
  version: '0'
385
273
  requirements: []
386
- rubyforge_project:
387
- rubygems_version: 2.7.7
274
+ rubygems_version: 3.2.32
388
275
  signing_key:
389
276
  specification_version: 4
390
277
  summary: An implementation of the AsciiDoc text processor and publishing toolchain
391
- in Ruby
392
- test_files:
393
- - features/open_block.feature
394
- - features/pass_block.feature
395
- - features/step_definitions.rb
396
- - features/text_formatting.feature
397
- - features/xref.feature
398
- - test/api_test.rb
399
- - test/attribute_list_test.rb
400
- - test/attributes_test.rb
401
- - test/blocks_test.rb
402
- - test/converter_test.rb
403
- - test/document_test.rb
404
- - test/extensions_test.rb
405
- - test/fixtures/asciidoc_index.txt
406
- - test/fixtures/basic-docinfo-footer.html
407
- - test/fixtures/basic-docinfo-footer.xml
408
- - test/fixtures/basic-docinfo.html
409
- - test/fixtures/basic-docinfo.xml
410
- - test/fixtures/basic.asciidoc
411
- - test/fixtures/chapter-a.adoc
412
- - test/fixtures/child-include.adoc
413
- - test/fixtures/circle.svg
414
- - test/fixtures/custom-backends/erb/html5/block_paragraph.html.erb
415
- - test/fixtures/custom-backends/haml/docbook45/block_paragraph.xml.haml
416
- - test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml
417
- - test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml
418
- - test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml
419
- - test/fixtures/custom-backends/slim/docbook45/block_paragraph.xml.slim
420
- - test/fixtures/custom-backends/slim/html5/block_paragraph.html.slim
421
- - test/fixtures/custom-backends/slim/html5/block_sidebar.html.slim
422
- - test/fixtures/custom-docinfodir/basic-docinfo.html
423
- - test/fixtures/custom-docinfodir/docinfo.html
424
- - test/fixtures/docinfo-footer.html
425
- - test/fixtures/docinfo-footer.xml
426
- - test/fixtures/docinfo.html
427
- - test/fixtures/docinfo.xml
428
- - test/fixtures/doctime-localtime.adoc
429
- - test/fixtures/dot.gif
430
- - test/fixtures/encoding.asciidoc
431
- - test/fixtures/file-with-missing-include.adoc
432
- - test/fixtures/grandchild-include.adoc
433
- - test/fixtures/hello-asciidoctor.pdf
434
- - test/fixtures/include-file.asciidoc
435
- - test/fixtures/include-file.jsx
436
- - test/fixtures/include-file.ml
437
- - test/fixtures/include-file.xml
438
- - test/fixtures/lists.adoc
439
- - test/fixtures/master.adoc
440
- - test/fixtures/mismatched-end-tag.adoc
441
- - test/fixtures/other-chapters.adoc
442
- - test/fixtures/outer-include.adoc
443
- - test/fixtures/parent-include-restricted.adoc
444
- - test/fixtures/parent-include.adoc
445
- - test/fixtures/sample.asciidoc
446
- - test/fixtures/section-a.adoc
447
- - test/fixtures/stylesheets/custom.css
448
- - test/fixtures/subdir/index.adoc
449
- - test/fixtures/subdir/inner-include.adoc
450
- - test/fixtures/subdir/middle-include.adoc
451
- - test/fixtures/subs-docinfo.html
452
- - test/fixtures/subs.adoc
453
- - test/fixtures/tagged-class-enclosed.rb
454
- - test/fixtures/tagged-class.rb
455
- - test/fixtures/tip.gif
456
- - test/fixtures/unclosed-tag.adoc
457
- - test/fixtures/unexpected-end-tag.adoc
458
- - test/invoker_test.rb
459
- - test/links_test.rb
460
- - test/lists_test.rb
461
- - test/logger_test.rb
462
- - test/manpage_test.rb
463
- - test/options_test.rb
464
- - test/paragraphs_test.rb
465
- - test/parser_test.rb
466
- - test/paths_test.rb
467
- - test/preamble_test.rb
468
- - test/reader_test.rb
469
- - test/sections_test.rb
470
- - test/substitutions_test.rb
471
- - test/tables_test.rb
472
- - test/test_helper.rb
473
- - test/text_test.rb
278
+ test_files: []
data/CONTRIBUTING.adoc DELETED
@@ -1,185 +0,0 @@
1
- = Contributing
2
- // settings:
3
- :idprefix:
4
- :idseparator: -
5
- :source-language: ruby
6
- :language: {source-language}
7
- ifdef::env-github,env-browser[:outfilesuffix: .adoc]
8
- // URIs:
9
- :uri-repo: https://github.com/asciidoctor/asciidoctor
10
- :uri-help-base: https://help.github.com/articles
11
- :uri-issues: {uri-repo}/issues
12
- :uri-fork-help: {uri-help-base}/fork-a-repo
13
- :uri-branch-help: {uri-fork-help}#create-branches
14
- :uri-pr-help: {uri-help-base}/using-pull-requests
15
- :uri-gist: https://gist.github.com
16
- :uri-yard: https://yardoc.org
17
- :uri-tomdoc: http://tomdoc.org
18
-
19
- == License Agreement
20
-
21
- By contributing changes to this repository, you agree to license your contributions under the MIT license.
22
- This ensures your contributions have the same license as the project and that the community is free to use your contributions.
23
- You also assert that you are the original author of the work that you are contributing unless otherwise stated.
24
-
25
- == Submitting an Issue
26
-
27
- We use the {uri-issues}[issue tracker on GitHub] associated with this project to track bugs and features.
28
- Before submitting a bug report or feature request, check to make sure it hasn't already been submitted.
29
- When submitting a bug report, please include a {uri-gist}[Gist] that includes any details that may help reproduce the bug, including your gem version, Ruby version, and operating system.
30
-
31
- Most importantly, since Asciidoctor is a text processor, reproducing most bugs requires that we have some snippet of text on which Asciidoctor exhibits the bad behavior.
32
-
33
- An ideal bug report would include a pull request with failing specs.
34
-
35
- == Submitting a Pull Request
36
-
37
- . {uri-fork-help}[Fork the repository].
38
- . Run `NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle` to install development dependencies.
39
- - If the `bundle` command is not available, run `gem install bundler` to install it.
40
- . {uri-branch-help}[Create a topic branch] (preferably using the pattern `issue-XYZ`, where `XYZ` is the issue number).
41
- . Add tests for your unimplemented feature or bug fix. (See <<writing-and-executing-tests>>)
42
- . Run `bundle exec rake` to run the tests.
43
- If your tests pass, return to step 4.
44
- . Implement your feature or bug fix.
45
- . Run `bundle exec rake` to run the tests.
46
- If your tests fail, return to step 6.
47
- . Add documentation for your feature or bug fix.
48
- . If your changes are not 100% documented, go back to step 8.
49
- . Add, commit, and push your changes.
50
- . {uri-pr-help}[Submit a pull request].
51
-
52
- For ideas about how to use pull requests, see the post http://blog.quickpeople.co.uk/2013/07/10/useful-github-patterns[Useful GitHub Patterns].
53
-
54
- === Background Knowledge
55
-
56
- As Asciidoctor is built using Ruby some basic knowledge of Ruby, RubyGems and Minitest is beneficial. The following resources provide a good starting point for contributors who may not be completely comfortable with these tools:
57
-
58
- * https://www.ruby-lang.org/en/documentation/quickstart/[Ruby in 20 minutes]
59
- * https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/[Ruby from other languages]
60
- * http://guides.rubygems.org/rubygems-basics/[RubyGems basics]
61
- * http://guides.rubygems.org/what-is-a-gem/[What is a Gem?]
62
- * http://blog.teamtreehouse.com/short-introduction-minitest[How to use Minitest]
63
- * http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html[Minitest spec tutorial]
64
- * https://github.com/seattlerb/minitest/blob/master/README.rdoc[Minitest Project Documentation]
65
-
66
- While these resources don't cover everything needed they serve as a good starting off point for beginners.
67
-
68
- === Writing and Executing Tests
69
-
70
- Tests live inside the test directory and are named <topic>_test.rb.
71
- For instance, tests for the different types of blocks can be found in the file test/blocks_test.rb.
72
-
73
- Within a test file, individual test cases are organized inside of contexts.
74
- A context is type of logical container that groups related tests together.
75
-
76
- Each test case follows the same structure:
77
-
78
- [source]
79
- ----
80
- test 'description of test' do
81
- # test logic
82
- end
83
- ----
84
-
85
- At the moment, the tests are quite primitive.
86
- Here's how a typical test operates:
87
-
88
- . Defines sample AsciiDoc source
89
- . Renders the document to HTML or DocBook
90
- . Uses XPath and CSS expressions to verify expected output
91
-
92
- Here's how we might test the open block syntax:
93
-
94
- [source]
95
- ----
96
- test 'should render content bounded by two consecutive hyphens as an open block' do
97
- input = <<-EOS
98
- --
99
- This is an open block.
100
- --
101
- EOS
102
- result = render_embedded_string input
103
- assert_css '.openblock', result, 1
104
- assert_css '.openblock p', result, 1
105
- assert_xpath '/div[@class="openblock"]//p[text()="This is an open block."]', result, 1
106
- end
107
- ----
108
-
109
- As you can see, several helpers are used to facilitate the test scenario.
110
- The `render_embedded_string` invokes Asciidoctor's render method with the header and footer option disabled.
111
- This method is ideal for unit-level tests.
112
- If you need to test the whole document, use `render_string` instead.
113
- The `assert_css` and `assert_xpath` assertion methods take a CSS or XPath selector, respectively, the rendered result and the number of expected matches.
114
- You can also use built-in assertions in Ruby's test library.
115
-
116
- To run all the tests, simply execute `rake`:
117
-
118
- $ rake
119
-
120
- NOTE: The tests should only take a few seconds to run using Ruby 2.1.
121
-
122
- If you want to run a single test file, you can use `ruby`:
123
-
124
- $ ruby test/blocks_test.rb
125
-
126
- To test a single test case, first add the string "wip" to the beginning of the description.
127
- For example:
128
-
129
- [source]
130
- ----
131
- test 'wip should render ...' do
132
- ...
133
- end
134
- ----
135
-
136
- Then, run `ruby` again, but this time pass a selector argument so it finds matching tests:
137
-
138
- $ ruby test/blocks_test.rb -n /wip/
139
-
140
- You can also turn on verbose mode if you want to see more output:
141
-
142
- $ ruby test/blocks_test.rb -n /wip/ -v
143
-
144
- Once you are done with your test, make sure to remove `wip` from the description and run all the tests again using `rake`.
145
-
146
- We plan on switching to a more elegant testing framework in the future, such as RSpec or Cucumber, in order to make the tests more clear and robust.
147
-
148
- === Running Asciidoctor in Development Mode
149
-
150
- Asciidoctor is designed so that you can run the script directly out of the cloned repository.
151
- Simply execute the `asciidoctor` command directly (referencing it either by relative or absolute path).
152
- There's no need to install it using the `gem` command first.
153
-
154
- For example, to convert the README file, switch to the root of the project and run:
155
-
156
- $ ./bin/asciidoctor README.adoc
157
-
158
- IMPORTANT: You'll need to make sure you reference the correct relative path to the `asciidoctor` command.
159
-
160
- If you want to be able to execute the `asciidoctor` command from any directory without worrying about the relative (or absolute) path, you can setup the following Bash alias:
161
-
162
- alias asciidoctor-dev="/path/to/asciidoctor/bin/asciidoctor"
163
-
164
- Now you can execute the `asciidoctor` command from any folder as follows:
165
-
166
- $ asciidoctor-dev README.adoc
167
-
168
- == Building the API Documentation
169
-
170
- The API documentation is written in the {uri-tomdoc}[TomDoc] dialect and built using {uri-yard}[Yard].
171
-
172
- The options for Yard are configured in the [.path]_.yardopts_ file at the root of the project.
173
-
174
- To build the API documentation locally, run the following command:
175
-
176
- $ bundle exec yard
177
-
178
- The documentation will be built into the [.path]_rdoc_ folder.
179
-
180
- == Supporting Additional Ruby Versions
181
-
182
- If you would like this library to support another Ruby version, you may volunteer to be a maintainer.
183
- Being a maintainer entails making sure all tests run and pass on that implementation.
184
- When something breaks on your implementation, you will be expected to provide patches in a timely fashion.
185
- If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.