asciidoctor 2.0.14 → 2.0.15

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: 6e012ef88ccf5e32405cd49a342bb89a6f6670b092fb9df0053a23b02a271bcf
4
- data.tar.gz: e2e867e672262616fbfb4957d0155644e1209919670adf9fde4d6609c74ed808
3
+ metadata.gz: cb27f87c48be418263b4f94e5b63f95c9615e03226a3cd093d4eab7f6dd02804
4
+ data.tar.gz: 9d562c732b689e19dfbba66195568c373a44a5ca5402a3310bb172f88ccf16bd
5
5
  SHA512:
6
- metadata.gz: 54cacdc574dc500a77fc851dcb4f48d9b5ba160f81e8edc554d0fa81f54afd495c106e3b2dc6e5a73a841da816e1c6832ff818c61e8d026b622262a6e7a9c1c6
7
- data.tar.gz: 8413580ffda7fac9265491a88ab37b8c80fa13509e5f9b2ebbca165a5c8aad047c2b27e75f881168a3dd001b32e8980b52718fedafd183531a45e87364d7e9a7
6
+ metadata.gz: 5cade3f312ab79d06ce6cbce0376c03a5c2fc6f44c02a46273aba40ecb49a15735785a66dbf6381e61f30265f45456c1c434b9f88a4cc6487624a3f4129b4e1c
7
+ data.tar.gz: d1e9b950be47affa3459f5685efb442f6a2a6ece9485ce961f1aca232e27c0fbdcd8bd2f92983d831fec7176e3fe8996cf952f3e38d6a56c9eb77de8e2a1bad7
data/CHANGELOG.adoc CHANGED
@@ -11,9 +11,32 @@ endif::[]
11
11
  {uri-asciidoctor}[Asciidoctor] is a _fast_, open source text processor and publishing toolchain for converting {uri-asciidoc}[AsciiDoc] content into HTML 5, DocBook 5, and other formats.
12
12
 
13
13
  This document provides a high-level view of the changes introduced in Asciidoctor by release.
14
- For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
14
+ For an even more detailed look at what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
15
+
16
+ This project utilizes semantic versioning.
15
17
 
16
18
  // tag::compact[]
