asciidoctor 2.0.10 → 2.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +294 -30
  3. data/LICENSE +1 -1
  4. data/README-de.adoc +16 -20
  5. data/README-fr.adoc +15 -22
  6. data/README-jp.adoc +15 -26
  7. data/README-zh_CN.adoc +21 -25
  8. data/README.adoc +161 -138
  9. data/asciidoctor.gemspec +6 -13
  10. data/data/locale/attributes-ar.adoc +4 -3
  11. data/data/locale/attributes-be.adoc +23 -0
  12. data/data/locale/attributes-bg.adoc +4 -3
  13. data/data/locale/attributes-ca.adoc +6 -5
  14. data/data/locale/attributes-cs.adoc +4 -3
  15. data/data/locale/attributes-da.adoc +6 -5
  16. data/data/locale/attributes-de.adoc +4 -4
  17. data/data/locale/attributes-en.adoc +4 -4
  18. data/data/locale/attributes-es.adoc +6 -5
  19. data/data/locale/attributes-fa.adoc +4 -3
  20. data/data/locale/attributes-fi.adoc +4 -3
  21. data/data/locale/attributes-fr.adoc +8 -7
  22. data/data/locale/attributes-hu.adoc +4 -3
  23. data/data/locale/attributes-id.adoc +4 -3
  24. data/data/locale/attributes-it.adoc +6 -5
  25. data/data/locale/attributes-ja.adoc +4 -3
  26. data/data/locale/{attributes-kr.adoc → attributes-ko.adoc} +4 -3
  27. data/data/locale/attributes-nb.adoc +4 -3
  28. data/data/locale/attributes-nl.adoc +6 -5
  29. data/data/locale/attributes-nn.adoc +4 -3
  30. data/data/locale/attributes-pl.adoc +8 -7
  31. data/data/locale/attributes-pt.adoc +6 -5
  32. data/data/locale/attributes-pt_BR.adoc +6 -5
  33. data/data/locale/attributes-ro.adoc +4 -3
  34. data/data/locale/attributes-ru.adoc +6 -5
  35. data/data/locale/attributes-sr.adoc +4 -4
  36. data/data/locale/attributes-sr_Latn.adoc +4 -4
  37. data/data/locale/attributes-sv.adoc +4 -4
  38. data/data/locale/attributes-th.adoc +23 -0
  39. data/data/locale/attributes-tr.adoc +4 -3
  40. data/data/locale/attributes-uk.adoc +6 -5
  41. data/data/locale/attributes-vi.adoc +23 -0
  42. data/data/locale/attributes-zh_CN.adoc +4 -3
  43. data/data/locale/attributes-zh_TW.adoc +4 -3
  44. data/data/reference/syntax.adoc +14 -7
  45. data/data/stylesheets/asciidoctor-default.css +76 -76
  46. data/data/stylesheets/coderay-asciidoctor.css +9 -9
  47. data/lib/asciidoctor/abstract_block.rb +20 -13
  48. data/lib/asciidoctor/abstract_node.rb +23 -12
  49. data/lib/asciidoctor/attribute_list.rb +64 -72
  50. data/lib/asciidoctor/block.rb +6 -6
  51. data/lib/asciidoctor/cli/invoker.rb +3 -2
  52. data/lib/asciidoctor/cli/options.rb +32 -31
  53. data/lib/asciidoctor/convert.rb +168 -162
  54. data/lib/asciidoctor/converter/docbook5.rb +49 -34
  55. data/lib/asciidoctor/converter/html5.rb +180 -139
  56. data/lib/asciidoctor/converter/manpage.rb +118 -90
  57. data/lib/asciidoctor/converter/template.rb +15 -13
  58. data/lib/asciidoctor/converter.rb +19 -16
  59. data/lib/asciidoctor/core_ext/hash/merge.rb +1 -1
  60. data/lib/asciidoctor/document.rb +77 -86
  61. data/lib/asciidoctor/extensions.rb +22 -16
  62. data/lib/asciidoctor/helpers.rb +20 -15
  63. data/lib/asciidoctor/list.rb +2 -6
  64. data/lib/asciidoctor/load.rb +103 -101
  65. data/lib/asciidoctor/logging.rb +10 -8
  66. data/lib/asciidoctor/parser.rb +211 -220
  67. data/lib/asciidoctor/path_resolver.rb +17 -15
  68. data/lib/asciidoctor/reader.rb +87 -79
  69. data/lib/asciidoctor/rx.rb +9 -7
  70. data/lib/asciidoctor/section.rb +7 -0
  71. data/lib/asciidoctor/substitutors.rb +167 -148
  72. data/lib/asciidoctor/syntax_highlighter/coderay.rb +3 -2
  73. data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +13 -5
  74. data/lib/asciidoctor/syntax_highlighter/prettify.rb +7 -4
  75. data/lib/asciidoctor/syntax_highlighter/pygments.rb +19 -11
  76. data/lib/asciidoctor/syntax_highlighter/rouge.rb +35 -20
  77. data/lib/asciidoctor/syntax_highlighter.rb +16 -16
  78. data/lib/asciidoctor/table.rb +70 -43
  79. data/lib/asciidoctor/timings.rb +3 -3
  80. data/lib/asciidoctor/version.rb +1 -1
  81. data/lib/asciidoctor.rb +45 -19
  82. data/man/asciidoctor.1 +29 -31
  83. data/man/asciidoctor.adoc +35 -29
  84. metadata +17 -70
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
- v2.0.10, 2019-05-31
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 @@ v2.0.10, 2019-05-31
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,140 +16,123 @@ ifdef::env-github[]
17
16
  :warning-caption: :warning:
