asciidoctor 2.0.24 → 2.0.25

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: 15bd78ac6106922b76adf86234dbee3e2c477401dbd69f011bea808166cadbca
4
+ data.tar.gz: 22dc236b8852541f241b8076c7bd0427ed768c4a82acebaff35ebb37c3e47fec
5
5
  SHA512:
6
- metadata.gz: 141b60fe34a662b4924f873985be200c1e5f9b574e44aa7336ec7febed0d3a4fbe8b8e8619441da2f7fdca51a17a0689155634cbde1fc63478c9dae6fd41d382
7
- data.tar.gz: 814788310c10bf2cdda6e7cde44a43fcd83702aea854aa48d9e51b3af77e9ec13c0966dbf73f298eb8d39ff84fe8aa5d01881283016ea49c3609c3bf065a663c
6
+ metadata.gz: 274206a482d52d7e6fa7be668de7953ed3d137c200a861487d3be3252a868bb780f1eb36345247d706f9bfdbf6644902d5a48a345dc2f6dfc7bfcfd9eb1be851
7
+ data.tar.gz: aa4831bbfc906f8605757b93e6ec3cdea9919b3d8f15d737962066a9a3356ad268bb67335c4e91866b10a960f03d21aa506d10e8b08a44f2ad1e54cea1e9e3b0
data/CHANGELOG.adoc CHANGED
@@ -16,6 +16,23 @@ 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.25 (2025-10-16) - @mojavelinux
20
+
21
+ Improvements::
22
+
23
+ * Don't freeze processor instance of extension to allow use of instance variables (#4782)
24
+
25
+ Bug Fixes::
26
+
27
+ * Fix false positive when looking for custom block macro, leading to superfluous debug message (#4785)
28
+ * Start sectlink after any supplemental anchors on section title when sectlinks is set (#2934)
29
+ * Remove trailing space after reftext in inline anchor shorthand (to accomodate trailing `]` in reftext) (#4789)
30
+
31
+ === Details
32
+
33
+ {url-repo}/releases/tag/v2.0.25[git tag] | {url-repo}/compare/v2.0.24\...v2.0.25[full diff]
34
+ // end::compact[]
35
+
19
36
  == 2.0.24 (2025-10-13) - @mojavelinux
20
37
 
21
38
  Compliance::
@@ -35,9 +52,10 @@ Improvements::
35
52
  Bug Fixes::
36
53
 
37
54
  * Consider `convert_` prefix when looking for missing convert method in converter (#4669) (*@eugoka*)
55
+ * Pass kwargs to Logger superclass and only assign defaults when kwarg is not specified (#4773)
56
+ * Set logdev to $stderr if no arguments are passed to Logger constructor (#4250)
38
57
  * Don't push conditional onto stack if conditional preprocessor directive is invalid when skipping lines (#4603)
39
58
  * 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
59
  * Don't add role=include to link macro that replaces include directive when running in compat mode (#4608)
42
60
 
43
61
  Documentation::
@@ -51,7 +69,6 @@ Build / Infrastructure::
51
69
  === Details
52
70
 
53
71
  {url-repo}/releases/tag/v2.0.24[git tag] | {url-repo}/compare/v2.0.23\...v2.0.24[full diff]
54
- // end::compact[]
55
72
 
56
73
  == 2.0.23 (2024-05-17) - @mojavelinux
57
74
 
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.25, 2025-10-16
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.25
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.25, 2025-10-16
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.25
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.25, 2025-10-16
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.25
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.25, 2025-10-16
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.25
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.25, 2025-10-16
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.25
20
20
  // URLs:
21
21
  :url-org: https://github.com/asciidoctor
22
22
  :url-repo: {url-org}/asciidoctor
@@ -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
@@ -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?
@@ -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
@@ -644,8 +644,8 @@ class Parser
644
644
  block.parse_attributes $1, [], 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
@@ -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}+?))?\]\]/
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Asciidoctor
3
- VERSION = '2.0.24'
3
+ VERSION = '2.0.25'
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.24
5
5
  .\" Date: 2018-03-20
6
6
  .\" Manual: Asciidoctor Manual
7
- .\" Source: Asciidoctor 2.0.24
7
+ .\" Source: Asciidoctor 2.0.25
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.25" "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
3
3
  :doctype: manpage
4
- :release-version: 2.0.24
4
+ :release-version: 2.0.25
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.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen