asciidoctor 1.5.8 → 2.0.0.rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +162 -17
  3. data/LICENSE +1 -1
  4. data/README-de.adoc +12 -13
  5. data/README-fr.adoc +11 -12
  6. data/README-jp.adoc +11 -12
  7. data/README-zh_CN.adoc +12 -13
  8. data/README.adoc +6 -7
  9. data/asciidoctor.gemspec +19 -24
  10. data/bin/asciidoctor +5 -4
  11. data/data/reference/syntax.adoc +283 -0
  12. data/data/stylesheets/asciidoctor-default.css +56 -52
  13. data/data/stylesheets/coderay-asciidoctor.css +7 -9
  14. data/lib/asciidoctor.rb +171 -232
  15. data/lib/asciidoctor/abstract_block.rb +96 -105
  16. data/lib/asciidoctor/abstract_node.rb +118 -139
  17. data/lib/asciidoctor/attribute_list.rb +10 -14
  18. data/lib/asciidoctor/block.rb +20 -19
  19. data/lib/asciidoctor/callouts.rb +4 -2
  20. data/lib/asciidoctor/cli.rb +3 -2
  21. data/lib/asciidoctor/cli/invoker.rb +14 -21
  22. data/lib/asciidoctor/cli/options.rb +64 -54
  23. data/lib/asciidoctor/converter.rb +357 -185
  24. data/lib/asciidoctor/converter/composite.rb +40 -48
  25. data/lib/asciidoctor/converter/docbook5.rb +604 -640
  26. data/lib/asciidoctor/converter/html5.rb +949 -963
  27. data/lib/asciidoctor/converter/manpage.rb +569 -548
  28. data/lib/asciidoctor/converter/template.rb +231 -272
  29. data/lib/asciidoctor/core_ext.rb +5 -18
  30. data/lib/asciidoctor/core_ext/float/truncate.rb +19 -0
  31. data/lib/asciidoctor/core_ext/match_data/names.rb +7 -0
  32. data/lib/asciidoctor/core_ext/nil_or_empty.rb +1 -0
  33. data/lib/asciidoctor/core_ext/regexp/is_match.rb +4 -2
  34. data/lib/asciidoctor/document.rb +399 -377
  35. data/lib/asciidoctor/extensions.rb +72 -140
  36. data/lib/asciidoctor/helpers.rb +122 -83
  37. data/lib/asciidoctor/inline.rb +5 -1
  38. data/lib/asciidoctor/list.rb +13 -11
  39. data/lib/asciidoctor/logging.rb +17 -16
  40. data/lib/asciidoctor/parser.rb +390 -423
  41. data/lib/asciidoctor/path_resolver.rb +10 -5
  42. data/lib/asciidoctor/reader.rb +286 -263
  43. data/lib/asciidoctor/rouge_ext.rb +39 -0
  44. data/lib/asciidoctor/section.rb +9 -8
  45. data/lib/asciidoctor/stylesheets.rb +19 -37
  46. data/lib/asciidoctor/substitutors.rb +364 -509
  47. data/lib/asciidoctor/syntax_highlighter.rb +238 -0
  48. data/lib/asciidoctor/syntax_highlighter/coderay.rb +87 -0
  49. data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +26 -0
  50. data/lib/asciidoctor/syntax_highlighter/html_pipeline.rb +10 -0
  51. data/lib/asciidoctor/syntax_highlighter/prettify.rb +27 -0
  52. data/lib/asciidoctor/syntax_highlighter/pygments.rb +149 -0
  53. data/lib/asciidoctor/syntax_highlighter/rouge.rb +129 -0
  54. data/lib/asciidoctor/table.rb +73 -66
  55. data/lib/asciidoctor/timings.rb +4 -2
  56. data/lib/asciidoctor/version.rb +2 -1
  57. data/lib/asciidoctor/writer.rb +30 -0
  58. data/man/asciidoctor.1 +19 -15
  59. data/man/asciidoctor.adoc +14 -12
  60. metadata +69 -216
  61. data/CONTRIBUTING.adoc +0 -185
  62. data/Gemfile +0 -60
  63. data/Rakefile +0 -129
  64. data/bin/asciidoctor-safe +0 -15
  65. data/features/open_block.feature +0 -92
  66. data/features/pass_block.feature +0 -66
  67. data/features/step_definitions.rb +0 -49
  68. data/features/text_formatting.feature +0 -57
  69. data/features/xref.feature +0 -1039
  70. data/lib/asciidoctor/converter/base.rb +0 -59
  71. data/lib/asciidoctor/converter/docbook45.rb +0 -93
  72. data/lib/asciidoctor/converter/factory.rb +0 -226
  73. data/lib/asciidoctor/core_ext/1.8.7/base64/strict_encode64.rb +0 -6
  74. data/lib/asciidoctor/core_ext/1.8.7/concurrent/hash.rb +0 -5
  75. data/lib/asciidoctor/core_ext/1.8.7/hash/key.rb +0 -4
  76. data/lib/asciidoctor/core_ext/1.8.7/io/binread.rb +0 -6
  77. data/lib/asciidoctor/core_ext/1.8.7/io/write.rb +0 -5
  78. data/lib/asciidoctor/core_ext/1.8.7/string/chr.rb +0 -6
  79. data/lib/asciidoctor/core_ext/1.8.7/string/limit_bytesize.rb +0 -29
  80. data/lib/asciidoctor/core_ext/1.8.7/symbol/empty.rb +0 -6
  81. data/lib/asciidoctor/core_ext/1.8.7/symbol/length.rb +0 -6
  82. data/lib/asciidoctor/core_ext/string/limit_bytesize.rb +0 -10
  83. data/test/api_test.rb +0 -1240
  84. data/test/attribute_list_test.rb +0 -242
  85. data/test/attributes_test.rb +0 -1623
  86. data/test/blocks_test.rb +0 -3870
  87. data/test/converter_test.rb +0 -470
  88. data/test/document_test.rb +0 -1853
  89. data/test/extensions_test.rb +0 -1560
  90. data/test/fixtures/asciidoc_index.txt +0 -521
  91. data/test/fixtures/basic-docinfo-footer.html +0 -6
  92. data/test/fixtures/basic-docinfo-footer.xml +0 -8
  93. data/test/fixtures/basic-docinfo.html +0 -1
  94. data/test/fixtures/basic-docinfo.xml +0 -4
  95. data/test/fixtures/basic.asciidoc +0 -5
  96. data/test/fixtures/chapter-a.adoc +0 -3
  97. data/test/fixtures/child-include.adoc +0 -5
  98. data/test/fixtures/circle.svg +0 -9
  99. data/test/fixtures/custom-backends/erb/html5/block_paragraph.html.erb +0 -6
  100. data/test/fixtures/custom-backends/haml/docbook45/block_paragraph.xml.haml +0 -6
  101. data/test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml +0 -1
  102. data/test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml +0 -3
  103. data/test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml +0 -5
  104. data/test/fixtures/custom-backends/slim/docbook45/block_paragraph.xml.slim +0 -6
  105. data/test/fixtures/custom-backends/slim/html5/block_paragraph.html.slim +0 -3
  106. data/test/fixtures/custom-backends/slim/html5/block_sidebar.html.slim +0 -5
  107. data/test/fixtures/custom-docinfodir/basic-docinfo.html +0 -1
  108. data/test/fixtures/custom-docinfodir/docinfo.html +0 -1
  109. data/test/fixtures/docinfo-footer.html +0 -1
  110. data/test/fixtures/docinfo-footer.xml +0 -9
  111. data/test/fixtures/docinfo.html +0 -1
  112. data/test/fixtures/docinfo.xml +0 -3
  113. data/test/fixtures/doctime-localtime.adoc +0 -2
  114. data/test/fixtures/dot.gif +0 -0
  115. data/test/fixtures/encoding.asciidoc +0 -13
  116. data/test/fixtures/file-with-missing-include.adoc +0 -1
  117. data/test/fixtures/grandchild-include.adoc +0 -3
  118. data/test/fixtures/hello-asciidoctor.pdf +0 -69
  119. data/test/fixtures/include-file.asciidoc +0 -24
  120. data/test/fixtures/include-file.jsx +0 -8
  121. data/test/fixtures/include-file.ml +0 -3
  122. data/test/fixtures/include-file.xml +0 -5
  123. data/test/fixtures/lists.adoc +0 -96
  124. data/test/fixtures/master.adoc +0 -5
  125. data/test/fixtures/mismatched-end-tag.adoc +0 -7
  126. data/test/fixtures/other-chapters.adoc +0 -11
  127. data/test/fixtures/outer-include.adoc +0 -5
  128. data/test/fixtures/parent-include-restricted.adoc +0 -5
  129. data/test/fixtures/parent-include.adoc +0 -5
  130. data/test/fixtures/sample.asciidoc +0 -30
  131. data/test/fixtures/section-a.adoc +0 -4
  132. data/test/fixtures/stylesheets/custom.css +0 -3
  133. data/test/fixtures/subdir/index.adoc +0 -3
  134. data/test/fixtures/subdir/inner-include.adoc +0 -3
  135. data/test/fixtures/subdir/middle-include.adoc +0 -5
  136. data/test/fixtures/subs-docinfo.html +0 -2
  137. data/test/fixtures/subs.adoc +0 -6
  138. data/test/fixtures/tagged-class-enclosed.rb +0 -25
  139. data/test/fixtures/tagged-class.rb +0 -23
  140. data/test/fixtures/tip.gif +0 -0
  141. data/test/fixtures/unclosed-tag.adoc +0 -3
  142. data/test/fixtures/unexpected-end-tag.adoc +0 -4
  143. data/test/invoker_test.rb +0 -745
  144. data/test/links_test.rb +0 -855
  145. data/test/lists_test.rb +0 -5151
  146. data/test/logger_test.rb +0 -211
  147. data/test/manpage_test.rb +0 -660
  148. data/test/options_test.rb +0 -262
  149. data/test/paragraphs_test.rb +0 -562
  150. data/test/parser_test.rb +0 -742
  151. data/test/paths_test.rb +0 -395
  152. data/test/preamble_test.rb +0 -173
  153. data/test/reader_test.rb +0 -2161
  154. data/test/sections_test.rb +0 -3575
  155. data/test/substitutions_test.rb +0 -2066
  156. data/test/tables_test.rb +0 -2036
  157. data/test/test_helper.rb +0 -447
  158. data/test/text_test.rb +0 -309
