@baiyibai-antora/extensions 1.25.0 → 1.25.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.
package/CHANGELOG.adoc
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
All notable changes to this project will be documented in this file.
|
|
5
5
|
|
|
6
|
+
== [1.25.1] - 2026-10-12
|
|
7
|
+
|
|
8
|
+
=== Fixed
|
|
9
|
+
|
|
10
|
+
* autoterm: an indexterm in a discrete heading, in a block title, or in a level-0 heading after page content, such as a partial included with `leveloffset`, never reached the generated terminology table; the scan now records raw title text and demotes such a level-0 heading to level 1 instead of discarding it
|
|
11
|
+
|
|
6
12
|
== [1.25.0] - 2026-09-24
|
|
7
13
|
|
|
8
14
|
=== Fixed
|
|
@@ -67,13 +67,16 @@
|
|
|
67
67
|
* doctype ("level 0 sections can only be used when doctype is book").
|
|
68
68
|
* `doctype: 'book'` was tried and rejected: book doctype requires each
|
|
69
69
|
* level-0 part to contain at least one section, which ordinary flat
|
|
70
|
-
* page content doesn't have either. Fixed instead by
|
|
71
|
-
* `=`-level-0 title line outside the header prologue before
|
|
72
|
-
* (see `sanitizeForScan` for the positional rule and why
|
|
73
|
-
* first" was not enough)
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
70
|
+
* page content doesn't have either. Fixed instead by demoting every
|
|
71
|
+
* `=`-level-0 title line outside the header prologue to `==` before
|
|
72
|
+
* scanning (see `sanitizeForScan` for the positional rule and why
|
|
73
|
+
* "after the first" was not enough), which turns a structurally-
|
|
74
|
+
* invalid multi-document concatenation into one valid document the
|
|
75
|
+
* real engine parses cleanly. Blanking the line instead, the earlier
|
|
76
|
+
* fix, assumed title text never carries indexterm markup; a partial
|
|
77
|
+
* written at level 0 and included with `leveloffset` (a widget
|
|
78
|
+
* heading such as `[discrete]` then `= Widget Frame Counter
|
|
79
|
+
* (((Widget Frame Counter (WFC))) Unit 1`) does, and lost the term. Exported as
|
|
77
80
|
* `sanitizeForScan` and reused by cite-it's own scans, which hit this
|
|
78
81
|
* same class of hazard from more than one direction; see that
|
|
79
82
|
* function's own docblock for the fullest, current account of every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asciidoc-indexterms.d.ts","sourceRoot":"","sources":["../../src/lib/asciidoc-indexterms.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asciidoc-indexterms.d.ts","sourceRoot":"","sources":["../../src/lib/asciidoc-indexterms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AAaH,MAAM,WAAW,SAAS;IACxB,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAmED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBpD;AA4ID,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAuE9D"}
|
|
@@ -68,13 +68,16 @@
|
|
|
68
68
|
* doctype ("level 0 sections can only be used when doctype is book").
|
|
69
69
|
* `doctype: 'book'` was tried and rejected: book doctype requires each
|
|
70
70
|
* level-0 part to contain at least one section, which ordinary flat
|
|
71
|
-
* page content doesn't have either. Fixed instead by
|
|
72
|
-
* `=`-level-0 title line outside the header prologue before
|
|
73
|
-
* (see `sanitizeForScan` for the positional rule and why
|
|
74
|
-
* first" was not enough)
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
71
|
+
* page content doesn't have either. Fixed instead by demoting every
|
|
72
|
+
* `=`-level-0 title line outside the header prologue to `==` before
|
|
73
|
+
* scanning (see `sanitizeForScan` for the positional rule and why
|
|
74
|
+
* "after the first" was not enough), which turns a structurally-
|
|
75
|
+
* invalid multi-document concatenation into one valid document the
|
|
76
|
+
* real engine parses cleanly. Blanking the line instead, the earlier
|
|
77
|
+
* fix, assumed title text never carries indexterm markup; a partial
|
|
78
|
+
* written at level 0 and included with `leveloffset` (a widget
|
|
79
|
+
* heading such as `[discrete]` then `= Widget Frame Counter
|
|
80
|
+
* (((Widget Frame Counter (WFC))) Unit 1`) does, and lost the term. Exported as
|
|
78
81
|
* `sanitizeForScan` and reused by cite-it's own scans, which hit this
|
|
79
82
|
* same class of hazard from more than one direction; see that
|
|
80
83
|
* function's own docblock for the fullest, current account of every
|
|
@@ -150,7 +153,10 @@ const MD_HEADING_RE = /^#{1,6}\s+\S/;
|
|
|
150
153
|
* fails with the same "level 0 sections" error a second title did. Twelve
|
|
151
154
|
* such wrapper pages produced twelve error lines per build. So the rule
|
|
152
155
|
* is positional, not ordinal: a title still inside the header prologue is
|
|
153
|
-
* kept, every other one is blanked
|
|
156
|
+
* kept, every other one is demoted to `==`. Demoted, not blanked: a
|
|
157
|
+
* level-0 title after content is usually a partial's own heading, written
|
|
158
|
+
* at level 0 for an `include::[leveloffset=...]` the scan never applies,
|
|
159
|
+
* and its text can carry indexterm markup that must still be scanned.
|
|
154
160
|
*/
|
|
155
161
|
const HEADER_PROLOGUE_LINE_RE = /^(\s*|:!?[\w-]+!?:.*|\/\/.*)$/;
|
|
156
162
|
function sanitizeForScan(text) {
|
|
@@ -164,7 +170,7 @@ function sanitizeForScan(text) {
|
|
|
164
170
|
return '';
|
|
165
171
|
if (TITLE_RE.test(line)) {
|
|
166
172
|
if (!inHeaderPrologue)
|
|
167
|
-
return
|
|
173
|
+
return `=${line}`;
|
|
168
174
|
inHeaderPrologue = false;
|
|
169
175
|
return line;
|
|
170
176
|
}
|
|
@@ -239,6 +245,15 @@ CapturingConverter.prototype.convert = function (node, transform) {
|
|
|
239
245
|
const source = sourceForParent(parent, this.sourceLines);
|
|
240
246
|
if (source)
|
|
241
247
|
this.liveBlocks.add(source);
|
|
248
|
+
// An indexterm in a title has no raw text in source: a discrete
|
|
249
|
+
// heading (floating_title) has an empty getSource() and no source
|
|
250
|
+
// location, and a block title (`.Title`) is not part of its block's
|
|
251
|
+
// getSource(). The raw title survives as the Opal `title` instance
|
|
252
|
+
// variable; record it unless the source already contains it (a
|
|
253
|
+
// section's own heading line does).
|
|
254
|
+
const rawTitle = parent?.title;
|
|
255
|
+
if (typeof rawTitle === 'string' && !(source && source.includes(rawTitle)))
|
|
256
|
+
this.liveBlocks.add(rawTitle);
|
|
242
257
|
}
|
|
243
258
|
return html5Converter.convert(node, transform);
|
|
244
259
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asciidoc-indexterms.js","sourceRoot":"","sources":["../../src/lib/asciidoc-indexterms.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"asciidoc-indexterms.js","sourceRoot":"","sources":["../../src/lib/asciidoc-indexterms.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;;;;;AAqFH,0CAgBC;AA4ID,wCAuEC;AAtTD,6DAA4C;AAG5C,MAAM,SAAS,GAAG,IAAA,cAAW,GAAE,CAAC;AAChC,MAAM,cAAc,GAClB,SACD,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE5B,oFAAoF;AACpF,MAAM,YAAY,GAAG,kCAAkC,CAAC;AASxD,MAAM,aAAa,GAAG,2CAA2C,CAAC;AAClE,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,oEAAoE;AACpE,wEAAwE;AACxE,oEAAoE;AACpE,sEAAsE;AACtE,gEAAgE;AAChE,sEAAsE;AACtE,oEAAoE;AACpE,MAAM,aAAa,GAAG,cAAc,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,uBAAuB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