19
+ == 2.0.15 (2021-04-27) - @mojavelinux
20
+
21
+ Bug Fixes::
22
+
23
+ * Don't include trailing period, question mark, or exclamation point in target (URL) of autolink (#3860)
24
+ * Don't assign nil value to named attribute mapped to absent positional attribute when parsing attrlist (#4033)
25
+ * Remove leading and trailing spaces around role on inline phrase (#4035)
26
+ * Ignore empty role on inline phrase defined using legacy syntax and followed by comma (#4035)
27
+ * Use xreftext on document as fallback link text in HTML output for inter-document xref that resolves to current document when no link text is provided (#4032)
28
+ * Use xreftext on document as fallback link text in HTML output for internal xref with empty fragment when no link text is provided (#4032)
29
+ * Use document ID as linkend in DocBook output for internal xref with empty fragment; auto-generating one if necessary (#4032)
30
+
31
+ Improvements::
32
+
33
+ * Format keyboard references in monospace in manpage output
34
+
35
+ Build / Infrastructure::
36
+
37
+ * Get remaining invoker tests working on JRuby 9.1 for Windows
38
+
39
+ // end::compact[]
17
40
  == 2.0.14 (2021-04-19) - @mojavelinux
18
41
 
19
42
  Bug Fixes::
@@ -36,7 +59,6 @@ Build / Infrastructure::
36
59
 
37
60
  * Run tests on JRuby for Windows (#3550)
38
61
 
39
- // end::compact[]
40
62
  == 2.0.13 (2021-04-10) - @mojavelinux
41
63
 
42
64
  Bug Fixes::
@@ -140,6 +162,7 @@ Bug Fixes::
140
162
 
141
163
  Compliance::
142
164
 
165
+ * Account for empty positional attribute when parsing attrlist (#3813)
143
166
  * Add support for muted option to self-hosted video (#3408)
144
167
  * Move style tag for convert-time syntax highlighters (coderay, rouge, pygments) into head (#3462)
145
168
  * Move style tag for client-side syntax highlighters (highlight.js, prettify) into head (#3503)
@@ -232,7 +255,7 @@ Also see https://github.com/asciidoctor/asciidoctor/milestone/33?closed=1[issues
232
255
 
233
256
  Bug Fixes::
234
257
 
235
- * assume implicit AsciiDoc extension on interdoc xref macro target with no extension (e.g., `document#`); restores 1.5.x behavior (#3231)
258
+ * assume implicit AsciiDoc extension on inter-document xref macro target with no extension (e.g., `document#`); restores 1.5.x behavior (#3231)
236
259
  * don't fail to load application if call to Dir.home fails; use a rescue with fallback values (#3238)
237
260
  * Helpers.rootname should only consider final path segment when dropping file extension
238
261
 
@@ -345,7 +368,7 @@ Enhancements / Compliance::
345
368
  * change default value of third argument to Abstractnode#attr / AbstractNode#attr? to nil so attribute doesn't inherit by default (#3059)
346
369
  * look for table-frame, table-grid, and table-stripes attributes on document as fallback for frame, grid, and stripes attributes on table (#3059)
347
370
  * add support for hover mode for table stripes (stripes=hover) (#3110)
348
- * always assume the target of a shorthand interdocument xref is a reference to an AsciiDoc document (source-to-source) (#3021)
371
+ * always assume the target of a shorthand inter-document xref is a reference to an AsciiDoc document (source-to-source) (#3021)
349
372
  * if the target of a formal xref macro has a file extension, assume it's a path reference (#3021)
350
373
  * never assume target of a formal xref macro is a path reference unless a file extension or fragment is present (#3021)
351
374
  * encode characters in URI to comply with RFC-3986
@@ -384,6 +407,7 @@ Enhancements / Compliance::
384
407
  * require space after semi-colon that separates multiple authors (#2441)
385
408
  * catalog inline anchors at start of callout list items (#2818) (*@owenh000*)
386
409
  * add parse_attributes helper method to base extension Processor class (#2134)
410
+ * require at least one character in the term position of a description list (#2766)
387
411
 
388
412
  Improvements::
389
413
 
@@ -582,11 +606,11 @@ Enhancements::
582
606
 
583
607
  * BREAKING: drop XML tags, character refs, and non-word characters (except hyphen, dot, and space) when auto-generating section IDs (#794)
584
608
  ** hyphen, dot, and space are replaced with value of idseparator, if set; otherwise, spaces are dropped
585
- * BREAKING: disable interdocument xrefs in compat mode (#2740)
609
+ * BREAKING: disable inter-document xrefs in compat mode (#2740)
586
610
  * BREAKING: automatically parse attributes in link macro if equals is present, ignoring linkattrs (except in compat mode) (#2059)
587
611
  * pass non-AsciiDoc file extensions in target of xref through unprocessed (#2740)
588
- * process any known AsciiDoc file extension in target of shorthand interdocument xref if hash is also present (e.g., `<<target.asciidoc#,text>>`) (#2740)
589
- * only allow .adoc to be used in target of formal xref macro to create an interdocument xref (with or without a hash) (#2740)
612
+ * process any known AsciiDoc file extension in target of shorthand inter-document xref if hash is also present (e.g., `<<target.asciidoc#,text>>`) (#2740)
613
+ * only allow .adoc to be used in target of formal xref macro to create an inter-document xref (with or without a hash) (#2740)
590
614
  * allow attribute names to contain any word character defined by Unicode (#2376, PR #2393)
591
615
  * do not recognize attribute entry line if name contains a colon (PR #2377)
592
616
  * route all processor messages through a logger instead of using Kernel#warn (#44, PR #2660)
@@ -598,9 +622,9 @@ Enhancements::
598
622
  * add `--failure-level=LEVEL` option to CLI to force non-zero exit code if specified logging level is reached (#2003, PR #2674)
599
623
  * parse text of xref macro as attributes if attribute signature found (equal sign) (#2381)
600
624
  * allow xrefstyle to be specified per xref by assigning the xrefstyle attribute on the xref macro (#2365)
601
- * recognize target with .adoc extension in xref macro as an interdocument xref
625
+ * recognize target with .adoc extension in xref macro as an inter-document xref
602
626
  * resolve nested includes in remote documents relative to URI (#2506, PR #2511)
603
- * allow `relfilesuffix` attribute to control file extension used for interdoc xrefs (#1273)
627
+ * allow `relfilesuffix` attribute to control file extension used for inter-document xrefs (#1273)
604
628
  * support `!name@` (preferred), `!name=@`, `name!@`, and `name!=@` syntax to soft unset attribute from API or CLI (#642, PR #2649)
605
629
  * allow modifier to be placed at end of name to soft set an attribute (e.g., `icons@=font`) (#642, PR #2649)
606
630
  * interpret `false` attribute value defined using API as a soft unset (#642, PR #2649)
@@ -714,7 +738,7 @@ Improvements / Refactoring::
714
738
  * add methods to read results from timings (#2578, PR #2580)
715
739
  * collapse bottom margin of last block in AsciiDoc table cell (#2568, PR #2593)
716
740
  * set authorcount to 0 if there are no authors (#2519, PR #2520)
717
- * validate fragment of interdoc xref that resolves to current doc (#2448, PR #2449)
741
+ * validate fragment of inter-document xref that resolves to current doc (#2448, PR #2449)
718
742
  * put id attribute on tag around phrase instead of preceding anchor (#2445, PR #2446)
719
743
  * add .plist extension to XML circumfix comment family (#2430, PR #2431) (*@akosma*)
720
744
  * alias Document#title method to no args Document#doctitle method (#2429, PR #2432)
data/README-de.adoc CHANGED
@@ -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.14, 2021-04-19
3
+ v2.0.15, 2021-04-27
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.14
20
+ :release-version: 2.0.15
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
data/README-fr.adoc CHANGED
@@ -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.14, 2021-04-19
3
+ v2.0.15, 2021-04-27
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.14
20
+ :release-version: 2.0.15
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
data/README-jp.adoc CHANGED
@@ -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.14, 2021-04-19
3
+ v2.0.15, 2021-04-27
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.14
20
+ :release-version: 2.0.15
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :uri-repo: {uri-org}/asciidoctor
data/README-zh_CN.adoc CHANGED
@@ -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.14, 2021-04-19
3
+ v2.0.15, 2021-04-27
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.14
21
+ :release-version: 2.0.15
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
data/README.adoc CHANGED
@@ -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.14, 2021-04-19
3
+ v2.0.15, 2021-04-27
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.14
20
+ :release-version: 2.0.15
21
21
  // URLs:
22
22
  :url-org: https://github.com/asciidoctor
23
23
  :url-repo: {url-org}/asciidoctor
@@ -321,7 +321,7 @@ You should see information about the Asciidoctor version and your Ruby environme
321
321
  [.output,subs=attributes+]
322
322
  ....
323
323
  Asciidoctor {release-version} [https://asciidoctor.org]
324
- Runtime Environment (ruby 2.6.0p0 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
324
+ Runtime Environment (ruby 3.0.1p64 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
325
325
  ....
326
326
 
327
327
  === Command line interface (CLI)
@@ -456,6 +456,12 @@ The core Asciidoctor project is governed by the https://github.com/asciidoctor/.
456
456
  By participating, you're agreeing to honor this code.
457
457
  Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone.
458
458
 
459
+ == Versioning and Release Policy
460
+
461
+ This project adheres to semantic versioning (*major.minor.patch*).
462
+ Typically, patch releases are only made for the current minor release.
463
+ However, exceptions are made on a case-by-case basis to address security vulnerabilities and other high-priority issues.
464
+
459
465
  == Copyright and License
460
466
 
461
467
  Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
@@ -173,7 +173,7 @@ class AttributeList
173
173
  end
174
174
  else
175
175
  name = @block.apply_subs name if single_quoted && @block
176
- if (positional_attr_name = positional_attrs[index])
176
+ if (positional_attr_name = positional_attrs[index]) && name
177
177
  @attributes[positional_attr_name] = name
178
178
  end
179
179
  # QUESTION should we assign the positional key even when it's claimed by a positional attribute?
@@ -41,7 +41,8 @@ class Converter::DocBook5Converter < Converter::Base
41
41
  if (root_tag_name = node.doctype) == 'manpage'
42
42
  root_tag_name = 'refentry'
43
43
  end
44
- result << %(<#{root_tag_name} xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0"#{lang_attribute}#{common_attributes node.id}>)
44
+ root_tag_idx = result.size
45
+ id = node.id
45
46
  result << (document_info_tag node) unless node.noheader
46
47
  unless (docinfo_content = node.docinfo :header).empty?
47
48
  result << docinfo_content
@@ -50,6 +51,9 @@ class Converter::DocBook5Converter < Converter::Base
50
51
  unless (docinfo_content = node.docinfo :footer).empty?
51
52
  result << docinfo_content
52
53
  end
54
+ id, node.id = node.id, nil unless id
55
+ # defer adding root tag in case document ID is auto-generated on demand
56
+ result.insert root_tag_idx, %(<#{root_tag_name} xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0"#{lang_attribute}#{common_attributes id}>)
53
57
  result << %(</#{root_tag_name}>)
54
58
  result.join LF
55
59
  end
@@ -474,10 +478,16 @@ class Converter::DocBook5Converter < Converter::Base
474
478
  %(<anchor#{common_attributes((id = node.id), nil, node.reftext || %([#{id}]))}/>)
475
479
  when :xref
476
480
  if (path = node.attributes['path'])
477
- # QUESTION should we use refid as fallback text instead? (like the html5 backend?)
478
481
  %(<link xl:href="#{node.target}">#{node.text || path}</link>)
479
482
  else
480
- linkend = node.attributes['fragment'] || node.target
483
+ if (linkend = node.attributes['refid']).nil_or_empty?
484
+ root_doc = get_root_document node
485
+ # Q: should we warn instead of generating a document ID on demand?
486
+ linkend = (root_doc.id ||= generate_document_id root_doc)
487
+ end
488
+ # NOTE the xref tag in DocBook does not support explicit link text, so the link tag must be used instead
489
+ # The section at http://www.sagehill.net/docbookxsl/CrossRefs.html#IdrefLinks gives an explanation for this choice
490
+ # "link - a cross reference where you supply the text of the reference as the content of the link element."
481
491
  (text = node.text) ? %(<link linkend="#{linkend}">#{text}</link>) : %(<xref linkend="#{linkend}"/>)
482
492
  end
483
493
  when :link
@@ -710,6 +720,17 @@ class Converter::DocBook5Converter < Converter::Base
710
720
  result.join LF
711
721
  end
712
722
 
723
+ def get_root_document node
724
+ while (node = node.document).nested?
725
+ node = node.parent_document
726
+ end
727
+ node
728
+ end
729
+
730
+ def generate_document_id doc
731
+ %(__#{doc.doctype}-root__)
732
+ end
733
+
713
734
  # FIXME this should be handled through a template mechanism
714
735
  def enclose_content node
715
736
  node.content_model == :compound ? node.content : %(<simpara>#{node.content}</simpara>)
@@ -1111,14 +1111,17 @@ Your browser does not support the video tag.
1111
1111
  else
1112
1112
  attrs = node.role ? %( class="#{node.role}") : ''
1113
1113
  unless (text = node.text)
1114
- refid = node.attributes['refid']
1115
- if AbstractNode === (ref = (@refs ||= node.document.catalog[:refs])[refid]) && (@resolving_xref ||= (outer = true)) && outer
1116
- if !(text = ref.xreftext node.attr 'xrefstyle', nil, true)
1117
- text = %([#{refid}])
1118
- elsif text.include? '<a'
1119
- text = text.gsub DropAnchorRx, ''
1114
+ if AbstractNode === (ref = (@refs ||= node.document.catalog[:refs])[refid = node.attributes['refid']] || (refid.nil_or_empty? ? (top = get_root_document node) : nil))
1115
+ if (@resolving_xref ||= (outer = true)) && outer
1116
+ if (text = ref.xreftext node.attr 'xrefstyle', nil, true)
1117
+ text = text.gsub DropAnchorRx, '' if text.include? '<a'
1118
+ else
1119
+ text = top ? '[^top]' : %([#{refid}])
1120
+ end
1121
+ @resolving_xref = nil
1122
+ else
1123
+ text = top ? '[^top]' : %([#{refid}])
1120
1124
  end
1121
- @resolving_xref = nil
1122
1125
  else
1123
1126
  text = %([#{refid}])
1124
1127
  end
@@ -1314,6 +1317,13 @@ Your browser does not support the video tag.
1314
1317
  </div>)
1315
1318
  end
1316
1319
 
1320
+ def get_root_document node
1321
+ while (node = node.document).nested?
1322
+ node = node.parent_document
1323
+ end
1324
+ node
1325
+ end
1326
+
1317
1327
  # NOTE adapt to older converters that relied on unprefixed method names
1318
1328
  def method_missing id, *params
1319
1329
  !((name = id.to_s).start_with? 'convert_') && (handles? name) ? (send %(convert_#{name}), *params) : super
@@ -605,11 +605,11 @@ allbox tab(:);'
605
605
  end
606
606
 
607
607
  def convert_inline_button node
608
- %(#{ESC_BS}fB[#{ESC_BS}0#{node.text}#{ESC_BS}0]#{ESC_BS}fP)
608
+ %(<#{ESC_BS}fB>[#{ESC_BS}0#{node.text}#{ESC_BS}0]</#{ESC_BS}fP>)
609
609
  end
610
610
 
611
611
  def convert_inline_callout node
612
- %(#{ESC_BS}fB(#{node.text})#{ESC_BS}fP)
612
+ %(<#{ESC_BS}fB>(#{node.text})<#{ESC_BS}fP>)
613
613
  end
614
614
 
615
615
  def convert_inline_footnote node
@@ -629,23 +629,19 @@ allbox tab(:);'
629
629
  end
630
630
 
631
631
  def convert_inline_kbd node
632
- if (keys = node.attr 'keys').size == 1
633
- keys[0]
634
- else
635
- keys.join %(#{ESC_BS}0+#{ESC_BS}0)
636
- end
632
+ %[<#{ESC_BS}f(CR>#{(keys = node.attr 'keys').size == 1 ? keys[0] : (keys.join "#{ESC_BS}0+#{ESC_BS}0")}</#{ESC_BS}fP>]
637
633
  end
638
634
 
639
635
  def convert_inline_menu node
640
636
  caret = %[#{ESC_BS}0#{ESC_BS}(fc#{ESC_BS}0]
641
637
  menu = node.attr 'menu'
642
638
  if !(submenus = node.attr 'submenus').empty?
643
- submenu_path = submenus.map {|item| %(#{ESC_BS}fI#{item}#{ESC_BS}fP) }.join caret
644
- %(#{ESC_BS}fI#{menu}#{ESC_BS}fP#{caret}#{submenu_path}#{caret}#{ESC_BS}fI#{node.attr 'menuitem'}#{ESC_BS}fP)
639
+ submenu_path = submenus.map {|item| %(<#{ESC_BS}fI>#{item}</#{ESC_BS}fP>) }.join caret
640
+ %(<#{ESC_BS}fI>#{menu}</#{ESC_BS}fP>#{caret}#{submenu_path}#{caret}<#{ESC_BS}fI>#{node.attr 'menuitem'}</#{ESC_BS}fP>)
645
641
  elsif (menuitem = node.attr 'menuitem')
646
- %(#{ESC_BS}fI#{menu}#{caret}#{menuitem}#{ESC_BS}fP)
642
+ %(<#{ESC_BS}fI>#{menu}#{caret}#{menuitem}</#{ESC_BS}fP>)
647
643
  else
648
- %(#{ESC_BS}fI#{menu}#{ESC_BS}fP)
644
+ %(<#{ESC_BS}fI>#{menu}</#{ESC_BS}fP>)
649
645
  end
650
646
  end
651
647
 
@@ -690,6 +690,7 @@ class PreprocessorReader < Reader
690
690
  @path = (path ||= ::File.basename file)
691
691
  # only process lines in AsciiDoc files
692
692
  if (@process_lines = file.end_with?(*ASCIIDOC_EXTENSIONS.keys))
693
+ # NOTE registering the include with a nil value tracks it while not making it visible to interdocument xrefs
693
694
  @includes[path.slice 0, (path.rindex '.')] = attributes['partial-option'] ? nil : true
694
695
  end
695
696
  else
@@ -697,6 +698,7 @@ class PreprocessorReader < Reader
697
698
  # we don't know what file type we have, so assume AsciiDoc
698
699
  @process_lines = true
699
700
  if (@path = path)
701
+ # NOTE registering the include with a nil value tracks it while not making it visible to interdocument xrefs
700
702
  @includes[Helpers.rootname path] = attributes['partial-option'] ? nil : true
701
703
  else
702
704
  @path = '<stdin>'
@@ -555,10 +555,12 @@ module Substitutors
555
555
  end
556
556
  text = ''
557
557
  case $3
558
- when ')'
559
- # move trailing ) out of URL
558
+ when ')', '?', '!'
560
559
  target = target.chop
561
- suffix = ')'
560
+ if (suffix = $3) == ')' && (target.end_with? '.', '?', '!')
561
+ suffix = target[-1] + suffix
562
+ target = target.chop
563
+ end
562
564
  # NOTE handle case when modified target is a URI scheme (e.g., http://)
563
565
  next $& if target.end_with? '://'
564
566
  when ';'
@@ -800,7 +802,7 @@ module Substitutors
800
802
  refid, path, target = nil, nil, '#'
801
803
  end
802
804
  else
803
- refid, path = path, %(#{doc.attributes['relfileprefix']}#{path}#{src2src ? (doc.attributes.fetch 'relfilesuffix', doc.outfilesuffix) : ''})
805
+ refid, path = path, %(#{doc.attributes['relfileprefix'] || ''}#{path}#{src2src ? (doc.attributes.fetch 'relfilesuffix', doc.outfilesuffix) : ''})
804
806
  if fragment
805
807
  refid, target = %(#{refid}##{fragment}), %(#{path}##{fragment})
806
808
  else
@@ -1472,13 +1474,13 @@ module Substitutors
1472
1474
  #
1473
1475
  # Returns a Hash of attributes (role and id only)
1474
1476
  def parse_quoted_text_attributes str
1475
- return {} if (str = str.rstrip).empty?
1476
1477
  # NOTE attributes are typically resolved after quoted text, so substitute eagerly
1477
1478
  str = sub_attributes str if str.include? ATTR_REF_HEAD
1478
1479
  # for compliance, only consider first positional attribute (very unlikely)
1479
1480
  str = str.slice 0, (str.index ',') if str.include? ','
1480
-
1481
- if (str.start_with? '.', '#') && Compliance.shorthand_property_syntax
1481
+ if (str = str.strip).empty?
1482
+ {}
1483
+ elsif (str.start_with? '.', '#') && Compliance.shorthand_property_syntax
1482
1484
  segments = str.split '#', 2
1483
1485
 
1484
1486
  if segments.size > 1
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Asciidoctor
3
- VERSION = '2.0.14'
3
+ VERSION = '2.0.15'
4
4
  end
data/man/asciidoctor.1 CHANGED
@@ -1,13 +1,13 @@
1
1
  '\" t
2
2
  .\" Title: asciidoctor
3
3
  .\" Author: Dan Allen, Sarah White, Ryan Waldron
4
- .\" Generator: Asciidoctor 2.0.14
5
- .\" Date: 2021-04-19
4
+ .\" Generator: Asciidoctor 2.0.15
5
+ .\" Date: 2021-04-27
6
6
  .\" Manual: Asciidoctor Manual
7
- .\" Source: Asciidoctor 2.0.14
7
+ .\" Source: Asciidoctor 2.0.15
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "ASCIIDOCTOR" "1" "2021-04-19" "Asciidoctor 2.0.14" "Asciidoctor Manual"
10
+ .TH "ASCIIDOCTOR" "1" "2021-04-27" "Asciidoctor 2.0.15" "Asciidoctor Manual"
11
11
  .ie \n(.g .ds Aq \(aq
12
12
  .el .ds Aq '
13
13
  .ss \n[.ss] 0
data/man/asciidoctor.adoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = asciidoctor(1)
2
2
  Dan Allen; Sarah White; Ryan Waldron
3
3
  :doctype: manpage
4
- :release-version: 2.0.14
4
+ :release-version: 2.0.15
5
5
  :man manual: Asciidoctor Manual
6
6
  :man source: Asciidoctor {release-version}
7
7
  :page-layout: base
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2021-04-19 00:00:00.000000000 Z
16
+ date: 2021-04-27 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: asciimath