18
17
  endif::[]
19
18
  // Variables:
20
- :release-version: 2.0.10
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
- :uri-gem: https://rubygems.org/gems/asciidoctor
31
- ifdef::env-site[:uri-project: link:]
32
- :uri-docs: {uri-project}/docs
33
- :uri-news: {uri-project}/news
34
- :uri-manpage: {uri-project}/man/asciidoctor
35
- :uri-issues: {uri-repo}/issues
36
- :uri-contributors: {uri-repo}/graphs/contributors
37
- :uri-rel-file-base: link:
38
- :uri-rel-tree-base: link:
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:
39
37
  ifdef::env-site,env-yard[]
40
- :uri-rel-file-base: {uri-repo}/blob/master/
41
- :uri-rel-tree-base: {uri-repo}/tree/master/
38
+ :url-rel-file-base: {url-repo}/blob/HEAD/
39
+ :url-rel-tree-base: {url-repo}/tree/HEAD/
42
40
  endif::[]
43
- :uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
44
- :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
45
- :uri-license: {uri-rel-file-base}LICENSE
46
- :uri-tests: {uri-rel-tree-base}test
47
- :uri-discuss: http://discuss.asciidoctor.org
48
- :uri-irc: irc://irc.freenode.org/#asciidoctor
49
- :uri-rubygem: https://rubygems.org/gems/asciidoctor
50
- :uri-what-is-asciidoc: {uri-docs}/what-is-asciidoc
51
- :uri-user-manual: {uri-docs}/user-manual
52
- :uri-install-docker: https://github.com/asciidoctor/docker-asciidoctor
53
- //:uri-install-doc: {uri-docs}/install-toolchain
54
- :uri-install-macos-doc: {uri-docs}/install-asciidoctor-macos
55
- :uri-convert-doc: {uri-docs}/convert-documents
56
- :uri-themes-doc: {uri-docs}/produce-custom-themes-using-asciidoctor-stylesheet-factory
57
- :uri-gitscm-repo: https://github.com/git/git-scm.com
58
- :uri-prototype: {uri-gitscm-repo}/commits/master/lib/asciidoc.rb
59
- :uri-freesoftware: https://www.gnu.org/philosophy/free-sw.html
60
- :uri-foundation: https://foundation.zurb.com
61
- :uri-opal: https://opalrb.com
62
- :uri-tilt: https://github.com/rtomayko/tilt
63
- :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
64
53
  // images:
65
- :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
66
55
 
