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
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
- Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v1.5.8, 2018-10-28
2
+ Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ v2.0.17, 2022-01-05
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -9,7 +9,6 @@ v1.5.8, 2018-10-28
9
9
  ifndef::env-github[:icons: font]
10
10
  ifdef::env-github[]
11
11
  :status:
12
- :outfilesuffix: .adoc
13
12
  :caution-caption: :fire:
14
13
  :important-caption: :exclamation:
15
14
  :note-caption: :paperclip:
@@ -17,136 +16,123 @@ ifdef::env-github[]
17
16
  :warning-caption: :warning:
18
17
  endif::[]
19
18
  // Variables:
20
- :release-version: 1.5.8
21
- // URIs:
22
- :uri-org: https://github.com/asciidoctor
23
- :uri-repo: {uri-org}/asciidoctor
24
- :uri-asciidoctorj: {uri-org}/asciidoctorj
25
- :uri-asciidoctorjs: {uri-org}/asciidoctor.js
26
- :uri-gradle-plugin: {uri-org}/asciidoctor-gradle-plugin
27
- :uri-maven-plugin: {uri-org}/asciidoctor-maven-plugin
28
- :uri-asciidoclet: {uri-org}/asciidoclet
29
- :uri-project: https://asciidoctor.org
30
- ifdef::env-site[:uri-project: link:]
31
- :uri-docs: {uri-project}/docs
32
- :uri-news: {uri-project}/news
33
- :uri-manpage: {uri-project}/man/asciidoctor
34
- :uri-issues: {uri-repo}/issues
35
- :uri-contributors: {uri-repo}/graphs/contributors
36
- :uri-rel-file-base: link:
37
- :uri-rel-tree-base: link:
38
- ifdef::env-site[]
39
- :uri-rel-file-base: {uri-repo}/blob/master/
40
- :uri-rel-tree-base: {uri-repo}/tree/master/
19
+ :release-version: 2.0.17
20
+ // URLs:
21
+ :url-org: https://github.com/asciidoctor
22
+ :url-repo: {url-org}/asciidoctor
23
+ :url-asciidoctorj: {url-org}/asciidoctorj
24
+ :url-asciidoctorjs: {url-org}/asciidoctor.js
25
+ :url-gradle-plugin: {url-org}/asciidoctor-gradle-plugin
26
+ :url-maven-plugin: {url-org}/asciidoctor-maven-plugin
27
+ :url-asciidoclet: {url-org}/asciidoclet
28
+ :url-project: https://asciidoctor.org
29
+ ifdef::env-site[:url-project: link:]
30
+ :url-docs: https://docs.asciidoctor.org
31
+ :url-news: {url-project}/news
32
+ :url-manpage: {url-project}/man/asciidoctor
33
+ :url-issues: {url-repo}/issues
34
+ :url-contributors: {url-repo}/graphs/contributors
35
+ :url-rel-file-base: link:
36
+ :url-rel-tree-base: link:
37
+ ifdef::env-site,env-yard[]
38
+ :url-rel-file-base: {url-repo}/blob/HEAD/
39
+ :url-rel-tree-base: {url-repo}/tree/HEAD/
41
40
  endif::[]
42
- :uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
43
- :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
44
- :uri-license: {uri-rel-file-base}LICENSE
45
- :uri-tests: {uri-rel-tree-base}test
46
- :uri-discuss: http://discuss.asciidoctor.org
47
- :uri-irc: irc://irc.freenode.org/#asciidoctor
48
- :uri-rubygem: https://rubygems.org/gems/asciidoctor
49
- :uri-what-is-asciidoc: {uri-docs}/what-is-asciidoc
50
- :uri-user-manual: {uri-docs}/user-manual
51
- :uri-install-docker: https://github.com/asciidoctor/docker-asciidoctor
52
- //:uri-install-doc: {uri-docs}/install-toolchain
53
- :uri-install-macos-doc: {uri-docs}/install-asciidoctor-macos
54
- :uri-render-doc: {uri-docs}/render-documents
55
- :uri-themes-doc: {uri-docs}/produce-custom-themes-using-asciidoctor-stylesheet-factory
56
- :uri-gitscm-repo: https://github.com/git/git-scm.com
57
- :uri-prototype: {uri-gitscm-repo}/commits/master/lib/asciidoc.rb
58
- :uri-freesoftware: https://www.gnu.org/philosophy/free-sw.html
59
- :uri-foundation: https://foundation.zurb.com
60
- :uri-opal: https://opalrb.com
61
- :uri-tilt: https://github.com/rtomayko/tilt
62
- :uri-ruby: https://www.ruby-lang.org
41
+ :url-changelog: {url-rel-file-base}CHANGELOG.adoc
42
+ :url-contribute: {url-rel-file-base}CONTRIBUTING.adoc
43
+ :url-license: {url-rel-file-base}LICENSE
44
+ :url-tests: {url-rel-tree-base}test
45
+ :url-discuss: https://discuss.asciidoctor.org
46
+ :url-chat: https://asciidoctor.zulipchat.com
47
+ :url-rubygem: https://rubygems.org/gems/asciidoctor
48
+ :url-what-is-asciidoc: {url-docs}/asciidoctor/latest/#relationship-to-asciidoc
49
+ :url-install-docker: https://github.com/asciidoctor/docker-asciidoctor
50
+ :url-opal: https://opalrb.com
51
+ :url-tilt: https://github.com/rtomayko/tilt
52
+ :url-ruby: https://www.ruby-lang.org
63
53
  // images:
64
- :image-uri-screenshot: https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png
54
+ :image-url-screenshot: https://cdn.jsdelivr.net/gh/asciidoctor/asciidoctor/screenshot.png
65
55
 
66
- {uri-project}[Asciidoctor] is a _fast_, {uri-license}[open source] text processor and publishing toolchain for converting {uri-what-is-asciidoc}[AsciiDoc] content to HTML5, DocBook, PDF, and other formats.
67
- Asciidoctor is written in Ruby and runs on all major operation systems.
68
- To simplify installation, Asciidoctor is packaged and distributed as a gem to {uri-rubygem}[RubyGems.org] and is packaged for popular Linux distributions and macOS.
69
- Asciidoctor can also be run in a JVM using {uri-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment using {uri-asciidoctorjs}[Asciidoctor.js].
70
- The Asciidoctor project is {uri-repo}[hosted on GitHub].
56
+ {url-project}[Asciidoctor] is a fast, open source, Ruby-based text processor for parsing AsciiDoc(R) into a document model and converting it to output formats such as HTML 5, DocBook 5, manual pages, PDF, EPUB 3, and other formats.
71
57
 
72
- ifndef::env-site[]
58
+ Asciidoctor also has an ecosystem of extensions, converters, build plugins, and tools to help you author and publish content written in {url-what-is-asciidoc}[AsciiDoc].
59
+ You can find the documentation for these projects at {url-docs}.
60
+
61
+ In addition to running on Ruby, Asciidoctor can be executed on a JVM using {url-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment using {url-asciidoctorjs}[Asciidoctor.js].
62
+
63
+ ifndef::env-site,env-yard[]
73
64
  This document is also available in the following languages: +
74
- {uri-rel-file-base}README-zh_CN.adoc[汉语]
65
+ {url-rel-file-base}README-zh_CN.adoc[汉语]
75
66
  |
76
- {uri-rel-file-base}README-de.adoc[Deutsch]
67
+ {url-rel-file-base}README-de.adoc[Deutsch]
77
68
  |
78
- {uri-rel-file-base}README-fr.adoc[Français]
69
+ {url-rel-file-base}README-fr.adoc[Français]
79
70
  |
80
- {uri-rel-file-base}README-jp.adoc[日本語]
71
+ {url-rel-file-base}README-jp.adoc[日本語]
81
72
  endif::[]
82
73
 
83
74
  .Key documentation
84
75
  [.compact]
85
- * {uri-docs}/what-is-asciidoc[What is AsciiDoc?]
86
- * {uri-docs}/asciidoc-writers-guide[AsciiDoc Writer's Guide]
87
- * {uri-docs}/user-manual[Asciidoctor User Manual]
88
- * {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc Syntax Reference]
76
+ * {url-docs}/asciidoctor/latest/[Asciidoctor Documentation]
77
+ * {url-docs}/asciidoc/latest/[AsciiDoc Language Documentation]
78
+ * {url-docs}/asciidoc/latest/syntax-quick-reference/[AsciiDoc Syntax Quick Reference]
89
79
 
90
80
  ifdef::status[]
91
- .*Project health*
92
- image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI), link=https://travis-ci.org/asciidoctor/asciidoctor]
93
- image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&amp;passingText=green%20bar&amp;failingText=%23fail&amp;pendingText=building%2E%2E%2E[Build Status (AppVeyor), link=https://ci.appveyor.com/project/asciidoctor/asciidoctor]
94
- //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status, link=https://coveralls.io/r/asciidoctor/asciidoctor]
95
- //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate, link="https://codeclimate.com/github/asciidoctor/asciidoctor"]
96
- image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs, link="https://inch-ci.org/github/asciidoctor/asciidoctor"]
81
+ image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={url-rubygem}]
82
+ image:https://img.shields.io/badge/rubydoc.info-{release-version}-blue.svg[library (API) docs,link=https://www.rubydoc.info/gems/asciidoctor/{release-version}]
83
+ image:https://github.com/asciidoctor/asciidoctor/workflows/CI/badge.svg[Build Status (GitHub Actions),link={url-repo}/actions]
84
+ image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[Project Chat (Zulip),link={url-chat}]
97
85
  endif::[]
98
86
 
99
87
  == Sponsors
100
88
 
101
- We want to recognize our generous sponsors, without whose support Asciidoctor would not be possible.
102
- Thank you sponsors for your dedication to improving the state of technical documentation!
103
-
104
- image:https://www.okta.com/sites/all/themes/Okta/images/blog/Logos/Okta_Logo_BrightBlue_Medium.png[Okta,280,link=https://developer.okta.com/signup?utm_source=asciidoctor&utm_medium=logo&utm_campaign=sponsor,title="Add User Auth to Your Apps in Minutes with Okta"]
105
- &nbsp; &nbsp; &nbsp;
106
- image:https://secure.gravatar.com/avatar/823717a797dbd78ceff7b26aa397f383.png?size=200[OpenDevise,100,link=https://opendevise.com,title="Let the Creators of Asciidoctor and Antora Help You to Accelerate Your Docs"]
89
+ We want to recognize our {url-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
90
+ Thank you sponsors!
91
+ Without your generous support, Asciidoctor would not be possible.
107
92
 
108
- Major funding for Asciidoctor is provided by our *Change Makers*, https://developer.okta.com/signup?utm_source=asciidoctor&utm_medium=text-link&utm_campaign=sponsor[Okta] and https://opendevise.com[OpenDevise], and our *Strategy Sponsors*, https://www.khronos.org/[Khronos Group] and Linda Roberts.
109
- Additional funding is provided by our https://asciidoctor.org/supporters[Community Backers].
93
+ You can support this project by becoming a sponsor through https://opencollective.com/asciidoctor[OpenCollective].
110
94
 
111
- You can support this project by becoming a sponsor on https://opencollective.com/asciidoctor[OpenCollective].
95
+ == AsciiDoc Processing and Built-in Converters
112
96
 
113
- == The Big Picture
97
+ AsciiDoc is the language. +
98
+ Asciidoctor is the processor.
114
99
 
115
- Asciidoctor reads content written in plain text, as shown in the panel on the left in the image below, and converts it to HTML5, as shown rendered in the right panel.
116
- Asciidoctor applies a default stylesheet to the HTML5 document to provide a pleasant out-of-the-box experience.
100
+ Asciidoctor reads the AsciiDoc source, as shown in the panel on the left in the image below, and converts it to publishable formats, such as HTML 5, as shown rendered in the panel on the right.
117
101
 
118
- image::{image-uri-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
102
+ image::{image-url-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
119
103
 
120
- == AsciiDoc Processing
104
+ Asciidoctor provides built-in {url-docs}/asciidoctor/latest/converters/[converters] for three output formats by default: {url-docs}/asciidoctor/latest/html-backend/[HTML 5], {url-docs}/asciidoctor/latest/docbook-backend/[DocBook 5], and {url-docs}/asciidoctor/latest/manpage-backend/[man page] (short for manual page).
105
+ Additional converters, such as PDF and EPUB 3, are provided by separate gems.
106
+ Asciidoctor also provides an out-of-the-box HTML experience complete with a {url-docs}/asciidoctor/latest/html-backend/default-stylesheet/[default stylesheet] and built-in integrations like Font Awesome (for icons), highlight.js, Rouge, and Pygments (for source highlighting), and MathJax (for STEM processing).
121
107
 
122
- Asciidoctor reads and parses text written in the AsciiDoc syntax, then feeds the parse tree to a set of built-in converters to produce HTML5, DocBook 5, and man(ual) page output.
123
- You have the option of using your own converter or loading {uri-tilt}[Tilt]-supported templates to customize the generated output or produce additional formats.
108
+ == Asciidoctor Ecosystem
124
109
 
125
- Asciidoctor is a drop-in replacement for the original AsciiDoc Python processor (`asciidoc.py`).
126
- The Asciidoctor test suite has {uri-tests}[> 2,000 tests] to ensure compatibility with the AsciiDoc syntax.
110
+ Although Asciidoctor is written in Ruby, it does not mean you need Ruby to use it.
111
+ Asciidoctor can be executed on a JVM using {url-docs}/asciidoctorj/latest/[AsciidoctorJ] or in any JavaScript environment (including the browser) using {url-docs}/asciidoctor.js/latest/[Asciidoctor.js].
127
112
 
128
- In addition to the classic AsciiDoc syntax, Asciidoctor recognizes additional markup and formatting options, such as font-based icons (e.g., `+icon:fire[]+`) and UI elements (e.g., `+button:[Save]+`).
129
- Asciidoctor also offers a modern, responsive theme based on {uri-foundation}[Foundation] to style the HTML5 output.
113
+ Installing an Asciidoctor processor is just the beginning of your publishing experience.
114
+ Asciidoctor gives you access to a ecosystem of extensions and tools, ranging from add-on converters, to extended syntax, to build plugins, to integrated writing and preview environments:
130
115
 
131
- == Where Ruby goes, Asciidoctor follows
116
+ * {url-docs}/diagram-extension/latest/[Asciidoctor Diagram]
117
+ * {url-docs}/maven-tools/latest/[Maven plugin and site module]
118
+ * {url-gradle-plugin}[Gradle plugin]
119
+ * {url-docs}/asciidoclet/latest/[Asciidoclet]
120
+ * {url-docs}/reveal.js-converter/latest/[reveal.js converter]
121
+ * {url-docs}/epub3-converter/latest/[EPUB 3 converter]
122
+ * https://intellij-asciidoc-plugin.ahus1.de/docs[IntelliJ plugin]
123
+ * {url-docs}/asciidoctor/latest/tooling/#web-browser-add-ons-preview-only[web browser extensions]
124
+ * {url-org}[and more]
132
125
 
133
- You can run Asciidoctor on the JVM using JRuby.
134
- To invoke the Asciidoctor API directly from Java and other JVM languages, use {uri-asciidoctorj}[AsciidoctorJ].
135
- There are plugins available for {uri-maven-plugin}[Apache Maven], {uri-gradle-plugin}[Gradle], and {uri-asciidoclet}[Javadoc], which allow you to integrate AsciiDoc processing directly into your build using AsciidoctorJ.
136
-
137
- Asciidoctor also runs in JavaScript.
138
- {uri-opal}[Opal] is used to transcompile the Ruby source to JavaScript to produce {uri-asciidoctorjs}[Asciidoctor.js].
139
- Asciidoctor.js is a fully-functional version of Asciidoctor that works in any JavaScript environment, such as a web browser or Node.js.
140
- It's used to power the AsciiDoc preview extensions for Chrome, Atom, Brackets and other web-based tooling.
126
+ Asciidoctor is the successor to AsciiDoc.py.
127
+ If you're using AsciiDoc.py, see {url-docs}/asciidoctor/latest/migrate/asciidoc-py/[Migrate from AsciiDoc.py] to learn how to upgrade to Asciidoctor.
141
128
 
142
129
  == Requirements
143
130
 
144
- Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {uri-ruby}[Ruby]:
131
+ Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {url-ruby}[Ruby]:
145
132
 
146
- * Ruby (MRI/CRuby 1.8.7 - 2.5)
147
- * JRuby (1.7 in Ruby 1.8 and 1.9 modes, 9000)
148
- * Rubinius 2.2.x
149
- * Opal (JavaScript)
133
+ * CRuby (aka MRI) 2.3 - 3.0
134
+ * JRuby 9.1 - 9.2
135
+ * TruffleRuby (GraalVM)
150
136
 
151
137
  [CAUTION]
152
138
  ====
@@ -162,11 +148,11 @@ Asciidoctor works best when you use UTF-8 everywhere.
162
148
 
163
149
  == Installation
164
150
 
165
- Asciidoctor can be installed using (a) package managers for popular Linux distributions, (b) Homebrew for macOS, (c) the `gem install` command (recommended for Windows users), (d) the Asciidoctor Docker image, or (e) Bundler.
166
-
167
- The benefit of using your operating system's package manager to install the gem is that it handles installing Ruby and the RubyGems library if those packages are not already installed on your machine.
151
+ Asciidoctor is packaged and distributed to RubyGems.org as a RubyGem (aka gem) named {url-rubygem}[asciidoctor^].
152
+ The asciidoctor gem can be installed on all major operating systems using Ruby packaging tools (gem or bundle).
153
+ Asciidoctor is also distributed as a Docker image, as a package for numerous Linux distributions, and as a package for macOS (via Homebrew and MacPorts).
168
154
 
169
- === (a) Linux package managers
155
+ === Linux package managers
170
156
 
171
157
  The version of Asciidoctor installed by the package manager may not match the latest release of Asciidoctor.
172
158
  Consult the package repository for your distribution to find out which version is packaged per distribution release.
@@ -178,7 +164,7 @@ Consult the package repository for your distribution to find out which version i
178
164
  * https://software.opensuse.org/package/rubygem-asciidoctor[OpenSUSE (rubygem-asciidoctor)]
179
165
  * https://packages.ubuntu.com/search?keywords=asciidoctor[Ubuntu (asciidoctor)]
180
166
 
181
- If you want to use a version of Asciidoctor that is newer than what is installed by the package manager, see the <<gem-install,gem installation instructions>>.
167
+ If you want to use a version of Asciidoctor that's newer than what is installed by the package manager, see the <<gem-install,gem installation instructions>>.
182
168
 
183
169
  ==== apk (Alpine Linux)
184
170
 
@@ -206,20 +192,33 @@ To install the package, open a terminal and type:
206
192
 
207
193
  $ sudo dnf install -y asciidoctor
208
194
 
209
- === (b) Homebrew (macOS)
195
+ === macOS
196
+
197
+ ==== Homebrew
198
+
199
+ You can use https://brew.sh[Homebrew], the macOS package manager, to install Asciidoctor.
200
+ If you don't have Homebrew on your computer, complete the https://brew.sh[installation instructions] first.
210
201
 
211
- You can use Homebrew, the macOS package manager, to install Asciidoctor.
212
- If you don’t have Homebrew on your computer, complete the installation instructions at https://brew.sh/[brew.sh] first.
213
- Once Homebrew is installed, you’re ready to install the `asciidoctor` gem.
202
+ Once Homebrew is installed, you're ready to install the `asciidoctor` gem.
214
203
  Open a terminal and type:
215
204
 
216
205
  $ brew install asciidoctor
217
206
 
218
207
  Homebrew installs the `asciidoctor` gem into an exclusive prefix that's independent of system gems.
219
208
 
220
- === (c) Windows
209
+ ==== MacPorts
221
210
 
222
- To use Asciidoctor with Windows, you have two easy options.
211
+ You can also use https://www.macports.org[MacPorts], another package manager for macOS, to install Asciidoctor.
212
+ If you don't have MacPorts on your computer, complete the https://www.macports.org/install.php[installation instructions] first.
213
+
214
+ Once MacPorts is installed, you're ready to install the `asciidoctor` gem via the https://ports.macports.org/port/asciidoctor/[Asciidoctor port].
215
+ Open a terminal and type:
216
+
217
+ $ sudo port install asciidoctor
218
+
219
+ === Windows
220
+
221
+ To use Asciidoctor with Windows, you have two options.
223
222
 
224
223
  ==== Chocolatey
225
224
 
@@ -237,13 +236,14 @@ Then follow <<gem-install,gem installation instructions>>.
237
236
  Or you use the https://rubyinstaller.org/downloads/[Rubyinstaller], download the package for your Windows Version and after the installation go ahead with <<gem-install,gem installation instructions>>.
238
237
 
239
238
  [#gem-install]
240
- === (d) gem install
239
+ === gem install
241
240
 
242
- Before installing Asciidoctor using `gem install`, you should use https://rvm.io[RVM] to install Ruby in your home directory (i.e., user space).
243
- Then, you can safely use the `gem` command to install or update the Asciidoctor gem.
241
+ Before installing Asciidoctor using `gem install`, you should set up https://rvm.io[RVM] (or similar) to install Ruby in your home directory (i.e., user space).
242
+ Then, you can safely use the `gem` command to install or update the Asciidoctor gem, or any other gem for that matter.
244
243
  When using RVM, gems are installed in a location isolated from the system.
244
+ (You should never use the gem command to install system-wide gems).
245
245
 
246
- Open a terminal and type:
246
+ Once you've installed Ruby using RVM, and you have activated it using `rvm use 3.0`, open a terminal and type:
247
247
 
248
248
  $ gem install asciidoctor
249
249
 
@@ -251,11 +251,11 @@ If you want to install a pre-release version (e.g., a release candidate), use:
251
251
 
252
252
  $ gem install asciidoctor --pre
253
253
 
254
- === (e) Docker
254
+ === Docker
255
255
 
256
- See {uri-install-docker}[Installing Asciidoctor using Docker].
256
+ See {url-install-docker}[Installing Asciidoctor using Docker].
257
257
 
258
- === (f) Bundler
258
+ === Bundler
259
259
 
260
260
  . Create a Gemfile in the root folder of your project (or the current directory)
261
261
  . Add the `asciidoctor` gem to your Gemfile as follows:
@@ -305,6 +305,13 @@ To upgrade the gem, use:
305
305
  $ brew update
306
306
  $ brew upgrade asciidoctor
307
307
 
308
+ === MacPorts (macOS)
309
+
310
+ To upgrade the gem, use:
311
+
312
+ $ sudo port selfupdate
313
+ $ sudo port upgrade asciidoctor
314
+
308
315
  === gem install
309
316
 
310
317
  If you previously installed Asciidoctor using the `gem` command, you'll need to manually upgrade Asciidoctor when a new version is released.
@@ -329,12 +336,9 @@ You should see information about the Asciidoctor version and your Ruby environme
329
336
  [.output,subs=attributes+]
330
337
  ....
331
338
  Asciidoctor {release-version} [https://asciidoctor.org]
332
- Runtime Environment (ruby 2.5.1p57 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
339
+ Runtime Environment (ruby 3.0.1p64 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
333
340
  ....
334
341
 
335
- Asciidoctor also provides an API.
336
- The API is intended for integration with other Ruby software, such as Rails, Sinatra and GitHub, and other languages, such as Java (via {uri-asciidoctorj}[AsciidoctorJ]) and JavaScript (via {uri-asciidoctorjs}[Asciidoctor.js]).
337
-
338
342
  === Command line interface (CLI)
339
343
 
340
344
  The `asciidoctor` command allows you to invoke Asciidoctor from the command line (i.e., a terminal).
@@ -352,15 +356,18 @@ For instance, to write the file to a different directory, use:
352
356
 
353
357
  $ asciidoctor -D output README.adoc
354
358
 
355
- The `asciidoctor` {uri-manpage}[man page] provides a complete reference of the command line interface.
359
+ The `asciidoctor` {url-manpage}[man page] provides a complete reference of the command line interface.
356
360
 
357
361
  Refer to the following resources to learn more about how to use the `asciidoctor` command.
358
362
 
359
- * {uri-render-doc}[How do I convert a document?]
360
- * {uri-themes-doc}[How do I use the Asciidoctor stylesheet factory to produce custom themes?]
363
+ * {url-docs}/asciidoctor/latest/cli/[Process AsciiDoc using the CLI]
364
+ * {url-docs}/asciidoctor/latest/cli/options/[CLI options]
361
365
 
362
366
  === Ruby API
363
367
 
368
+ Asciidoctor also provides an API.
369
+ The API is intended for integration with other Ruby software, such as Rails, GitHub, and GitLab, as well as other languages, such as Java (via AsciidoctorJ) and JavaScript (via Asciidoctor.js).
370
+
364
371
  To use Asciidoctor in your application, you first need to require the gem:
365
372
 
366
373
  [source]
@@ -405,10 +412,14 @@ Keep in mind that if you don't like the output Asciidoctor produces, _you can ch
405
412
  Asciidoctor supports custom converters that can handle converting from the parsed document to the generated output.
406
413
 
407
414
  One easy way to customize the output piecemeal is by using the template converter.
408
- The template converter allows you to supply a {uri-tilt}[Tilt]-supported template file to handle converting any node in the document.
415
+ The template converter allows you to supply a {url-tilt}[Tilt]-supported template file to handle converting any node in the document.
409
416
 
410
417
  However you go about it, you _can_ have 100% control over the output.
411
- For more information about how to use the API or to customize the output, refer to the {uri-user-manual}[user manual].
418
+ For more information about how to use the API or to customize the output, see:
419
+
420
+ * {url-docs}/asciidoctor/latest/api/[Process AsciiDoc using the API]
421
+ * {url-docs}/asciidoctor/latest/api/options/[API options]
422
+ * {url-docs}/asciidoctor/latest/safe-modes/[Safe modes]
412
423
 
413
424
  == Contributing
414
425
 
@@ -427,10 +438,10 @@ Here are some ways *you* can contribute:
427
438
  ** clean up inconsistent whitespace
428
439
  ** write tests!
429
440
  * by refactoring code
430
- * by fixing {uri-issues}[issues]
441
+ * by fixing {url-issues}[issues]
431
442
  * by reviewing patches
432
443
 
433
- The {uri-contribute}[Contributing] guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to the Asciidoctor Project.
444
+ The {url-contribute}[Contributing] guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to Asciidoctor.
434
445
 
435
446
  == Getting Help
436
447
 
@@ -438,35 +449,51 @@ Asciidoctor is developed to help you easily write and publish your content.
438
449
  But we can't do it without your feedback!
439
450
  We encourage you to ask questions and discuss any aspects of the project on the discussion list, on Twitter or in the chat room.
440
451
 
441
- Chat (Gitter):: image:https://badges.gitter.im/Join%20In.svg[Gitter, link=https://gitter.im/asciidoctor/asciidoctor]
442
- Discussion list (Nabble):: {uri-discuss}
443
- Twitter:: https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] hashtag or https://twitter.com/asciidoctor[@asciidoctor] mention
452
+ Chat (Zulip):: {url-chat}
453
+ Discussion list (Nabble):: {url-discuss}
454
+ Twitter:: Follow https://twitter.com/asciidoctor[@asciidoctor] or search for the https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] hashtag
444
455
 
445
456
  ifdef::env-github[]
446
457
  Further information and documentation about Asciidoctor can be found on the project's website.
447
458
 
448
- {uri-project}[Home] | {uri-news}[News] | {uri-docs}[Docs]
459
+ {url-project}[Home] | {url-news}[News] | {url-docs}[Docs]
449
460
  endif::[]
450
461
 
451
462
  The Asciidoctor organization on GitHub hosts the project's source code, issue tracker, and sub-projects.
452
463
 
453
- Source repository (git):: {uri-repo}
454
- Issue tracker:: {uri-issues}
455
- Asciidoctor organization on GitHub:: {uri-org}
464
+ Source repository (git):: {url-repo}
465
+ Issue tracker:: {url-issues}
466
+ Asciidoctor organization on GitHub:: {url-org}
467
+
468
+ == Code of Conduct
469
+
470
+ The core Asciidoctor project is governed by the https://github.com/asciidoctor/.github/blob/HEAD/CODE-OF-CONDUCT.md[Code of Conduct] for the Asciidoctor community of projects.
471
+ By participating, you're agreeing to honor this code.
472
+ Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone.
473
+
474
+ == Versioning and Release Policy
456
475
 
457
- == License
476
+ This project adheres to semantic versioning (*major.minor.patch*).
477
+ Typically, patch releases are only made for the current minor release.
478
+ However, exceptions are made on a case-by-case basis to address security vulnerabilities and other high-priority issues.
458
479
 
459
- Copyright (C) 2012-2018 Dan Allen, Sarah White and the individual contributors to Asciidoctor.
480
+ == Copyright and License
481
+
482
+ Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
460
483
  Use of this software is granted under the terms of the MIT License.
461
484
 
462
- See the {uri-license}[LICENSE] for the full license text.
485
+ See the {url-license}[LICENSE] for the full license text.
463
486
 
464
487
  == Authors
465
488
 
466
- *Asciidoctor* is led by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] and has received contributions from {uri-contributors}[many individuals] in Asciidoctor's awesome community.
467
- The project was initiated in 2012 by https://github.com/erebor[Ryan Waldron] and based on {uri-prototype}[a prototype] written by https://github.com/nickh[Nick Hengeveld].
489
+ *Asciidoctor* is led by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] and has received contributions from {url-contributors}[many individuals] in Asciidoctor's awesome community.
490
+ The project was initiated in 2012 by https://github.com/erebor[Ryan Waldron] based on a prototype written by https://github.com/nickh[Nick Hengeveld] for the Git website.
491
+
492
+ *AsciiDoc.py* was started and maintained by Stuart Rackham from https://github.com/asciidoc-py/asciidoc-py2/blob/HEAD/CHANGELOG.txt[2002 to 2013] and has received contributions from many individuals in the https://github.com/asciidoc-py/asciidoc-py2/graphs/contributors[AsciiDoc.py community].
493
+
494
+ == Trademarks
468
495
 
469
- *AsciiDoc* was started by Stuart Rackham and has received contributions from many individuals in the AsciiDoc community.
496
+ AsciiDoc(R) and AsciiDoc Language(TM) are trademarks of the Eclipse Foundation, Inc.
470
497
 
471
498
  ifndef::env-site[]
472
499
  == Changelog
@@ -475,5 +502,5 @@ ifeval::[{safe-mode-level} < 20]
475
502
  include::CHANGELOG.adoc[tag=compact,leveloffset=+1]
476
503
  endif::[]
477
504
 
478
- Refer to the {uri-changelog}[CHANGELOG] for a complete list of changes in older releases.
505
+ Refer to the {url-changelog}[CHANGELOG] for a complete list of changes in older releases.
479
506
  endif::[]
data/asciidoctor.gemspec CHANGED
@@ -1,59 +1,47 @@
1
- # encoding: UTF-8
2
1
  begin
3
- require File.expand_path '../lib/asciidoctor/version', __FILE__
2
+ require_relative 'lib/asciidoctor/version'
4
3
  rescue LoadError
5
4
  require 'asciidoctor/version'
6
5
  end
7
6
 
8
- require 'open3' unless defined? Open3
9
-
10
7
  Gem::Specification.new do |s|
11
8
  s.name = 'asciidoctor'
12
9
  s.version = Asciidoctor::VERSION
13
- s.summary = 'An implementation of the AsciiDoc text processor and publishing toolchain in Ruby'
14
- s.description = 'A fast, open source text processor and publishing toolchain, written in Ruby, for converting AsciiDoc content to HTML5, DocBook 5 (or 4.5) and other formats.'
10
+ s.summary = 'An implementation of the AsciiDoc text processor and publishing toolchain'
11
+ s.description = 'A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.'
15
12
  s.authors = ['Dan Allen', 'Sarah White', 'Ryan Waldron', 'Jason Porter', 'Nick Hengeveld', 'Jeremy McAnally']
16
13
  s.email = ['dan.j.allen@gmail.com']
17
- s.homepage = 'http://asciidoctor.org'
14
+ s.homepage = 'https://asciidoctor.org'
18
15
  s.license = 'MIT'
16
+ # NOTE required ruby version is informational only; it's not enforced since it can't be overridden and can cause builds to break
17
+ #s.required_ruby_version = '>= 2.3.0'
19
18
  s.metadata = {
20
19
  'bug_tracker_uri' => 'https://github.com/asciidoctor/asciidoctor/issues',
21
- 'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/master/CHANGELOG.adoc',
20
+ 'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/HEAD/CHANGELOG.adoc',
22
21
  'mailing_list_uri' => 'http://discuss.asciidoctor.org',
23
22
  'source_code_uri' => 'https://github.com/asciidoctor/asciidoctor'
24
23
  }
25
24
 
26
25
  # NOTE the logic to build the list of files is designed to produce a usable package even when the git command is not available
27
- files = begin
28
- # NOTE popen3 is used instead of backticks to fail properly when used with JRuby
29
- (result = Open3.popen3('git ls-files -z') {|_, out| out.read }.split %(\0)).empty? ? Dir['**/*'] : result
26
+ begin
27
+ files = (result = `git ls-files -z`.split ?\0).empty? ? Dir['**/*'] : result
30
28
  rescue
31
- Dir['**/*']
29
+ files = Dir['**/*']
32
30
  end
33
- s.files = files.grep %r/^(?:(?:data|lib|man)\/.+|Gemfile|Rakefile|LICENSE|(?:CHANGELOG|CONTRIBUTING|README(?:-\w+)?)\.adoc|#{s.name}\.gemspec)$/
31
+ s.files = files.grep %r/^(?:(?:data|lib|man)\/.+|LICENSE|(?:CHANGELOG|README(?:-\w+)?)\.adoc|\.yardopts|#{s.name}\.gemspec)$/
34
32
  s.executables = (files.grep %r/^bin\//).map {|f| File.basename f }
35
33
  s.require_paths = ['lib']
36
- s.test_files = files.grep %r/^(?:(?:features|test)\/.+)$/
37
- s.rdoc_options = ['--charset=UTF-8']
38
- s.extra_rdoc_files = ['CHANGELOG.adoc', 'CONTRIBUTING.adoc', 'LICENSE']
34
+ #s.test_files = files.grep %r/^(?:features|test)\/.+$/
39
35
 
40
- # asciimath is needed for testing AsciiMath in DocBook backend
41
- s.add_development_dependency 'asciimath', '~> 1.0.0'
42
- # coderay is needed for testing syntax highlighting
43
- s.add_development_dependency 'coderay', '~> 1.1.0'
44
- s.add_development_dependency 'cucumber', '~> 2.4.0'
45
- # erubis is needed for testing use of alternative eRuby impls
46
- s.add_development_dependency 'erubis', '~> 2.7.0'
47
- # haml is needed for testing custom templates
48
- s.add_development_dependency 'haml', '~> 5.0.0'
49
- s.add_development_dependency 'nokogiri', '~> 1.8.5'
50
- s.add_development_dependency 'rake', '~> 10.0.0'
51
- s.add_development_dependency 'rspec-expectations', '~> 2.14.0'
52
- # slim is needed for testing custom templates
53
- s.add_development_dependency 'slim', '~> 4.0.0'
54
- # concurrent-ruby is defined in Gemfile due to enforcement of minimum required Ruby version
55
- #s.add_development_dependency 'concurrent-ruby', '~> 1.0.0'
56
- # tilt is needed for testing custom templates
36
+ # concurrent-ruby, haml, slim, and tilt are needed for testing custom templates
37
+ s.add_development_dependency 'concurrent-ruby', '~> 1.1.0'
38
+ s.add_development_dependency 'cucumber', '~> 3.1.0'
39
+ # erubi is needed for testing alternate eRuby impls
40
+ s.add_development_dependency 'erubi', '~> 1.10.0'
41
+ s.add_development_dependency 'haml', '~> 5.2.0'
42
+ s.add_development_dependency 'minitest', '~> 5.14.0'
43
+ s.add_development_dependency 'nokogiri', '~> 1.10.0'
44
+ s.add_development_dependency 'rake', '~> 12.3.0'
45
+ s.add_development_dependency 'slim', '~> 4.1.0'
57
46
  s.add_development_dependency 'tilt', '~> 2.0.0'
58
- s.add_development_dependency 'minitest', '~> 5.3.0'
59
47
  end
data/bin/asciidoctor CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require 'rubygems' unless defined? Gem
4
-
5
- if File.exist?(asciidoctor = (File.expand_path '../../lib/asciidoctor', __FILE__))
4
+ asciidoctor = File.absolute_path '../lib/asciidoctor.rb', __dir__
5
+ if File.exist? asciidoctor
6
6
  require asciidoctor
7
+ require File.join Asciidoctor::LIB_DIR, 'asciidoctor/cli'
7
8
  else
8
9
  require 'asciidoctor'
10
+ require 'asciidoctor/cli'
9
11
  end
10
- require 'asciidoctor/cli'
11
12
 
12
13
  invoker = Asciidoctor::Cli::Invoker.new ARGV
13
14
  GC.start
@@ -2,8 +2,8 @@
2
2
  :appendix-caption: ملحق
3
3
  :appendix-refsig: {appendix-caption}
4
4
  :caution-caption: تنبيه
5
- //:chapter-label: ???
6
- //:chapter-refsig: {chapter-label}
5
+ //:chapter-signifier: ???
6
+ //:chapter-refsig: {chapter-signifier}
7
7
  :example-caption: مثال
8
8
  :figure-caption: الشكل
9
9
  :important-caption: مهم
@@ -11,7 +11,8 @@
11
11
  ifdef::listing-caption[:listing-caption: قائمة]
12
12
  ifdef::manname-title[:manname-title: اسم]
13
13
  :note-caption: ملاحظة
14
- //:part-refsig: ???
14
+ //:part-signifier: ???
15
+ //:part-refsig: {part-signifier}
15
16
  ifdef::preface-title[:preface-title: تمهيد]
16
17
  //:section-refsig: ???
17
18
  :table-caption: جدول