asciidoctor 2.0.0.rc.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c6f979786009b69e2cc868e90f1b97a7a62cf7906b6071bba4f7de471230df4
4
- data.tar.gz: b117e749de44c5f099b1f40967165cd6c9792e895ca31fa51b654d87c4c7811f
3
+ metadata.gz: '09c8776c68c1c086a0d17e7597f8e5cd2a4ef27a2b57545a0d82bb7520747c8d'
4
+ data.tar.gz: 6fa042782d5c3a6e446ce1b3b5a25557055d74248ca618f3bed651d5d6f7535e
5
5
  SHA512:
6
- metadata.gz: 0a04640a9791301a5007acfcb70c3ed8daaeef605ed1c7e315ee85ba5bca717d7df52dec82870a73aa2d5d84fc6d30d0abe7f9146592b089d2c41bb21e81fe4a
7
- data.tar.gz: 7b7ed4a9107ee200c447c69452b371049d6ea12cd36b2c4b29e3bab752ed2e1f1db24ec741971840a2bb4d2463da5802013f073bbd8ebea2a0885d8fe07f4edb
6
+ metadata.gz: 82e97c50b8ecc3cb09e2aa966e41acc3d714dd8fad4654ab68eadd5e339febdcd680fdb3fba77bb11583eb419120fb6429bcd9d21299ecb4e6f7ff102bda48d3
7
+ data.tar.gz: 2c96408f4c51935b2b9d413184358d58a55e528675442167a13e879d5a4506ab29fb628c65c63b616333d555f41a54d1da761889afbba64f563a623d3b2b4446
@@ -13,7 +13,7 @@ endif::[]
13
13
  This document provides a high-level view of the changes introduced in Asciidoctor by release.
14
14
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
15
15
 
16
- == 2.0.0.rc.3 (2019-03-21) - @mojavelinux
16
+ == 2.0.0 (2019-03-22) - @mojavelinux
17
17
 
18
18
  Enhancements / Compliance::
19
19
 
@@ -44,11 +44,14 @@ Enhancements / Compliance::
44
44
  * use value of prettify-theme attribute as is if it starts with http:// or https:// (#3020)