67
- {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.
68
- Asciidoctor is written in Ruby and runs on all major operating systems.
69
- 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.
70
57
 
71
- To simplify installation, Asciidoctor is packaged and distributed as a RubyGem (aka gem) to {uri-rubygem}[RubyGems.org].
72
- It's also distributed as a package for popular Linux distributions and macOS.
73
- In addition to running on Ruby, Asciidoctor can be executed on a JVM using {uri-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment (including the browser) using {uri-asciidoctorjs}[Asciidoctor.js].
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].
74
62
 
75
63
  ifndef::env-site,env-yard[]
76
64
  This document is also available in the following languages: +
77
- {uri-rel-file-base}README-zh_CN.adoc[汉语]
65
+ {url-rel-file-base}README-zh_CN.adoc[汉语]
78
66
  |
79
- {uri-rel-file-base}README-de.adoc[Deutsch]
67
+ {url-rel-file-base}README-de.adoc[Deutsch]
80
68
  |
81
- {uri-rel-file-base}README-fr.adoc[Français]
69
+ {url-rel-file-base}README-fr.adoc[Français]
82
70
  |
83
- {uri-rel-file-base}README-jp.adoc[日本語]
71
+ {url-rel-file-base}README-jp.adoc[日本語]
84
72
  endif::[]
85
73
 
86
74
  .Key documentation
87
75
  [.compact]
88
- * {uri-docs}/what-is-asciidoc[What is AsciiDoc?]
89
- * {uri-docs}/asciidoc-writers-guide[AsciiDoc Writer's Guide]
90
- * {uri-docs}/user-manual[Asciidoctor User Manual]
91
- * {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]
92
79
 
93
80
  ifdef::status[]
94
- //.*Project health*
95
- image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={uri-gem}]
81
+ image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={url-rubygem}]
96
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}]
97
- image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI),link=https://travis-ci.org/asciidoctor/asciidoctor]
98
- 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]
99
- //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status,link=https://coveralls.io/r/asciidoctor/asciidoctor]
100
- //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate,link=https://codeclimate.com/github/asciidoctor/asciidoctor]
101
- image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
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}]
102
85
  endif::[]
103
86
 
104
87
  == Sponsors
105
88
 
