@baiyibai-antora/extensions 1.24.0 → 1.25.0
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 +14 -0
- package/dist/extensions/autoterm/index.d.ts +3 -9
- package/dist/extensions/autoterm/index.d.ts.map +1 -1
- package/dist/extensions/autoterm/index.js +19 -24
- package/dist/extensions/autoterm/index.js.map +1 -1
- package/dist/extensions/cite-it/assembly-numbering.d.ts.map +1 -1
- package/dist/extensions/cite-it/assembly-numbering.js +10 -13
- package/dist/extensions/cite-it/assembly-numbering.js.map +1 -1
- package/dist/extensions/cite-it/index.d.ts.map +1 -1
- package/dist/extensions/cite-it/index.js +11 -20
- package/dist/extensions/cite-it/index.js.map +1 -1
- package/dist/extensions/cite-it/macro.js +1 -1
- package/dist/extensions/cite-it/macro.js.map +1 -1
- package/dist/extensions/trademark-it/index.d.ts +42 -30
- package/dist/extensions/trademark-it/index.d.ts.map +1 -1
- package/dist/extensions/trademark-it/index.js +125 -115
- package/dist/extensions/trademark-it/index.js.map +1 -1
- package/dist/lib/asciidoc-conditionals.d.ts +63 -44
- package/dist/lib/asciidoc-conditionals.d.ts.map +1 -1
- package/dist/lib/asciidoc-conditionals.js +0 -0
- package/dist/lib/asciidoc-conditionals.js.map +1 -1
- package/dist/lib/asciidoc-indexterms.js +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,78 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Suppresses unsatisfied `ifdef::`/`ifndef::` conditional blocks in raw
|
|
3
|
-
* AsciiDoc source
|
|
4
|
-
* a hand-rolled directive parser. See
|
|
5
|
-
* agent-memory/autoterm-trademark-it-api-rewrite-scope.md (Phase 2) for why
|
|
6
|
-
* real nesting, multi-line vs. inline forms, and `+`/`,` combinator
|
|
7
|
-
* semantics are exactly the class of edge case a regex-based evaluator gets
|
|
8
|
-
* wrong under pressure, and Asciidoctor already implements all of it
|
|
9
|
-
* correctly.
|
|
3
|
+
* AsciiDoc source by letting Asciidoctor itself read the document, rather
|
|
4
|
+
* than a hand-rolled directive or block parser. See
|
|
5
|
+
* agent-memory/autoterm-trademark-it-api-rewrite-scope.md (Phase 2) for why.
|
|
10
6
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* `evaluateDocument` runs a full `Asciidoctor.load()` parse. Asciidoctor's
|
|
8
|
+
* parser applies every attribute entry where it sits, with its own rules for
|
|
9
|
+
* the document header, block boundaries, and verbatim blocks, and its
|
|
10
|
+
* preprocessing reader evaluates each conditional directive lazily against
|
|
11
|
+
* the attribute state at that line. Include directives go to an
|
|
12
|
+
* IncludeProcessor registered through the public extension API, so an
|
|
13
|
+
* include inside a suppressed block is never resolved, an included file is
|
|
14
|
+
* read with the attribute state at its include line, and entries inside it
|
|
15
|
+
* apply to everything after it. A block comment is skipped by the parser
|
|
16
|
+
* itself, so directives inside one are never evaluated.
|
|
17
|
+
*
|
|
18
|
+
* Which source lines survive is observed, not inferred: before every source
|
|
19
|
+
* line the document text carries a probe `include::` line, which the same
|
|
20
|
+
* IncludeProcessor answers with no content. A probe reaches the processor
|
|
21
|
+
* only when the reader processes that position, so a line survives exactly
|
|
22
|
+
* when its probe fires. An empty include leaves no line behind, so the
|
|
23
|
+
* probes do not change how the document parses.
|
|
24
|
+
*
|
|
25
|
+
* Directive lines are recognized with Asciidoctor's own
|
|
26
|
+
* `ConditionalDirectiveRx`. Two rewrites happen before the parse:
|
|
13
27
|
*
|
|
14
|
-
* - `include::` lines: the reader's own filesystem-based include
|
|
15
|
-
* resolution runs unconditionally otherwise, and it knows nothing of
|
|
16
|
-
* Antora's content catalog. `collectIncludeText` resolves includes
|
|
17
|
-
* afterward, against the real catalog. Hidden here, restored after.
|
|
18
28
|
* - `ifeval::` blocks: intentionally not evaluated, matching this
|
|
19
|
-
*
|
|
29
|
+
* module's documented contract (an expression evaluator is out of
|
|
20
30
|
* scope). The opening line and its matching `endif::` are blanked so the
|
|
21
31
|
* body passes through as ordinary content; nested `ifdef::`/`ifndef::`
|
|
22
|
-
* inside an `ifeval::` block still evaluates normally
|
|
23
|
-
* `ifeval::` markers themselves are hidden.
|
|
32
|
+
* inside an `ifeval::` block still evaluates normally.
|
|
24
33
|
* - `scan_ignore_conditionals`-forced attributes: force-suppression only
|
|
25
|
-
* ever applies to `ifdef::`, never `ifndef
|
|
26
|
-
* attributes hash cannot make one attribute simultaneously "defined" for
|
|
27
|
-
* `ifndef::` and "undefined" for `ifdef::`, so a forced `ifdef::`
|
|
34
|
+
* ever applies to `ifdef::`, never `ifndef::`, so a forced `ifdef::`
|
|
28
35
|
* expression is rewritten to reference a synthetic attribute name that
|
|
29
|
-
* is never defined
|
|
30
|
-
* value; the matching `ifndef::` (same real attribute name, if present)
|
|
31
|
-
* is left untouched.
|
|
36
|
+
* is never defined; the matching `ifndef::` is left untouched.
|
|
32
37
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* first shipped: it does not strip `////` block comments. Verified
|
|
36
|
-
* empirically that Asciidoctor's raw preprocessor reader — `parse: false`,
|
|
37
|
-
* what this function uses — does not recognize a `////` block comment as a
|
|
38
|
-
* unit at all; comment-BLOCK recognition turned out to be a parser-level
|
|
39
|
-
* concern, only correctly handled during a full parse (autoterm's indexterm
|
|
40
|
-
* scanner, which does a full `.convert()`, is unaffected by this). A
|
|
41
|
-
* directive-like line sitting inside an unstripped block comment is still
|
|
42
|
-
* evaluated for real by this function, which can suppress or reveal content
|
|
43
|
-
* that is supposed to be entirely inert. Callers that need comment-stripping
|
|
44
|
-
* too must do it themselves, before calling this function — trademark-it's
|
|
45
|
-
* `stripNonContent` is the reference for how.
|
|
38
|
+
* The single-line form `ifdef::name[content]` is expanded to the block form
|
|
39
|
+
* with `content` on its own line, so that line carries its own probe.
|
|
46
40
|
*/
|
|
47
|
-
|
|
41
|
+
/** An included file's text and caller-defined context, from an IncludeResolver. */
|
|
42
|
+
export interface ResolvedInclude<C> {
|
|
43
|
+
text: string;
|
|
44
|
+
context: C;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolves an include:: target met while reading the file with context
|
|
48
|
+
* `including`. `attrlist` carries the directive's tag, tags, and lines
|
|
49
|
+
* attributes in `name=value` form. Returns undefined to leave the include
|
|
50
|
+
* unresolved.
|
|
51
|
+
*/
|
|
52
|
+
export type IncludeResolver<C> = (target: string, attrlist: string, including: C) => ResolvedInclude<C> | undefined;
|
|
53
|
+
/** A file read by evaluateDocument: its context and its surviving text. */
|
|
54
|
+
export interface EvaluatedFile<C> {
|
|
55
|
+
context: C;
|
|
56
|
+
text: string;
|
|
57
|
+
}
|
|
48
58
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
59
|
+
* Read `text` as Asciidoctor reads it and return, for the file itself and
|
|
60
|
+
* every file it includes, the text that survives conditional evaluation.
|
|
61
|
+
* Every other line is blanked, so each file keeps its line count. A
|
|
62
|
+
* surviving include:: line stays in its file's text.
|
|
52
63
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
64
|
+
* `attributes` seeds the document the way Antora seeds it with a
|
|
65
|
+
* component-version's compiled attributes: a value ending in `@` is soft
|
|
66
|
+
* set, so an attribute entry in the document overrides it; any other value
|
|
67
|
+
* is locked. Included files follow the root file in the order the reader
|
|
68
|
+
* first reaches them, each ahead of the files it includes itself.
|
|
69
|
+
*/
|
|
70
|
+
export declare function evaluateDocument<C>(text: string, rootContext: C, attributes: Record<string, unknown>, forceIgnore?: string[], resolveInclude?: IncludeResolver<C>): EvaluatedFile<C>[];
|
|
71
|
+
/**
|
|
72
|
+
* Suppress unsatisfied conditional blocks in `text` without resolving
|
|
73
|
+
* includes. Each attribute a directive references is soft set when
|
|
74
|
+
* `isDefined` answers true for it, so attribute entries in `text` override
|
|
75
|
+
* it from their position on.
|
|
57
76
|
*/
|
|
58
|
-
export declare function
|
|
77
|
+
export declare function suppressUnsetConditionals(text: string, isDefined: (attr: string) => boolean, forceIgnore?: string[]): string;
|
|
59
78
|
//# sourceMappingURL=asciidoc-conditionals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asciidoc-conditionals.d.ts","sourceRoot":"","sources":["../../src/lib/asciidoc-conditionals.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asciidoc-conditionals.d.ts","sourceRoot":"","sources":["../../src/lib/asciidoc-conditionals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAuEH,mFAAmF;AACnF,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,CAAC;CACZ;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,KAAK,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAEpH,2EAA2E;AAC3E,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,CAAC,EACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,WAAW,GAAE,MAAM,EAAO,EAC1B,cAAc,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAClC,aAAa,CAAC,CAAC,CAAC,EAAE,CA6DpB;AAiBD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACpC,WAAW,GAAE,MAAM,EAAO,GACzB,MAAM,CAMR"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asciidoc-conditionals.js","sourceRoot":"","sources":["../../src/lib/asciidoc-conditionals.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"asciidoc-conditionals.js","sourceRoot":"","sources":["../../src/lib/asciidoc-conditionals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;;;;;AAuGH,4CAmEC;AAuBD,8DAUC;AAzMD,6DAA4C;AAE5C,MAAM,SAAS,GAAG,IAAA,cAAW,GAAE,CAAC;AAEhC,4EAA4E;AAC5E,MAAM,wBAAwB,GAC3B,UAAuF,CAAC,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC;AAEnI,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAClD,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAS3C,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7D,MAAM,CAAC,GAAG,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,MAAc,EAAE,MAAmB;IACpD,OAAO,MAAM;SACV,KAAK,CAAC,MAAM,CAAC;SACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAClC,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC;AA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CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CACvC,IAAY,EACZ,SAAoC,EACpC,cAAwB,EAAE;IAE1B,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,IAAI,SAAS,CAAC,IAAI,CAAC;YAAE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC;IAC5D,CAAC;IACD,OAAO,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC"}
|
|
@@ -129,7 +129,7 @@ const MD_HEADING_RE = /^#{1,6}\s+\S/;
|
|
|
129
129
|
* including page wraps in a `[source,...]`/`----` delimited block never
|
|
130
130
|
* reaches a real reader as bare text at all, since Asciidoctor treats
|
|
131
131
|
* delimited-block content as literal, never heading-parsed. But
|
|
132
|
-
*
|
|
132
|
+
* stripWithIncludes resolves the include TARGET's raw content directly,
|
|
133
133
|
* with no awareness of the delimited-block wrapper the including page
|
|
134
134
|
* puts around it, so a Python or shell `#` comment line lands in the scan
|
|
135
135
|
* buffer as bare top-level text. Confirmed live: reproduces with nothing
|