45
45
  * allow icontype to be set using icons attribute (#2953)
46
46
  * when using a server-side syntax highlighter, highlight content of source block even if source language is not set (#3027)
47
+ * automatically promote a listing block without an explicit style to a source block if language is set (#1117)
47
48
  * remove the 2-character (i.e., `""`) quote block syntax
48
49
  * don't allow block role to inherit from document attribute; only look for role in block attributes (#1944)
49
50
  * split out functionality of -w CLI flag (script warnings) from -v CLI flag (verbose logging) (#3030)
50
51
  * log possible invalid references at info level (#3030)
51
52
  * log dropped lines at info level when attribute-missing=drop-line (#2861)
53
+ * honor attribute-missing setting when processing include directives and block macros (#2855)
54
+ * log warning when include directive is not resolved due to missing attribute or blank target; always include warning in output document (#2868)
52
55
  * use the third argument of AbstractNode#attr / AbstractNode#attr? to set the name of a fallback attribute to look for on the document (#1934)
53
56
  * change default value of third argument to Abstractnode#attr / AbstractNode#attr? to nil so attribute doesn't inherit by default (#3059)
54
57
  * look for table-frame, table-grid, and table-stripes attributes on document as fallback for frame, grid, and stripes attributes on table (#3059)
@@ -79,12 +82,18 @@ Enhancements / Compliance::
79
82
  * rename header_footer option to standalone (while still honoring header_footer for backwards compatibility) (#1444)
80
83
  * replace anchors and xrefs before footnotes (replace footnotes last in macros substitution group)
81
84
  * apply substitution for custom inline macro before all other macros
82
- * drop indexterms table from document catalog (in preparation for solution to #450 in a 2.x release)
85
+ * only promote index terms automatically (A, B, C becomes A > B > C + B > C + C) if indexterm-promotion option is set on document (#1487)
86
+ * add support for see and see-also on index terms; parse attributes on indexterm macros if text contains `=` (#2047)
87
+ * drop :indexterms table from document catalog (in preparation for solution to #450 in a 2.x release)
83
88
  * load additional languages for highlight.js as defined in the comma-separated highlightjs-languages attribute (#3036)
84
89
  * log warning if conditional expression in ifeval directive is invalid (#3161)
85
90
  * drop lines that contain an invalid preprocessor directive (#3161)
86
91
  * rename AbstractBlock#find_by directives; use :prune in place of :skip_children and :reject in place of :skip
87
92
  * convert example block into details/summary tag set if collapsible option is set; open by default if open option is set (#1699)
93
+ * substitute replacements in author values used in document header (#2441)
94
+ * require space after semi-colon that separates multiple authors (#2441)
95
+ * catalog inline anchors at start of callout list items (#2818) (*@owenh000*)
96
+ * add parse_attributes helper method to base extension Processor class (#2134)
88
97
 
89
98
  Improvements::
90
99
 
@@ -107,8 +116,6 @@ Improvements::
107
116
  * never mutate strings; add a `frozen_string_literal: true` magic comment to top of all Ruby source files (#3054)
108
117
  * always use docdate and doctime to compute docyear and docdatetime (#3064)
109
118
  * rename PreprocessorReader#exceeded_max_depth? to PreprocessorReader#exceeds_max_depth? and return nil if includes are disabled
110
- * log warning when include directive is not resolved due to missing attribute or blank target; always include warning in output (#2868)
111
- * honor attribute-missing setting when processing include directives and block macros (#2855)
112
119
  * stop populating :ids table in document catalog (#3084)
113
120
  * always use :refs table in document catalog to look for registered IDs (#3084)
114
121
  * don't compute and store reference text in document catalog (#3084)
@@ -123,6 +130,8 @@ Improvements::
123
130
  * truncate with precision (instead of rounding) when computing absolute width for columns in DocBook output (#3131)
124
131
  * drop legacy LaTeX math delimiters (e.g, `$..$`) if present (#1339)
125
132
  * use proper terminology in warning message about mismatched preprocessor directive (#3165)
133
+ * rename low-level extension attribute name :pos_attrs to :positional_attrs
134
+ * mark default_attrs extension DSL method deprecated in favor of default_attributes
126
135
  * upgrade MathJax to 2.7.5
127
136
 
128
137
  Bug Fixes::
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
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.0.rc.3, 2019-03-21
3
+ v2.0.0, 2019-03-22
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.0.rc.3
20
+ :release-version: 2.0.0
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -136,6 +136,7 @@ Asciidoctor arbeitet unter Linux, MacOS und Windows und benötigt eine der folge
136
136
 
137
137
  * CRuby (aka MRI) 2.3 - 2.6
138
138
  * JRuby 9.1 - 9.2
139
+ * TruffleRuby (GraalVM)
139
140
  * Opal (JavaScript)
140
141
 
141
142
  [CAUTION]
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
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.0.rc.3, 2019-03-21
3
+ v2.0.0, 2019-03-22
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.0.rc.3
20
+ :release-version: 2.0.0
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -133,6 +133,7 @@ Asciidoctor fonctionne sur Linux, macOS et Windows et requiert une des implémen
133
133
 
134
134
  * CRuby (aka MRI) 2.3 - 2.6
135
135
  * JRuby 9.1 - 9.2
136
+ * TruffleRuby (GraalVM)
136
137
  * Opal (JavaScript)
137
138
 
138
139
  [CAUTION]
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
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.0.rc.3, 2019-03-21
3
+ v2.0.0, 2019-03-22
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -18,7 +18,7 @@ ifdef::env-github[]
18
18
  :warning-caption: :warning:
19
19
  endif::[]
20
20
  // Variables:
21
- :release-version: 2.0.0.rc.3
21
+ :release-version: 2.0.0
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
@@ -123,6 +123,7 @@ AsciidoctorはLinux, OS X (Mac)とWindowsで動き, 下記の {uri-ruby}[Ruby]
123
123
 
124
124
  * CRuby (aka MRI) 2.3 - 2.6
125
125
  * JRuby 9.1 - 9.2
126
+ * TruffleRuby (GraalVM)
126
127
  * Opal (JavaScript)
127
128
 
128
129
  [CAUTION]
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
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.0.rc.3, 2019-03-21
3
+ v2.0.0, 2019-03-22
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -18,7 +18,7 @@ ifdef::env-github[]
18
18
  :warning-caption: :warning:
19
19
  endif::[]
20
20
  // Variables:
21
- :release-version: 2.0.0.rc.3
21
+ :release-version: 2.0.0
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
@@ -125,6 +125,7 @@ Asciidoctor 可以运行在 Linux,OSX (Mac) 和 Windows 系统,但需要安
125
125
 
126
126
  * CRuby (aka MRI) 2.3 - 2.6
127
127
  * JRuby 9.1 - 9.2
128
+ * TruffleRuby (GraalVM)
128
129
  * Opal (JavaScript)
129
130
 
130
131
  我们欢迎你来帮助在这些以及其他平台测试 Asciidoctor。
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
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.0.rc.3, 2019-03-21
3
+ v2.0.0, 2019-03-22
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.0.rc.3
20
+ :release-version: 2.0.0
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
@@ -141,6 +141,7 @@ Asciidoctor works on Linux, macOS and Windows and requires one of the following
141
141
 
142
142
  * CRuby (aka MRI) 2.3 - 2.6
143
143
  * JRuby 9.1 - 9.2
144
+ * TruffleRuby (GraalVM)
144
145
  * Opal (JavaScript)
145
146
 
146
147
  [CAUTION]
@@ -8,15 +8,16 @@
8
8
  :figure-caption: Abbildung
9
9
  :important-caption: Wichtig
10
10
  :last-update-label: Zuletzt aktualisiert
11
- //ifdef::listing-caption[:listing-caption: ???]
11
+ ifdef::listing-caption[:listing-caption: Listing]
12
12
  ifdef::manname-title[:manname-title: Bezeichnung]
13
13
  :note-caption: Anmerkung
14
- //:part-refsig: ???
14
+ :part-label: Teil
15
+ :part-refsig: {part-label}
15
16
  ifdef::preface-title[:preface-title: Vorwort]
16
17
  :section-refsig: Abschnitt
17
18
  :table-caption: Tabelle
18
19
  :tip-caption: Hinweis
19
- :toc-title: Inhalt
20
+ :toc-title: Inhaltsverzeichnis
20
21
  :untitled-label: Ohne Titel
21
22
  :version-label: Version
22
23
  :warning-caption: Warnung
@@ -131,7 +131,7 @@ Attach a block or paragraph to a list item using a list continuation (which you
131
131
  === Callout
132
132
 
133
133
  // enable callout bubbles by adding `:icons: font` to the document header
134
- [source,ruby]
134
+ [,ruby]
135
135
  ----
136
136
  puts 'Hello, World!' # <1>
137
137
  ----
@@ -188,6 +188,12 @@ admonition - a notice for the reader, ranging in severity from a tip to an alert
188
188
  example - a demonstration of the concept being documented
189
189
  ====
190
190
 
191
+ .Toggle Me
192
+ [%collapsible]
193
+ ====
194
+ collapsible - these details are revealed by clicking the title
195
+ ====
196
+
191
197
  ****
192
198
  sidebar - auxiliary content that can be read independently of the main content
193
199
  ****
@@ -200,7 +206,7 @@ literal - an exhibit that features program output
200
206
  listing - an exhibit that features program input, source code, or the contents of a file
201
207
  ----
202
208
 
203
- [source,language]
209
+ [,language]
204
210
  ----
205
211
  source - a listing that is embellished with (colorized) syntax highlighting
206
212
  ----
@@ -142,7 +142,9 @@ module Asciidoctor
142
142
  define :unwrap_standalone_preamble, true
143
143
 
144
144
  # AsciiDoc drops lines that contain references to missing attributes.
145
- # This behavior is not intuitive to most writers
145
+ # This behavior is not intuitive to most writers.
146
+ # Asciidoctor allows this behavior to be configured.
147
+ # Possible options are 'skip', 'drop', 'drop-line', and 'warn'.
146
148
  # Compliance value: 'drop-line'
147
149
  define :attribute_missing, 'skip'
148
150
 
@@ -396,6 +398,14 @@ module Asciidoctor
396
398
  #
397
399
  AuthorInfoLineRx = /^(#{CG_WORD}[#{CC_WORD}\-'.]*)(?: +(#{CG_WORD}[#{CC_WORD}\-'.]*))?(?: +(#{CG_WORD}[#{CC_WORD}\-'.]*))?(?: +<([^>]+)>)?$/
398
400
 
401
+ # Matches the delimiter that separates multiple authors.
402
+ #
403
+ # Examples
404
+ #
405
+ # Doc Writer; Junior Writer
406
+ #
407
+ AuthorDelimiterRx = /;(?: |$)/
408
+
399
409
  # Matches the revision info line, which appears immediately following
400
410
  # the author info line beneath the document title.
401
411
  #
@@ -174,12 +174,11 @@ class AbstractNode
174
174
  # If an attribute already exists with the same key, it's value will
175
175
  # be overwritten.
176
176
  #
177
- # attributes - A Hash of attributes to assign to this node.
177
+ # new_attributes - A Hash of additional attributes to assign to this node.
178
178
  #
179
- # Returns nothing
180
- def update_attributes(attributes)
181
- @attributes.update(attributes)
182
- nil
179
+ # Returns the updated attributes [Hash] on this node.
180
+ def update_attributes new_attributes
181
+ @attributes.update new_attributes
183
182
  end
184
183
 
185
184
  # Public: Retrieves the space-separated String role for this node.
@@ -4,7 +4,7 @@ module Asciidoctor
4
4
  # pairs. By default, attributes must each be separated by a comma and quotes
5
5
  # may be used around the value. If a key is not detected, the value is assigned
6
6
  # to a 1-based positional key, The positional attributes can be "rekeyed" when
7
- # given a posattrs array either during parsing or after the fact.
7
+ # given a positional_attrs array either during parsing or after the fact.
8
8
  #
9
9
  # Examples
10
10
  #
@@ -56,11 +56,11 @@ class AttributeList
56
56
  @attributes = nil
57
57
  end
58
58
 
59
- def parse_into attributes, posattrs = []
60
- attributes.update(parse posattrs)
59
+ def parse_into attributes, positional_attrs = []
60
+ attributes.update parse positional_attrs
61
61
  end
62
62
 
63
- def parse posattrs = []
63
+ def parse positional_attrs = []
64
64
  # return if already parsed
65
65
  return @attributes if @attributes
66
66
 
@@ -69,7 +69,7 @@ class AttributeList
69
69
  #attributes[0] = @scanner.string
70
70
  index = 0
71
71
 
72
- while parse_attribute index, posattrs
72
+ while parse_attribute index, positional_attrs
73
73
  break if @scanner.eos?
74
74
  skip_delimiter
75
75
  index += 1
@@ -78,25 +78,25 @@ class AttributeList
78
78
  @attributes
79
79
  end
80
80
 
81
- def rekey posattrs
82
- AttributeList.rekey @attributes, posattrs
81
+ def rekey positional_attrs
82
+ AttributeList.rekey @attributes, positional_attrs
83
83
  end
84
84
 
85
- def self.rekey attributes, pos_attrs
86
- pos_attrs.each_with_index do |key, index|
87
- next unless key
88
- if (val = attributes[index + 1])
85
+ def self.rekey attributes, positional_attrs
86
+ index = 0
87
+ positional_attrs.each do |key|
88
+ index += 1
89
+ if (val = attributes[index])
89
90
  # QUESTION should we delete the positional key?
90
91
  attributes[key] = val
91
- end
92
+ end if key
92
93
  end
93
-
94
94
  attributes
95
95
  end
96
96
 
97
97
  private
98
98
 
99
- def parse_attribute index = 0, pos_attrs = []
99
+ def parse_attribute index = 0, positional_attrs = []
100
100
  single_quoted_value = false
101
101
  skip_blank
102
102
  # example: "quote"
@@ -174,8 +174,8 @@ class AttributeList
174
174
  end
175
175
  else
176
176
  resolved_name = single_quoted_value && @block ? (@block.apply_subs name) : name
177
- if (pos_name = pos_attrs[index])
178
- @attributes[pos_name] = resolved_name
177
+ if (positional_attr_name = positional_attrs[index])
178
+ @attributes[positional_attr_name] = resolved_name
179
179
  end
180
180
  # QUESTION should we always assign the positional key?
181
181
  @attributes[index + 1] = resolved_name
@@ -538,25 +538,40 @@ class Converter::DocBook5Converter < Converter::Base
538
538
  end
539
539
 
540
540
  def convert_inline_indexterm node
541
+ if (see = node.attr 'see')
542
+ rel = %(\n<see>#{see}</see>)
543
+ elsif (see_also_list = node.attr 'see-also')
544
+ rel = see_also_list.map {|see_also| %(\n<seealso>#{see_also}</seealso>) }.join
545
+ else
546
+ rel = ''
547
+ end
541
548
  if node.type == :visible
542
- %(<indexterm><primary>#{node.text}</primary></indexterm>#{node.text})
549
+ %(<indexterm>
550
+ <primary>#{node.text}</primary>#{rel}
551
+ </indexterm>#{node.text})
543
552
  else
544
- terms = node.attr 'terms'
545
- result = []
546
- if (numterms = terms.size) > 2
547
- result << %(<indexterm>
548
- <primary>#{terms[0]}</primary><secondary>#{terms[1]}</secondary><tertiary>#{terms[2]}</tertiary>
549
- </indexterm>)
550
- end
551
- if numterms > 1
552
- result << %(<indexterm>
553
- <primary>#{terms[-2]}</primary><secondary>#{terms[-1]}</secondary>
553
+ if (numterms = (terms = node.attr 'terms').size) > 2
554
+ %(<indexterm>
555
+ <primary>#{terms[0]}</primary><secondary>#{terms[1]}</secondary><tertiary>#{terms[2]}</tertiary>#{rel}
556
+ </indexterm>#{(node.document.option? 'indexterm-promotion') ? %[
557
+ <indexterm>
558
+ <primary>#{terms[1]}</primary><secondary>#{terms[2]}</secondary>
559
+ </indexterm>
560
+ <indexterm>
561
+ <primary>#{terms[2]}</primary>
562
+ </indexterm>] : ''})
563
+ elsif numterms > 1
564
+ %(<indexterm>
565
+ <primary>#{terms[0]}</primary><secondary>#{terms[1]}</secondary>#{rel}
566
+ </indexterm>#{(node.document.option? 'indexterm-promotion') ? %[
567
+ <indexterm>
568
+ <primary>#{terms[1]}</primary>
569
+ </indexterm>] : ''})
570
+ else
571
+ %(<indexterm>
572
+ <primary>#{terms[0]}</primary>#{rel}
554
573
  </indexterm>)
555
574
  end
556
- result << %(<indexterm>
557
- <primary>#{terms[-1]}</primary>
558
- </indexterm>)
559
- result.join LF
560
575
  end
561
576
  end
562
577
 
@@ -626,13 +641,13 @@ class Converter::DocBook5Converter < Converter::Base
626
641
  end
627
642
  end
628
643
 
629
- def author_tag author
644
+ def author_tag doc, author
630
645
  result = []
631
646
  result << '<author>'
632
647
  result << '<personname>'
633
- result << %(<firstname>#{author.firstname}</firstname>) if author.firstname
634
- result << %(<othername>#{author.middlename}</othername>) if author.middlename
635
- result << %(<surname>#{author.lastname}</surname>) if author.lastname
648
+ result << %(<firstname>#{doc.sub_replacements author.firstname}</firstname>) if author.firstname
649
+ result << %(<othername>#{doc.sub_replacements author.middlename}</othername>) if author.middlename
650
+ result << %(<surname>#{doc.sub_replacements author.lastname}</surname>) if author.lastname
636
651
  result << '</personname>'
637
652
  result << %(<email>#{author.email}</email>) if author.email
638
653
  result << '</author>'
@@ -663,10 +678,10 @@ class Converter::DocBook5Converter < Converter::Base
663
678
  unless (authors = doc.authors).empty?
664
679
  if authors.size > 1
665
680
  result << '<authorgroup>'
666
- authors.each {|author| result << (author_tag author) }
681
+ authors.each {|author| result << (author_tag doc, author) }
667
682
  result << '</authorgroup>'
668
683
  else
669
- result << author_tag(author = authors[0])
684
+ result << (author_tag doc, (author = authors[0]))
670
685
  result << %(<authorinitials>#{author.initials}</authorinitials>) if author.initials
671
686
  end
672
687
  end