asciidoctor 2.0.24 → 2.0.26

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b219565eafae2806084f9fee67def534a864eaaebc7891dced5d5f4cd238abb
4
- data.tar.gz: 51137dfb8f450991351e82b0da3d15ad923209dad72606ab2a5b868a78c6e1a0
3
+ metadata.gz: ed6d6e69371a79aefa806a8e715e0792b791deb30e3717d822da68396342e540
4
+ data.tar.gz: 57b8525a36fd011b185e12c4ca343b5a04a6641d8f1a2a27f53c805a195258c4
5
5
  SHA512:
6
- metadata.gz: 141b60fe34a662b4924f873985be200c1e5f9b574e44aa7336ec7febed0d3a4fbe8b8e8619441da2f7fdca51a17a0689155634cbde1fc63478c9dae6fd41d382
7
- data.tar.gz: 814788310c10bf2cdda6e7cde44a43fcd83702aea854aa48d9e51b3af77e9ec13c0966dbf73f298eb8d39ff84fe8aa5d01881283016ea49c3609c3bf065a663c
6
+ metadata.gz: 11725c7016dae18d51ecb4f2464c8ab18c5ce64413ea52016ebe117266916af4e03c3204d49da8500dd023794a82ff03b05bc44f29f8cca719ff02c7140de3e5
7
+ data.tar.gz: f70974e8aab598280097fb765509c9ce4846feae262fab936bfc7ae04410af20006d0b0af4cedeb40440f2d26deca6c8efc1a3982aff4fc13b935c0cc9ad988c
data/CHANGELOG.adoc CHANGED
@@ -16,6 +16,40 @@ For an even more detailed look at what has changed, refer to the {url-repo}/comm
16
16
  This project utilizes semantic versioning.
17
17
 
18
18
  // tag::compact[]