@@ -1,6 +0,0 @@
1
- <script>
2
- (function() {
3
- var p1 = document.createElement('script'); p1.async = true; p1.src = 'https://apis.google.com/js/plusone.js';
4
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(p1, s);
5
- })();
6
- </script>
@@ -1,8 +0,0 @@
1
- <revhistory>
2
- <revision>
3
- <revnumber>{revnumber}</revnumber>
4
- <date>01 Jan 2013</date>
5
- <authorinitials>abc</authorinitials>
6
- <revremark>Unleashed into the wild</revremark>
7
- </revision>
8
- </revhistory>
@@ -1 +0,0 @@
1
- <script src="modernizr.js"></script>
@@ -1,4 +0,0 @@
1
- <copyright><!-- don't remove the indent! -->
2
- <year>2013</year>
3
- <holder>Acme™, Inc.</holder>
4
- </copyright>
@@ -1,5 +0,0 @@
1
- = Document Title
2
- Doc Writer <doc.writer@asciidoc.org>
3
- v1.0, 2013-01-01
4
-
5
- Body content.
@@ -1,3 +0,0 @@
1
- = Chapter A
2
-
3
- content
@@ -1,5 +0,0 @@
1
- first line of child
2
-
3
- include::grandchild-include.adoc[]
4
-
5
- last line of child
@@ -1,9 +0,0 @@
1
- <?xml version="1.0"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <!-- An SVG of a black circle -->
4
- <svg
5
- viewBox="0 0 120 120" version="1.1"
6
- xmlns="http://www.w3.org/2000/svg" style="width:500px;height:500px"
7
- width="500px" height="500px">
8
- <circle cx="60" cy="60" r="50"/>
9
- </svg>
@@ -1,6 +0,0 @@
1
- <%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['paragraph',role].compact * ' ' %>"><%
2
- if title? %>
3
- <div class="title"><%= title %></div><%
4
- end %>
5
- <p><%= content %></p>
6
- </div>
@@ -1,6 +0,0 @@
1
- - if title?
2
- %formalpara{:id=>@id, :role=>(attr :role), :xreflabel=>(attr :reftext)}
3
- %title=title
4
- %para=content
5
- - else
6
- %para{:id=>@id, :role=>(attr :role), :xreflabel=>(attr :reftext)}=content
@@ -1,3 +0,0 @@
1
- - if title?
2
- .title=title
3
- %p{:id=>@id, :class=>(attr 'role')}=content
@@ -1,5 +0,0 @@
1
- %aside{:id=>@id, :class=>(attr 'role')}
2
- - if title?
3
- %header
4
- %h1=title
5
- =content.chomp
@@ -1,6 +0,0 @@
1
- - if title?
2
- formalpara id=@id role=(attr :role) xreflabel=(attr :reftext)
3
- title=title
4
- para=content
5
- - else
6
- para id=@id role=(attr :role) xreflabel=(attr :reftext) =content
@@ -1,3 +0,0 @@
1
- - if title?
2
- .title=title
3
- p id=id class="#{role}" =content
@@ -1,5 +0,0 @@
1
- aside id=id class="#{role}"
2
- - if title?
3
- header
4
- h1=title
5
- =content
@@ -1 +0,0 @@
1
- <script src="bootstrap.js"></script>
@@ -1 +0,0 @@
1
- <meta name="robots" content="index,follow">
@@ -1 +0,0 @@
1
- <a id="top" href="#">Back to top</a>
@@ -1,9 +0,0 @@
1
- <glossary id="_glossary">
2
- <title>Glossary</title>
3
- <glossentry>
4
- <glossterm>term</glossterm>
5
- <glossdef>
6
- <simpara>definition</simpara>
7
- </glossdef>
8
- </glossentry>
9
- </glossary>
@@ -1 +0,0 @@
1
- <meta http-equiv="imagetoolbar" content="false">
@@ -1,3 +0,0 @@
1
- <productname>Asciidoctor™</productname>
2
- <productnumber>1.0.0</productnumber>
3
- <edition>{revnumber}</edition>
@@ -1,2 +0,0 @@
1
- {doctime}
2
- {localtime}
Binary file
@@ -1,13 +0,0 @@
1
- Gregory Romé has written an AsciiDoc plugin for the Redmine project management application.
2
-
3
- https://github.com/foo-users/foo
4
- へと `vicmd` キーマップを足してみている試み、
5
- アニメーションgifです。
6
-
7
- tag::romé[]
8
- Gregory Romé has written an AsciiDoc plugin for the Redmine project management application.
9
- end::romé[]
10
-
11
- == Überschrift
12
-
13
- * Codierungen sind verrückt auf älteren Versionen von Ruby
@@ -1 +0,0 @@
1
- include::no-such-file.adoc[]
@@ -1,3 +0,0 @@
1
- first line of grandchild
2
-
3
- last line of grandchild
@@ -1,69 +0,0 @@
1
- %PDF-1.3
2
- %����
3
- 1 0 obj
4
- << /Creator <feff0050007200610077006e>
5
- /Producer <feff0050007200610077006e>
6
- >>
7
- endobj
8
- 2 0 obj
9
- << /Type /Catalog
10
- /Pages 3 0 R
11
- >>
12
- endobj
13
- 3 0 obj
14
- << /Type /Pages
15
- /Count 1
16
- /Kids [5 0 R]
17
- >>
18
- endobj
19
- 4 0 obj
20
- << /Length 92
21
- >>
22
- stream
23
- q
24
-
25
- BT
26
- 36.0 747.384 Td
27
- /F1.0 12 Tf
28
- [<48656c6c6f> 40 <2c204173636969646f63746f7221>] TJ
29
- ET
30
-
31
- Q
32
-
33
- endstream
34
- endobj
35
- 5 0 obj
36
- << /Type /Page
37
- /Parent 3 0 R
38
- /MediaBox [0 0 612.0 792.0]
39
- /Contents 4 0 R
40
- /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
41
- /Font << /F1.0 6 0 R
42
- >>
43
- >>
44
- >>
45
- endobj
46
- 6 0 obj
47
- << /Type /Font
48
- /Subtype /Type1
49
- /BaseFont /Helvetica
50
- /Encoding /WinAnsiEncoding
51
- >>
52
- endobj
53
- xref
54
- 0 7
55
- 0000000000 65535 f
56
- 0000000015 00000 n
57
- 0000000109 00000 n
58
- 0000000158 00000 n
59
- 0000000215 00000 n
60
- 0000000357 00000 n
61
- 0000000535 00000 n
62
- trailer
63
- << /Size 7
64
- /Root 2 0 R
65
- /Info 1 0 R
66
- >>
67
- startxref
68
- 632
69
- %%EOF
@@ -1,24 +0,0 @@
1
- first line of included content
2
- second line of included content
3
- third line of included content
4
- fourth line of included content
5
- fifth line of included content
6
- sixth line of included content
7
- seventh line of included content
8
- eighth line of included content
9
-
10
- // tag::snippet[]
11
- // tag::snippetA[]
12
- snippetA content
13
- // end::snippetA[]
14
-
15
- non-tagged content
16
-
17
- // tag::snippetB[]
18
- snippetB content
19
- // end::snippetB[]
20
- // end::snippet[]
21
-
22
- more non-tagged content
23
-
24
- last line of included content
@@ -1,8 +0,0 @@
1
- const element = (
2
- <div>
3
- <h1>Hello, Programmer!</h1>
4
- <!-- tag::snippet[] -->
5
- <p>Welcome to the club.</p>
6
- <!-- end::snippet[] -->
7
- </div>
8
- )
@@ -1,3 +0,0 @@
1
- (* tag::snippet[] *)
2
- let s = SS.empty;;
3
- (* end::snippet[] *)
@@ -1,5 +0,0 @@
1
- <root>
2
- <!-- tag::snippet[] -->
3
- <snippet>content</snippet>
4
- <!-- end::snippet[] -->
5
- </root>
@@ -1,96 +0,0 @@
1
- = Document Title
2
- Doc Writer <thedoc@asciidoctor.org>
3
-
4
- Preamble paragraph.
5
-
6
- NOTE: This is test, only a test.
7
-
8
- == Lists
9
-
10
- .Unordered, basic
11
- * Edgar Allen Poe
12
- * Sheri S. Tepper
13
- * Bill Bryson
14
-
15
- .Unordered, max nesting
16
- * level 1
17
- ** level 2
18
- *** level 3
19
- **** level 4
20
- ***** level 5
21
- * level 1
22
-
23
- .Checklist
24
- - [*] checked
25
- - [x] also checked
26
- - [ ] not checked
27
- - normal list item
28
-
29
- .Ordered, basic
30
- . Step 1
31
- . Step 2
32
- . Step 3
33
-
34
- .Ordered, nested
35
- . Step 1
36
- . Step 2
37
- .. Step 2a
38
- .. Step 2b
39
- . Step 3
40
-
41
- .Ordered, max nesting
42
- . level 1
43
- .. level 2
44
- ... level 3
45
- .... level 4
46
- ..... level 5
47
- . level 1
48
-
49
- .Labeled, single-line
50
- first term:: definition of first term
51
- section term:: definition of second term
52
-
53
- .Labeled, multi-line
54
- first term::
55
- definition of first term
56
- second term::
57
- definition of second term
58
-
59
- .Q&A
60
- [qanda]
61
- What is Asciidoctor?::
62
- An implementation of the AsciiDoc processor in Ruby.
63
- What is the answer to the Ultimate Question?:: 42
64
-
65
- .Mixed
66
- Operating Systems::
67
- Linux:::
68
- . Fedora
69
- * Desktop
70
- . Ubuntu
71
- * Desktop
72
- * Server
73
- BSD:::
74
- . FreeBSD
75
- . NetBSD
76
-
77
- Cloud Providers::
78
- PaaS:::
79
- . OpenShift
80
- . CloudBees
81
- IaaS:::
82
- . Amazon EC2
83
- . Rackspace
84
-
85
- .Unordered, complex
86
- * level 1
87
- ** level 2
88
- *** level 3
89
- This is a new line inside an unordered list using {plus} symbol.
90
- We can even force content to start on a separate line... +
91
- Amazing, isn't it?
92
- **** level 4
93
- +
94
- The {plus} symbol is on a new line.
95
-
96
- ***** level 5
@@ -1,5 +0,0 @@
1
- = Master Document
2
-
3
- preamble
4
-
5
- include::chapter-a.adoc[leveloffset=+1]
@@ -1,7 +0,0 @@
1
- //tag::a[]
2
- a
3
- //tag::b[]
4
- b
5
- //end::a[]
6
- //end::b[]
7
- c
@@ -1,11 +0,0 @@
1
- // tag::ch2[]
2
- [#ch2]
3
- == Chapter 2
4
-
5
- The plot thickens.
6
- // end::ch2[]
7
-
8
- [#ch3]
9
- == Chapter 3
10
-
11
- The plot runs its course, predictably.
@@ -1,5 +0,0 @@
1
- first line of outer
2
-
3
- include::subdir/middle-include.adoc[]
4
-
5
- last line of outer
@@ -1,5 +0,0 @@
1
- first line of parent
2
-
3
- include::child-include.adoc[depth=1]
4
-
5
- last line of parent
@@ -1,5 +0,0 @@
1
- first line of parent
2
-
3
- include::child-include.adoc[]
4
-
5
- last line of parent
@@ -1,30 +0,0 @@
1
- Document Title
2
- ==============
3
- Doc Writer <thedoc@asciidoctor.org>
4
- :idprefix: id_
5
-
6
- Preamble paragraph.
7
-
8
- NOTE: This is test, only a test.
9
-
10
- == Section A
11
-
12
- *Section A* paragraph.
13
-
14
- === Section A Subsection
15
-
16
- *Section A* 'subsection' paragraph.
17
-
18
- == Section B
19
-
20
- *Section B* paragraph.
21
-
22
- |===
23
- |a |b |c
24
- |1 |2 |3
25
- |===
26
-
27
- .Section B list
28
- * Item 1
29
- * Item 2
30
- * Item 3