106
- We want to recognize our {uri-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
89
+ We want to recognize our {url-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
107
90
  Thank you sponsors!
108
91
  Without your generous support, Asciidoctor would not be possible.
109
92
 
110
- ifndef::env-site,env-yard[]
111
- Major funding for Asciidoctor is provided by our *Change Maker*, https://opendevise.com[OpenDevise], our *Strategy Sponsors*, https://www.khronos.org/[Khronos Group] and Linda Roberts, and our *Pull Request Backers*, Brian Dominick, Guillaume Grossetie, and Abel Salgado Romero.
112
- Additional funding is provided by the supporters listed on our {uri-project}/supporters[Community Backers] page.
113
- endif::[]
114
-
115
93
  You can support this project by becoming a sponsor through https://opencollective.com/asciidoctor[OpenCollective].
116
94
 
117
- == The Big Picture
95
+ == AsciiDoc Processing and Built-in Converters
118
96
 
119
- 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.
120
- Asciidoctor applies a default stylesheet to the HTML5 document to provide a pleasant out-of-the-box experience.
97
+ AsciiDoc is the language. +
98
+ Asciidoctor is the processor.
121
99
 
122
- image::{image-uri-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
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.
123
101
 
124
- == AsciiDoc Processing
102
+ image::{image-url-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
125
103
 
126
- 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.
127
- 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.
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).
128
107
 
129
- Asciidoctor is a drop-in replacement for its predecessor, AsciiDoc Python (`asciidoc.py`).
130
- The Asciidoctor test suite has {uri-tests}[> 2,350 tests] to ensure compatibility with the AsciiDoc syntax.
108
+ == Asciidoctor Ecosystem
131
109
 
132
- 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]+`).
133
- Asciidoctor also offers a modern, responsive theme based on {uri-foundation}[Foundation] to style the HTML5 output.
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].
134
112
 
135
- == Where Ruby goes, Asciidoctor follows
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:
136
115
 
137
- You can run Asciidoctor on the JVM using JRuby.
138
- To invoke the Asciidoctor API directly from Java and other JVM languages, use {uri-asciidoctorj}[AsciidoctorJ].
139
- 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.
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]
140
125
 
141
- Asciidoctor also runs in JavaScript.
142
- {uri-opal}[Opal] is used to transcompile the Ruby source to JavaScript to produce {uri-asciidoctorjs}[Asciidoctor.js].
143
- Asciidoctor.js is a fully-functional version of Asciidoctor that works in any JavaScript environment, such as a web browser or Node.js.
144
- 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.
145
128
 
146
129
  == Requirements
147
130
 
148
- 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]:
149
132
 
150
- * CRuby (aka MRI) 2.3 - 2.6
133
+ * CRuby (aka MRI) 2.3 - 3.0
151
134
  * JRuby 9.1 - 9.2
152
135
  * TruffleRuby (GraalVM)
153
- * Opal (JavaScript)
154
136
 
155
137
  [CAUTION]
156
138
  ====
@@ -166,11 +148,11 @@ Asciidoctor works best when you use UTF-8 everywhere.
166
148
 
167
149
  == Installation
168
150
 
169
- 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.
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).
170
154
 
171
- 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.
172
-
173
- === (a) Linux package managers
155
+ === Linux package managers
174
156
 
175
157
  The version of Asciidoctor installed by the package manager may not match the latest release of Asciidoctor.
176
158
  Consult the package repository for your distribution to find out which version is packaged per distribution release.
@@ -182,7 +164,7 @@ Consult the package repository for your distribution to find out which version i
182
164
  * https://software.opensuse.org/package/rubygem-asciidoctor[OpenSUSE (rubygem-asciidoctor)]
183
165
  * https://packages.ubuntu.com/search?keywords=asciidoctor[Ubuntu (asciidoctor)]
184
166
 
185
- 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>>.
186
168
 
187
169
  ==== apk (Alpine Linux)
188
170
 
@@ -210,20 +192,33 @@ To install the package, open a terminal and type:
210
192
 
211
193
  $ sudo dnf install -y asciidoctor
212
194
 
213
- === (b) Homebrew (macOS)
195
+ === macOS
196
+
197
+ ==== Homebrew
214
198
 
215
- You can use Homebrew, the macOS package manager, to install Asciidoctor.
216
- If you dont have Homebrew on your computer, complete the installation instructions at https://brew.sh/[brew.sh] first.
217
- Once Homebrew is installed, you’re ready to install the `asciidoctor` gem.
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.
201
+
202
+ Once Homebrew is installed, you're ready to install the `asciidoctor` gem.
218
203
  Open a terminal and type:
219
204
 
220
205
  $ brew install asciidoctor
221
206
 
222
207
  Homebrew installs the `asciidoctor` gem into an exclusive prefix that's independent of system gems.
223
208
 
224
- === (c) Windows
209
+ ==== MacPorts
225
210
 
226
- 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.
227
222
 
228
223
  ==== Chocolatey
229
224
 
@@ -241,13 +236,14 @@ Then follow <<gem-install,gem installation instructions>>.
241
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>>.
242
237
 
243
238
  [#gem-install]
244
- === (d) gem install
239
+ === gem install
245
240
 
246
- Before installing Asciidoctor using `gem install`, you should use https://rvm.io[RVM] to install Ruby in your home directory (i.e., user space).
247
- 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.
248
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).
249
245
 
250
- 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:
251
247
 
252
248
  $ gem install asciidoctor
253
249
 
@@ -255,11 +251,11 @@ If you want to install a pre-release version (e.g., a release candidate), use:
255
251
 
256
252
  $ gem install asciidoctor --pre
257
253
 
258
- === (e) Docker
254
+ === Docker
259
255
 
260
- See {uri-install-docker}[Installing Asciidoctor using Docker].
256
+ See {url-install-docker}[Installing Asciidoctor using Docker].
261
257
 
262
- === (f) Bundler
258
+ === Bundler
263
259
 
264
260
  . Create a Gemfile in the root folder of your project (or the current directory)
265
261
  . Add the `asciidoctor` gem to your Gemfile as follows:
@@ -309,6 +305,13 @@ To upgrade the gem, use:
309
305
  $ brew update
310
306
  $ brew upgrade asciidoctor
311
307
 
308
+ === MacPorts (macOS)
309
+
310
+ To upgrade the gem, use:
311
+
312
+ $ sudo port selfupdate
313
+ $ sudo port upgrade asciidoctor
314
+
312
315
  === gem install
313
316
 
314
317
  If you previously installed Asciidoctor using the `gem` command, you'll need to manually upgrade Asciidoctor when a new version is released.
@@ -333,12 +336,9 @@ You should see information about the Asciidoctor version and your Ruby environme
333
336
  [.output,subs=attributes+]
334
337
  ....
335
338
  Asciidoctor {release-version} [https://asciidoctor.org]
336
- Runtime Environment (ruby 2.6.0p0 [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)
337
340
  ....
338
341
 
339
- Asciidoctor also provides an API.
340
- 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]).
341
-
342
342
  === Command line interface (CLI)
343
343
 
344
344
  The `asciidoctor` command allows you to invoke Asciidoctor from the command line (i.e., a terminal).
@@ -356,15 +356,18 @@ For instance, to write the file to a different directory, use:
356
356
 
357
357
  $ asciidoctor -D output README.adoc
358
358
 
359
- 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.
360
360
 
361
361
  Refer to the following resources to learn more about how to use the `asciidoctor` command.
362
362
 
363
- * {uri-convert-doc}[How do I convert a document?]
364
- * {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]
365
365
 
366
366
  === Ruby API
367
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
+
368
371
  To use Asciidoctor in your application, you first need to require the gem:
369
372
 
370
373
  [source]
@@ -409,10 +412,14 @@ Keep in mind that if you don't like the output Asciidoctor produces, _you can ch
409
412
  Asciidoctor supports custom converters that can handle converting from the parsed document to the generated output.
410
413
 
411
414
  One easy way to customize the output piecemeal is by using the template converter.
412
- 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.
413
416
 
414
417
  However you go about it, you _can_ have 100% control over the output.
415
- 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]
416
423
 
417
424
  == Contributing
418
425
 
@@ -431,10 +438,10 @@ Here are some ways *you* can contribute:
431
438
  ** clean up inconsistent whitespace
432
439
  ** write tests!
433
440
  * by refactoring code
434
- * by fixing {uri-issues}[issues]
441
+ * by fixing {url-issues}[issues]
435
442
  * by reviewing patches
436
443
 
437
- 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.
438
445
 
439
446
  == Getting Help
440
447
 
@@ -442,35 +449,51 @@ Asciidoctor is developed to help you easily write and publish your content.
442
449
  But we can't do it without your feedback!
443
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.
444
451
 
445
- Chat (Gitter):: image:https://badges.gitter.im/Join%20In.svg[Gitter, link=https://gitter.im/asciidoctor/asciidoctor]
446
- Discussion list (Nabble):: {uri-discuss}
447
- 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
448
455
 
449
456
  ifdef::env-github[]
450
457
  Further information and documentation about Asciidoctor can be found on the project's website.
451
458
 
452
- {uri-project}[Home] | {uri-news}[News] | {uri-docs}[Docs]
459
+ {url-project}[Home] | {url-news}[News] | {url-docs}[Docs]
453
460
  endif::[]
454
461
 
455
462
  The Asciidoctor organization on GitHub hosts the project's source code, issue tracker, and sub-projects.
456
463
 
457
- Source repository (git):: {uri-repo}
458
- Issue tracker:: {uri-issues}
459
- 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
460
475
 
461
- == 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.
462
479
 
463
- Copyright (C) 2012-2019 Dan Allen, Sarah White, Ryan Waldron, 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.
464
483
  Use of this software is granted under the terms of the MIT License.
465
484
 
466
- See the {uri-license}[LICENSE] for the full license text.
485
+ See the {url-license}[LICENSE] for the full license text.
467
486
 
468
487
  == Authors
469
488
 
470
- *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.
471
- 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
472
495
 
473
- *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.
474
497
 
475
498
  ifndef::env-site[]
476
499
  == Changelog
@@ -479,5 +502,5 @@ ifeval::[{safe-mode-level} < 20]
479
502
  include::CHANGELOG.adoc[tag=compact,leveloffset=+1]
480
503
  endif::[]
481
504
 
482
- 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.
483
506
  endif::[]
data/asciidoctor.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  #s.required_ruby_version = '>= 2.3.0'
18
18
  s.metadata = {
19
19
  'bug_tracker_uri' => 'https://github.com/asciidoctor/asciidoctor/issues',
20
- 'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/master/CHANGELOG.adoc',
20
+ 'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/HEAD/CHANGELOG.adoc',
21
21
  'mailing_list_uri' => 'http://discuss.asciidoctor.org',
22
22
  'source_code_uri' => 'https://github.com/asciidoctor/asciidoctor'
23
23
  }
@@ -33,22 +33,15 @@ Gem::Specification.new do |s|
33
33
  s.require_paths = ['lib']
34
34
  #s.test_files = files.grep %r/^(?:features|test)\/.+$/
35
35
 
36
- # asciimath is needed for testing AsciiMath in DocBook backend
37
- s.add_development_dependency 'asciimath', '~> 1.0.0'
38
- # coderay is needed for testing syntax highlighting
39
- s.add_development_dependency 'coderay', '~> 1.1.0'
40
36
  # concurrent-ruby, haml, slim, and tilt are needed for testing custom templates
41
37
  s.add_development_dependency 'concurrent-ruby', '~> 1.1.0'
42
38
  s.add_development_dependency 'cucumber', '~> 3.1.0'
43
- # erubis is needed for testing alternate eRuby impls
44
- s.add_development_dependency 'erubis', '~> 2.7.0'
45
- s.add_development_dependency 'haml', '~> 5.0.0'
46
- s.add_development_dependency 'minitest', '~> 5.11.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'
47
43
  s.add_development_dependency 'nokogiri', '~> 1.10.0'
48
44
  s.add_development_dependency 'rake', '~> 12.3.0'
49
- # Asciidoctor supports Rouge >= 2
50
- s.add_development_dependency 'rouge', '~> 3.3.0'
51
- s.add_development_dependency 'rspec-expectations', '~> 3.8.0'
52
- s.add_development_dependency 'slim', '~> 4.0.0'
45
+ s.add_development_dependency 'slim', '~> 4.1.0'
53
46
  s.add_development_dependency 'tilt', '~> 2.0.0'
54
47
  end
@@ -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: جدول
@@ -0,0 +1,23 @@
1
+ // Belarusian translation, courtesy of Dexter Morganov <dexter.morganov@gmail.com>
2
+ :appendix-caption: Дадатак
3
+ :appendix-refsig: {appendix-caption}
4
+ :caution-caption: Увага
5
+ :chapter-signifier: Глава
6
+ :chapter-refsig: {chapter-signifier}
7
+ :example-caption: Прыклад
8
+ :figure-caption: Малюнак
9
+ :important-caption: Важна
10
+ :last-update-label: Апошняе абнаўленне
11
+ ifdef::listing-caption[:listing-caption: Лістынг]
12
+ ifdef::manname-title[:manname-title: Назва]
13
+ :note-caption: Заўвага
14
+ :part-signifier: Частка
15
+ :part-refsig: {part-signifier}
16
+ ifdef::preface-title[:preface-title: Прадмова]
17
+ :section-refsig: Раздзел
18
+ :table-caption: Табліца
19
+ :tip-caption: Падказка
20
+ :toc-title: Змест
21
+ :untitled-label: Без назвы
22
+ :version-label: Версія
23
+ :warning-caption: Папярэджанне
@@ -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: Таблица
@@ -1,9 +1,9 @@
1
1
  // Catalan translation, courtesy of Abel Salgado Romero <abelromero@gmail.com> and Alex Soto
2
- :appendix-caption: Apendix
2
+ :appendix-caption: Apèndix
3
3
  :appendix-refsig: {appendix-caption}
4
4
  :caution-caption: Atenció
5
- //:chapter-label: ???
6
- //:chapter-refsig: {chapter-label}
5
+ :chapter-signifier: Capítol
6
+ :chapter-refsig: {chapter-signifier}
7
7
  :example-caption: Exemple
8
8
  :figure-caption: Figura
9
9
  :important-caption: Important
@@ -11,9 +11,10 @@
11
11
  ifdef::listing-caption[:listing-caption: Llista]
12
12
  ifdef::manname-title[:manname-title: Nom]
13
13
  :note-caption: Nota
14
- //:part-refsig: ???
14
+ :part-signifier: Part
15
+ :part-refsig: {part-signifier}
15
16
  ifdef::preface-title[:preface-title: Prefaci]
16
- //:section-refsig: ???
17
+ :section-refsig: Secció
17
18
  :table-caption: Taula
18
19
  :tip-caption: Suggeriment
19
20
  :toc-title: Índex
@@ -2,8 +2,8 @@
2
2
  :appendix-caption: Příloha
3
3
  :appendix-refsig: {appendix-caption}
4
4
  :caution-caption: Upozornění
5
- :chapter-label: Kapitola
6
- :chapter-refsig: {chapter-label}
5
+ :chapter-signifier: Kapitola
6
+ :chapter-refsig: {chapter-signifier}
7
7
  :example-caption: Příklad
8
8
  :figure-caption: Obrázek
9
9
  :important-caption: Důležité
@@ -11,7 +11,8 @@
11
11
  ifdef::listing-caption[:listing-caption: Seznam]
12
12
  ifdef::manname-title[:manname-title: Název]
13
13
  :note-caption: Poznámka
14
- :part-refsig: Část
14
+ :part-signifier: Část
15
+ :part-refsig: {part-signifier}
15
16
  ifdef::preface-title[:preface-title: Úvod]
16
17
  :section-refsig: Oddíl
17
18
  :table-caption: Tabulka