19
+ == 2.0.26 (2025-10-24) - @mojavelinux
20
+
21
+ Improvement::
22
+
23
+ * Use MathJax config recommended by MathJax itself; see https://docs.mathjax.org/en/latest/output/html.html#html-support (#4424)
24
+ * Use thin space between dots of an ellipsis (U+2026) in manpage output (#4568)
25
+
26
+ Bug Fixes::
27
+
28
+ * Don't use text of span as value of xreflabel when node has ID in DocBook output (#4539)
29
+ * Resolve attribute references (attributes substitution) in attrlist of toc macro (#4806)
30
+ * Cite stem macro specifically in warning message when macro has invalid substitutions (#4808)
31
+
32
+ === Details
33
+
34
+ {url-repo}/releases/tag/v2.0.26[git tag] | {url-repo}/compare/v2.0.25\...v2.0.26[full diff]
35
+ // end::compact[]
36
+
37
+ == 2.0.25 (2025-10-16) - @mojavelinux
38
+
39
+ Improvements::
40
+
41
+ * Don't freeze processor instance of extension to allow use of instance variables (#4782)
42
+
43
+ Bug Fixes::
44
+
45
+ * Fix false positive when looking for custom block macro, leading to superfluous debug message (#4785)
46
+ * Start sectlink after any supplemental anchors on section title when sectlinks is set (#2934)
47
+ * Remove trailing space after reftext in inline anchor shorthand (to accomodate trailing `]` in reftext) (#4789)
48
+
49
+ === Details
50
+
51
+ {url-repo}/releases/tag/v2.0.25[git tag] | {url-repo}/compare/v2.0.24\...v2.0.25[full diff]
52
+
19
53
  == 2.0.24 (2025-10-13) - @mojavelinux
20
54
 
21
55
  Compliance::
@@ -35,9 +69,10 @@ Improvements::
35
69
  Bug Fixes::
36
70
 
37
71
  * Consider `convert_` prefix when looking for missing convert method in converter (#4669) (*@eugoka*)
72
+ * Pass kwargs to Logger superclass and only assign defaults when kwarg is not specified (#4773)
73
+ * Set logdev to $stderr if no arguments are passed to Logger constructor (#4250)
38
74
  * Don't push conditional onto stack if conditional preprocessor directive is invalid when skipping lines (#4603)
39
75
  * Only style code tag as block element when inside pre in listing block; not inside verse block (#4610)
40
- * Pass kwargs to Logger superclass and only assign defaults when kwarg is not specified (#4773)
41
76
  * Don't add role=include to link macro that replaces include directive when running in compat mode (#4608)
42
77
 
43
78
  Documentation::
@@ -51,7 +86,6 @@ Build / Infrastructure::
51
86
  === Details
52
87
 
53
88
  {url-repo}/releases/tag/v2.0.24[git tag] | {url-repo}/compare/v2.0.23\...v2.0.24[full diff]
54
- // end::compact[]
55
89
 
56
90
  == 2.0.23 (2024-05-17) - @mojavelinux
57
91
 
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]>
3
- v2.0.24, 2025-10-13
3
+ v2.0.26, 2025-10-24
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -16,7 +16,7 @@ ifdef::env-github[]
16
16
  :warning-caption: :warning:
17
17
  endif::[]
18
18
  // Variables:
19
- :release-version: 2.0.24
19
+ :release-version: 2.0.26
20
20
  // URIs:
21
21
  :uri-org: https://github.com/asciidoctor
22
22
  :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]>
3
- v2.0.24, 2025-10-13
3
+ v2.0.26, 2025-10-24
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -16,7 +16,7 @@ ifdef::env-github[]
16
16
  :warning-caption: :warning:
17
17
  endif::[]
18
18
  // Variables:
19
- :release-version: 2.0.24
19
+ :release-version: 2.0.26
20
20
  // URIs:
21
21
  :uri-org: https://github.com/asciidoctor
22
22
  :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]>
3
- v2.0.24, 2025-10-13
3
+ v2.0.26, 2025-10-24
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -16,7 +16,7 @@ ifdef::env-github[]
16
16
  :warning-caption: :warning:
17
17
  endif::[]
18
18
  // Variables:
19
- :release-version: 2.0.24
19
+ :release-version: 2.0.26
20
20
  // URIs:
21
21
  :uri-org: https://github.com/asciidoctor
22
22
  :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]>
3
- v2.0.24, 2025-10-13
3
+ v2.0.26, 2025-10-24
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -17,7 +17,7 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.24
20
+ :release-version: 2.0.26
21
21
  // URIs:
22
22
  :uri-org: https://github.com/asciidoctor
23
23
  :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]>
3
- v2.0.24, 2025-10-13
3
+ v2.0.26, 2025-10-24
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -16,7 +16,7 @@ ifdef::env-github[]
16
16
  :warning-caption: :warning:
17
17
  endif::[]
18
18
  // Variables:
19
- :release-version: 2.0.24
19
+ :release-version: 2.0.26
20
20
  // URLs:
21
21
  :url-org: https://github.com/asciidoctor
22
22
  :url-repo: {url-org}/asciidoctor
@@ -623,7 +623,7 @@ class Converter::DocBook5Converter < Converter::Base
623
623
  quoted_text = %(#{open}#{text}#{close})
624
624
  end
625
625
 
626
- node.id ? %(<anchor#{common_attributes node.id, nil, text}/>#{quoted_text}) : quoted_text
626
+ node.id ? %(<anchor#{common_attributes node.id}/>#{quoted_text}) : quoted_text
627
627
  end
628
628
  end
629
629
 
@@ -22,6 +22,7 @@ class Converter::Html5Converter < Converter::Base
22
22
  }).default = ['', '']
23
23
 
24
24
  DropAnchorRx = %r(<(?:a\b[^>]*|/a)>)
25
+ LeadingAnchorsRx = %r(^(?:<a id="[^"]+"></a>)+)
25
26
  StemBreakRx = / *\\\n(?:\\?\n)*|\n\n+/
26
27
  if RUBY_ENGINE == 'opal'
27
28
  # NOTE In JavaScript, ^ matches the start of the string when the m flag is not set
@@ -289,7 +290,7 @@ MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
289
290
  })
290
291
  })
291
292
  </script>
292
- <script src="#{cdn_base_url}/mathjax/#{MATHJAX_VERSION}/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>)
293
+ <script src="#{cdn_base_url}/mathjax/#{MATHJAX_VERSION}/MathJax.js?config=TeX-MML-AM_CHTML"></script>)
293
294
  end
294
295
 
295
296
  unless (docinfo_content = node.docinfo :footer).empty?
@@ -402,7 +403,11 @@ MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
402
403
  if node.id
403
404
  id_attr = %( id="#{id = node.id}")
404
405
  if doc_attrs['sectlinks']
405
- title = %(<a class="link" href="##{id}">#{title}</a>)
406
+ if (title.start_with? '<a ') && LeadingAnchorsRx =~ title
407
+ title = %(#{$&}<a class="link" href="##{id}">#{title.slice $&.length, title.length}</a>)
408
+ else
409
+ title = %(<a class="link" href="##{id}">#{title}</a>)
410
+ end
406
411
  end
407
412
  if doc_attrs['sectanchors']
408
413
  # QUESTION should we add a font-based icon in anchor if icons=font?
@@ -707,7 +707,7 @@ allbox tab(:);'
707
707
  end
708
708
  str = str.
709
709
  gsub(LiteralBackslashRx) { $1 ? $& : '\\(rs' }. # literal backslash (not a troff escape sequence)
710
- gsub(EllipsisCharRefRx, '...'). # horizontal ellipsis
710
+ gsub(EllipsisCharRefRx, '.\|.\|.'). # horizontal ellipsis (emulate appearance)
711
711
  gsub(LeadingPeriodRx, '\\\&.'). # leading . is used in troff for macro call or other formatting; replace with \&.
712
712
  gsub(EscapedMacroRx) { (rest = $3.lstrip).empty? ? %(.#{$1}"#{$2}") : %(.#{$1}"#{$2.rstrip}"#{LF}#{rest}) }. # drop orphaned \c escape lines, unescape troff macro, quote adjacent character, isolate macro line
713
713
  gsub('-', '\-').
@@ -1375,8 +1375,7 @@ module Extensions
1375
1375
  unless processor.process_block_given?
1376
1376
  raise ::NoMethodError, %(No block specified to process #{kind_name} extension at #{block.source_location.join ':'})
1377
1377
  end
1378
- processor.freeze
1379
- extension = ProcessorExtension.new kind, processor
1378
+ processor_instance = processor
1380
1379
  else
1381
1380
  processor, config = resolve_args args, 2
1382
1381
  # style 2: specified as Class or String class name
@@ -1385,18 +1384,15 @@ module Extensions
1385
1384
  raise ::ArgumentError, %(Invalid type for #{kind_name} extension: #{processor})
1386
1385
  end
1387
1386
  processor_instance = processor_class.new config
1388
- processor_instance.freeze
1389
- extension = ProcessorExtension.new kind, processor_instance
1390
1387
  # style 3: specified as instance
1391
1388
  elsif kind_class === processor || (kind_java_class && kind_java_class === processor)
1392
1389
  processor.update_config config
1393
- processor.freeze
1394
- extension = ProcessorExtension.new kind, processor
1390
+ processor_instance = processor
1395
1391
  else
1396
1392
  raise ::ArgumentError, %(Invalid arguments specified for registering #{kind_name} extension: #{args})
1397
1393
  end
1398
1394
  end
1399
-
1395
+ extension = ProcessorExtension.new kind, processor_instance
1400
1396
  extension.config[:position] == :>> ? (kind_store.unshift extension) : (kind_store << extension)
1401
1397
  extension
1402
1398
  end
@@ -1422,8 +1418,7 @@ module Extensions
1422
1418
  unless processor.process_block_given?
1423
1419
  raise ::NoMethodError, %(No block specified to process #{kind_name} extension at #{block.source_location.join ':'})
1424
1420
  end
1425
- processor.freeze
1426
- kind_store[name] = ProcessorExtension.new kind, processor
1421
+ processor_instance = processor
1427
1422
  else
1428
1423
  processor, name, config = resolve_args args, 3
1429
1424
  # style 2: specified as Class or String class name
@@ -1435,8 +1430,6 @@ module Extensions
1435
1430
  unless (name = as_symbol processor_instance.name)
1436
1431
  raise ::ArgumentError, %(No name specified for #{kind_name} extension: #{processor})
1437
1432
  end
1438
- processor_instance.freeze
1439
- kind_store[name] = ProcessorExtension.new kind, processor_instance
1440
1433
  # style 3: specified as instance
1441
1434
  elsif kind_class === processor || (kind_java_class && kind_java_class === processor)
1442
1435
  processor.update_config config
@@ -1444,12 +1437,12 @@ module Extensions
1444
1437
  unless (name = name ? (processor.name = as_symbol name) : (as_symbol processor.name))
1445
1438
  raise ::ArgumentError, %(No name specified for #{kind_name} extension: #{processor})
1446
1439
  end
1447
- processor.freeze
1448
- kind_store[name] = ProcessorExtension.new kind, processor
1440
+ processor_instance = processor
1449
1441
  else
1450
1442
  raise ::ArgumentError, %(Invalid arguments specified for registering #{kind_name} extension: #{args})
1451
1443
  end
1452
1444
  end
1445
+ kind_store[name] = ProcessorExtension.new kind, processor_instance
1453
1446
  end
1454
1447
 
1455
1448
  def reset
@@ -641,11 +641,11 @@ class Parser
641
641
 
642
642
  elsif ch0 == 't' && (this_line.start_with? 'toc:') && BlockTocMacroRx =~ this_line
643
643
  block = Block.new parent, :toc, content_model: :empty
644
- block.parse_attributes $1, [], into: attributes if $1
644
+ block.parse_attributes $1, [], sub_input: true, into: attributes if $1
645
645
  break
646
646
 
647
- elsif block_macro_extensions ? (CustomBlockMacroRx =~ this_line &&
648
- (extension = extensions.registered_for_block_macro? $1) || (report_unknown_block_macro = logger.debug?)) :
647
+ elsif block_macro_extensions ? CustomBlockMacroRx =~ this_line &&
648
+ ((extension = extensions.registered_for_block_macro? $1) || (report_unknown_block_macro = logger.debug?)) :
649
649
  (logger.debug? && (report_unknown_block_macro = CustomBlockMacroRx =~ this_line))
650
650
  if report_unknown_block_macro
651
651
  logger.debug message_with_context %(unknown name for block macro: #{$1}), source_location: reader.cursor_at_mark
@@ -2238,13 +2238,13 @@ class Parser
2238
2238
  marker = '1.'
2239
2239
  when :loweralpha
2240
2240
  if validate
2241
- expected = ('a'[0].ord + ordinal).chr
2241
+ expected = (97 + ordinal).chr # 97 is a
2242
2242
  actual = marker.chop # remove trailing .
2243
2243
  end
2244
2244
  marker = 'a.'
2245
2245
  when :upperalpha
2246
2246
  if validate
2247
- expected = ('A'[0].ord + ordinal).chr
2247
+ expected = (65 + ordinal).chr # 65 is A
2248
2248
  actual = marker.chop # remove trailing .
2249
2249
  end
2250
2250
  marker = 'A.'
@@ -440,10 +440,10 @@ module Asciidoctor
440
440
  # anchor:idname[]
441
441
  # anchor:idname[Reference Text]
442
442
  #
443
- InlineAnchorRx = /(\\)?(?:\[\[([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)(?:, *(#{CC_ANY}+?))?\]\]|anchor:([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)\[(?:\]|(#{CC_ANY}*?[^\\])\]))/
443
+ InlineAnchorRx = /(\\)?(?:\[\[([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)(?:, *(#{CC_ANY}+?))? ?\]\]|anchor:([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)\[(?:\]|(#{CC_ANY}*?[^\\])\]))/
444
444
 
445
445
  # Scans for a non-escaped anchor (i.e., id + optional reference text) in the flow of text.
446
- InlineAnchorScanRx = /(?:^|[^\\\[])\[\[([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)(?:, *(#{CC_ANY}+?))?\]\]|(?:^|[^\\])anchor:([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)\[(?:\]|(#{CC_ANY}*?[^\\])\])/
446
+ InlineAnchorScanRx = /(?:^|[^\\\[])\[\[([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)(?:, *(#{CC_ANY}+?))? ?\]\]|(?:^|[^\\])anchor:([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)\[(?:\]|(#{CC_ANY}*?[^\\])\])/
447
447
 
448
448
  # Scans for a leading, non-escaped anchor (i.e., id + optional reference text).
449
449
  LeadingInlineAnchorRx = /^\[\[([#{CC_ALPHA}_:][#{CC_WORD}\-:.]*)(?:, *(#{CC_ANY}+?))?\]\]/
@@ -1134,7 +1134,7 @@ module Substitutors
1134
1134
  content = normalize_text $3, nil, true
1135
1135
  # NOTE drop enclosing $ signs around latexmath for backwards compatibility with AsciiDoc.py
1136
1136
  content = content.slice 1, content.length - 2 if type == :latexmath && (content.start_with? '$') && (content.end_with? '$')
1137
- subs = subs ? (resolve_pass_subs subs) : ((@document.basebackend? 'html') ? BASIC_SUBS : nil)
1137
+ subs = subs ? (resolve_pass_subs subs, 'stem macro') : ((@document.basebackend? 'html') ? BASIC_SUBS : nil)
1138
1138
  passthrus[passthru_key = passthrus.size] = { text: content, subs: subs, type: type }
1139
1139
  %(#{PASS_START}#{passthru_key}#{PASS_END})
1140
1140
  end if (text.include? ':') && ((text.include? 'stem:') || (text.include? 'math:'))
@@ -1242,8 +1242,8 @@ module Substitutors
1242
1242
  end
1243
1243
 
1244
1244
  # Public: Call resolve_subs for the :inline type with the subject set as passthrough macro.
1245
- def resolve_pass_subs subs
1246
- resolve_subs subs, :inline, nil, 'passthrough macro'
1245
+ def resolve_pass_subs subs, subject = 'passthrough macro'
1246
+ resolve_subs subs, :inline, nil, subject
1247
1247
  end
1248
1248
 
1249
1249
  # Public: Expand all groups in the subs list and return. If no subs are resolved, return nil.
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Asciidoctor
3
- VERSION = '2.0.24'
3
+ VERSION = '2.0.26'
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
4
- .\" Generator: Asciidoctor 2.0.23
4
+ .\" Generator: Asciidoctor 2.0.25
5
5
  .\" Date: 2018-03-20
6
6
  .\" Manual: Asciidoctor Manual
7
- .\" Source: Asciidoctor 2.0.24
7
+ .\" Source: Asciidoctor 2.0.26
8
8
  .\" Language: English
9
9
  .\"
10
- .TH "ASCIIDOCTOR" "1" "2018-03-20" "Asciidoctor 2.0.24" "Asciidoctor Manual"
10
+ .TH "ASCIIDOCTOR" "1" "2018-03-20" "Asciidoctor 2.0.26" "Asciidoctor Manual"
11
11
  .ie \n(.g .ds Aq \(aq
12
12
  .el .ds Aq '
13
13
  .ss \n[.ss] 0
@@ -31,7 +31,7 @@
31
31
  asciidoctor \- converts AsciiDoc source files to HTML, DocBook, and other formats
32
32
  .SH "SYNOPSIS"
33
33
  .sp
34
- \fBasciidoctor\fP [\fIOPTION\fP]... \fIFILE\fP...
34
+ \fBasciidoctor\fP [\fIOPTION\fP].\|.\|. \fIFILE\fP.\|.\|.
35
35
  .SH "DESCRIPTION"
36
36
  .sp
37
37
  The asciidoctor(1) command converts the AsciiDoc source file(s) \fIFILE\fP to HTML5, DocBook 5, man(ual) page, and other custom output formats.
data/man/asciidoctor.adoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = asciidoctor(1)
2
2
  Dan Allen; Sarah White
3
3
  :doctype: manpage
4
- :release-version: 2.0.24
4
+ :release-version: 2.0.26
5
5
  :man manual: Asciidoctor Manual
6
6
  :man source: Asciidoctor {release-version}
7
7
  ifdef::backend-manpage[:!author:]
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.24
4
+ version: 2.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen