@podlite/schema 0.0.78 → 0.0.79
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.podlite +14 -0
- package/esm/codes/read.d.ts +2 -1
- package/esm/codes/read.js +84 -7
- package/esm/codes/read.js.map +1 -1
- package/esm/exportHtml.js +16 -14
- package/esm/exportHtml.js.map +1 -1
- package/esm/exportMarkdown.js +15 -13
- package/esm/exportMarkdown.js.map +1 -1
- package/esm/grammar.js +919 -659
- package/esm/grammar.js.map +1 -1
- package/esm/helpers/alias.d.ts +10 -0
- package/esm/helpers/alias.js +53 -0
- package/esm/helpers/alias.js.map +1 -0
- package/esm/index.d.ts +3 -1
- package/esm/index.js +3 -1
- package/esm/index.js.map +1 -1
- package/esm/test-display.d.ts +2 -0
- package/esm/test-display.js +64 -0
- package/esm/test-display.js.map +1 -1
- package/esm/types.d.ts +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/codes/read.d.ts +2 -1
- package/lib/codes/read.js +85 -8
- package/lib/exportHtml.js +16 -14
- package/lib/exportMarkdown.js +15 -13
- package/lib/grammar.js +919 -659
- package/lib/helpers/alias.d.ts +10 -0
- package/lib/helpers/alias.js +57 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +12 -4
- package/lib/test-display.d.ts +2 -0
- package/lib/test-display.js +67 -1
- package/lib/types.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/schema/AstTree.json +1 -0
- package/schema/PodliteDocument.json +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ALIAS_EXPANSION_DEPTH = 8;
|
|
2
|
+
export declare const ALIAS_EXPANSION_BUDGET = 10000;
|
|
3
|
+
export declare const expandAlias: <T>(ctx: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}, term: string, walk: () => T, warn: (message: string) => void) => {
|
|
6
|
+
expanded: true;
|
|
7
|
+
result: T;
|
|
8
|
+
} | {
|
|
9
|
+
expanded: false;
|
|
10
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
=begin pod
|
|
3
|
+
|
|
4
|
+
=TITLE How far an alias is expanded
|
|
5
|
+
|
|
6
|
+
C<A<>> is replaced by the text of its alias, and that text is read and walked
|
|
7
|
+
again, so an alias may name another one, or itself. One use of C<A<>> in a text
|
|
8
|
+
starts an expansion; the expansions inside it share its state. An alias already
|
|
9
|
+
on the way is a cycle; a chain deeper than C<ALIAS_EXPANSION_DEPTH> or more
|
|
10
|
+
than C<ALIAS_EXPANSION_BUDGET> replacements in one expansion stops it. What is
|
|
11
|
+
refused is written as C<A<name>>, as an alias that is not defined, and is told
|
|
12
|
+
once per expansion.
|
|
13
|
+
|
|
14
|
+
A footnote walks its content later, when the expansion it stands in is over; it
|
|
15
|
+
starts an expansion of its own.
|
|
16
|
+
|
|
17
|
+
=end pod
|
|
18
|
+
*/
|
|
19
|
+
export const ALIAS_EXPANSION_DEPTH = 8;
|
|
20
|
+
export const ALIAS_EXPANSION_BUDGET = 10000;
|
|
21
|
+
const KEY = 'aliasExpansion';
|
|
22
|
+
// Expands `term` through `walk` when the limits let it, and returns true; returns
|
|
23
|
+
// false when it is refused, after telling why once per expansion. The state lives
|
|
24
|
+
// on ctx, so copies of ctx made inside the walk share it.
|
|
25
|
+
export const expandAlias = (ctx, term, walk, warn) => {
|
|
26
|
+
const open = ctx[KEY];
|
|
27
|
+
const state = open && open.chain.length ? open : { chain: [], spent: 0, told: false };
|
|
28
|
+
const refuse = (message) => {
|
|
29
|
+
if (!state.told)
|
|
30
|
+
warn(message);
|
|
31
|
+
state.told = true;
|
|
32
|
+
return { expanded: false };
|
|
33
|
+
};
|
|
34
|
+
if (state.chain.includes(term)) {
|
|
35
|
+
return refuse(`alias ${term} expands into itself: ${[...state.chain, term].join(' → ')}`);
|
|
36
|
+
}
|
|
37
|
+
if (state.chain.length >= ALIAS_EXPANSION_DEPTH) {
|
|
38
|
+
return refuse(`alias ${term} expands deeper than ${ALIAS_EXPANSION_DEPTH} levels: ${state.chain.join(' → ')} → ${term}`);
|
|
39
|
+
}
|
|
40
|
+
if (state.spent >= ALIAS_EXPANSION_BUDGET) {
|
|
41
|
+
return refuse(`alias expansion ${state.chain[0] ?? term} makes more than ${ALIAS_EXPANSION_BUDGET} replacements`);
|
|
42
|
+
}
|
|
43
|
+
state.spent++;
|
|
44
|
+
state.chain.push(term);
|
|
45
|
+
ctx[KEY] = state;
|
|
46
|
+
try {
|
|
47
|
+
return { expanded: true, result: walk() };
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
state.chain.pop();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=alias.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../src/helpers/alias.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAA;AAI3C,MAAM,GAAG,GAAG,gBAAgB,CAAA;AAE5B,kFAAkF;AAClF,kFAAkF;AAClF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,GAA2B,EAC3B,IAAY,EACZ,IAAa,EACb,IAA+B,EACsB,EAAE;IACvD,MAAM,IAAI,GAA0B,GAAG,CAAC,GAAG,CAAC,CAAA;IAC5C,MAAM,KAAK,GAAc,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;IAChG,MAAM,MAAM,GAAG,CAAC,OAAe,EAAuB,EAAE;QACtD,IAAI,CAAC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9
|
export * from './query-helpers';
|
|
10
10
|
export * from './ast-helpers';
|
|
11
|
+
export { expandAlias, ALIAS_EXPANSION_DEPTH, ALIAS_EXPANSION_BUDGET } from './helpers/alias';
|
|
12
|
+
export { MARKUP_CODE_DEPTH_LIMIT } from './codes/read';
|
|
11
13
|
export * from './helpers/handlers';
|
|
12
14
|
export { makeInterator } from './ast-inerator';
|
|
13
15
|
export { makeTransformer, isNamedBlock, isSemanticBlock } from './helpers/makeTransformer';
|
|
@@ -101,7 +103,7 @@ export { applySetToFirst, mergeSet, isSetTransparent, isSetTarget } from './set-
|
|
|
101
103
|
export type { SetOutcome } from './set-assign';
|
|
102
104
|
export { markGuarded, isCovered, guardedTextLeaves, getMaskedTextContent, renderCodeText } from './guard';
|
|
103
105
|
export { applyFoldedSections } from './folded-sections';
|
|
104
|
-
export { testCaption, testFoldedByAuthor } from './test-display';
|
|
106
|
+
export { testCaption, testFoldedByAuthor, canOwnTest, mayHoldTests } from './test-display';
|
|
105
107
|
export { tocTitleText } from './toc-caption';
|
|
106
108
|
export type { SelectorDoc, ParsedSelector, SelectorOptions } from './selectors';
|
|
107
109
|
export { applyImageBase } from './image-base';
|
package/esm/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export * from './attribute-names.js';
|
|
|
9
9
|
export * from './blocks-helpers.js';
|
|
10
10
|
export * from './query-helpers.js';
|
|
11
11
|
export * from './ast-helpers.js';
|
|
12
|
+
export { expandAlias, ALIAS_EXPANSION_DEPTH, ALIAS_EXPANSION_BUDGET } from './helpers/alias.js';
|
|
13
|
+
export { MARKUP_CODE_DEPTH_LIMIT } from './codes/read.js';
|
|
12
14
|
export * from './helpers/handlers.js';
|
|
13
15
|
export { makeInterator } from './ast-inerator.js';
|
|
14
16
|
export { makeTransformer, isNamedBlock, isSemanticBlock } from './helpers/makeTransformer.js';
|
|
@@ -172,7 +174,7 @@ export { parseSelector, readSelector, runSelector, outermost, filePathMatches, g
|
|
|
172
174
|
export { applySetToFirst, mergeSet, isSetTransparent, isSetTarget } from './set-assign.js';
|
|
173
175
|
export { markGuarded, isCovered, guardedTextLeaves, getMaskedTextContent, renderCodeText } from './guard.js';
|
|
174
176
|
export { applyFoldedSections } from './folded-sections.js';
|
|
175
|
-
export { testCaption, testFoldedByAuthor } from './test-display.js';
|
|
177
|
+
export { testCaption, testFoldedByAuthor, canOwnTest, mayHoldTests } from './test-display.js';
|
|
176
178
|
export { tocTitleText } from './toc-caption.js';
|
|
177
179
|
export { applyImageBase } from './image-base.js';
|
|
178
180
|
export { version } from './version.js';
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAoC,MAAM,KAAK,CAAA;AACtD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,WAA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O,EAAE,MAAM,WAAW,CAAA"}
|
package/esm/test-display.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const testCaption: (node: any, ctx: any) => string;
|
|
2
2
|
export declare const testFoldedByAuthor: (node: any, ctx: any) => boolean | undefined;
|
|
3
3
|
export declare const longestBacktickRun: (text: string) => number;
|
|
4
|
+
export declare const canOwnTest: (node: unknown) => boolean;
|
|
5
|
+
export declare const mayHoldTests: (node: unknown) => boolean;
|
package/esm/test-display.js
CHANGED
|
@@ -55,4 +55,68 @@ export const testFoldedByAuthor = (node, ctx) => {
|
|
|
55
55
|
};
|
|
56
56
|
// A fence has to be longer than any run of backticks inside what it encloses.
|
|
57
57
|
export const longestBacktickRun = (text) => Math.max(0, ...(text.match(/`+/g) || []).map(run => run.length));
|
|
58
|
+
// a heading, a directive, a comment or data says nothing a test could check, and a
|
|
59
|
+
// directive wrapped into a group would lose the reach it has over what follows
|
|
60
|
+
const NOT_A_TEST_OWNER = new Set([
|
|
61
|
+
'head',
|
|
62
|
+
'comment',
|
|
63
|
+
'data',
|
|
64
|
+
'test',
|
|
65
|
+
'fixture',
|
|
66
|
+
'assert',
|
|
67
|
+
'resource',
|
|
68
|
+
'include',
|
|
69
|
+
'toc',
|
|
70
|
+
'pod',
|
|
71
|
+
]);
|
|
72
|
+
const isRecord = (value) => typeof value === 'object' && value !== null;
|
|
73
|
+
/*
|
|
74
|
+
=begin pod :kind<export>
|
|
75
|
+
|
|
76
|
+
=head2 canOwnTest
|
|
77
|
+
|
|
78
|
+
Whether a node can be the block a C<=test> right after it belongs to. A test
|
|
79
|
+
belongs to the nearest preceding sibling that is not itself a test; when that
|
|
80
|
+
sibling cannot own it, the page draws the test with no rule and the linter warns.
|
|
81
|
+
A paragraph, a list and code can; so can any block but a heading, a directive, a
|
|
82
|
+
comment, data, a part of a test, a table of contents and the blocks the tree adds,
|
|
83
|
+
whose names begin with C<_>.
|
|
84
|
+
|
|
85
|
+
=end pod
|
|
86
|
+
*/
|
|
87
|
+
export const canOwnTest = (node) => {
|
|
88
|
+
if (!isRecord(node))
|
|
89
|
+
return false;
|
|
90
|
+
if (node.type === 'para' || node.type === 'list' || node.type === 'code')
|
|
91
|
+
return true;
|
|
92
|
+
if (node.type !== 'block' || typeof node.name !== 'string')
|
|
93
|
+
return false;
|
|
94
|
+
return !node.name.startsWith('_') && !NOT_A_TEST_OWNER.has(node.name);
|
|
95
|
+
};
|
|
96
|
+
// source, data and the parts of a test hold no tests of their own
|
|
97
|
+
const HOLDS_NO_TESTS = new Set([
|
|
98
|
+
'test',
|
|
99
|
+
'fixture',
|
|
100
|
+
'assert',
|
|
101
|
+
'resource',
|
|
102
|
+
'code',
|
|
103
|
+
'comment',
|
|
104
|
+
'data',
|
|
105
|
+
'markdown',
|
|
106
|
+
'input',
|
|
107
|
+
'output',
|
|
108
|
+
'formula',
|
|
109
|
+
]);
|
|
110
|
+
/*
|
|
111
|
+
=begin pod :kind<export>
|
|
112
|
+
|
|
113
|
+
=head2 mayHoldTests
|
|
114
|
+
|
|
115
|
+
Whether a test can stand among the children of a node, so that a pass over the
|
|
116
|
+
tests of a document goes into it: no for a test itself and its parts, and for
|
|
117
|
+
code, comments, data, Markdown, input, output and formulas.
|
|
118
|
+
|
|
119
|
+
=end pod
|
|
120
|
+
*/
|
|
121
|
+
export const mayHoldTests = (node) => !isRecord(node) || !HOLDS_NO_TESTS.has(String(node.name));
|
|
58
122
|
//# sourceMappingURL=test-display.js.map
|
package/esm/test-display.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-display.js","sourceRoot":"","sources":["../src/test-display.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;;EAWE;AAEF;;;;;;;;;;;EAWE;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAS,EAAE,GAAQ,EA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M;IACN,SAAS;IACT,MAAM;IACN,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;CACV,CAAC,CAAA;AAEF;;;;;;;;;;EAUE;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA"}
|
package/esm/types.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export interface RootBlock extends Omit<Block, 'location'> {
|
|
|
147
147
|
}
|
|
148
148
|
export interface ParseDiagnostic {
|
|
149
149
|
severity: 'warning';
|
|
150
|
-
code: 'value-unreadable' | 'directive-unreadable' | 'table-row-cells' | 'table-cell-outside-row' | 'table-mixed-separators' | 'table-source-unreadable' | 'table-source-empty' | 'table-source-deferred' | 'markup-code-unclosed' | 'markup-code-longer-run' | 'markup-code-foreign-closer' | 'markup-code-reserved' | 'markup-code-unsupported' | 'markup-code-unreadable';
|
|
150
|
+
code: 'value-unreadable' | 'directive-unreadable' | 'table-row-cells' | 'table-cell-outside-row' | 'table-mixed-separators' | 'table-source-unreadable' | 'table-source-empty' | 'table-source-deferred' | 'markup-code-unclosed' | 'markup-code-longer-run' | 'markup-code-foreign-closer' | 'markup-code-reserved' | 'markup-code-unsupported' | 'markup-code-unreadable' | 'markup-code-too-deep';
|
|
151
151
|
message: string;
|
|
152
152
|
location: Location;
|
|
153
153
|
}
|
package/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.79";
|
package/esm/version.js
CHANGED
package/lib/codes/read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CodeIssueKind = 'markup-code-unclosed' | 'markup-code-longer-run' | 'markup-code-foreign-closer' | 'markup-code-reserved' | 'markup-code-unsupported' | 'markup-code-unreadable';
|
|
1
|
+
export type CodeIssueKind = 'markup-code-unclosed' | 'markup-code-longer-run' | 'markup-code-foreign-closer' | 'markup-code-reserved' | 'markup-code-unsupported' | 'markup-code-unreadable' | 'markup-code-too-deep';
|
|
2
2
|
export interface CodeIssue {
|
|
3
3
|
code: CodeIssueKind;
|
|
4
4
|
message: string;
|
|
@@ -16,5 +16,6 @@ export interface ReadOptions {
|
|
|
16
16
|
type Content = Array<string | {
|
|
17
17
|
[key: string]: unknown;
|
|
18
18
|
}>;
|
|
19
|
+
export declare const MARKUP_CODE_DEPTH_LIMIT = 32;
|
|
19
20
|
export declare const readCodes: (text: string, options?: ReadOptions) => Content;
|
|
20
21
|
export {};
|
package/lib/codes/read.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readCodes = void 0;
|
|
3
|
+
exports.readCodes = exports.MARKUP_CODE_DEPTH_LIMIT = void 0;
|
|
4
4
|
/*
|
|
5
5
|
=begin pod
|
|
6
6
|
|
|
@@ -19,6 +19,11 @@ readers of the tree see the same fields.
|
|
|
19
19
|
const scan_1 = require("./scan");
|
|
20
20
|
const handlers_1 = require("../helpers/handlers");
|
|
21
21
|
const entities_1 = require("entities");
|
|
22
|
+
// Codes nested deeper than this are written out as text. The tree walkers after the
|
|
23
|
+
// reader recurse, and the depth of an alias expansion adds to the depth of the place
|
|
24
|
+
// it stands in, so the limit is set with ALIAS_EXPANSION_DEPTH: 8 expansions of 32
|
|
25
|
+
// levels stay well inside what every walker holds.
|
|
26
|
+
exports.MARKUP_CODE_DEPTH_LIMIT = 32;
|
|
22
27
|
const RESERVED = ['Q', 'Y'];
|
|
23
28
|
const HS = /^[ \t\u000C ]+/;
|
|
24
29
|
// the closing delimiter a code was opened with
|
|
@@ -30,9 +35,28 @@ const readCodes = (text, options = {}) => {
|
|
|
30
35
|
allowedIn: options.allowedIn,
|
|
31
36
|
};
|
|
32
37
|
const { codes, issues } = (0, scan_1.scanCodes)(text, scope);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
// what reading the codes finds is held until the scanner's warnings are out, which
|
|
39
|
+
// come first, as before
|
|
40
|
+
const found = [];
|
|
41
|
+
const report = (code, message, start, end) => found.push({ code, message, start, end });
|
|
42
|
+
// the codes past the depth limit: each is written out as it stands, with all it holds
|
|
43
|
+
const tooDeep = [];
|
|
44
|
+
const levels = codes.map(code => ({ code, depth: 1 }));
|
|
45
|
+
while (levels.length) {
|
|
46
|
+
const { code, depth } = levels.pop();
|
|
47
|
+
if (depth > exports.MARKUP_CODE_DEPTH_LIMIT) {
|
|
48
|
+
tooDeep.push(code);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
for (const child of code.children)
|
|
52
|
+
levels.push({ code: child, depth: depth + 1 });
|
|
53
|
+
}
|
|
54
|
+
// A code past the limit is told only when it reaches the tree: a holder that keeps its
|
|
55
|
+
// body as written, such as A<> or an address, drops what its codes read. Each code
|
|
56
|
+
// records the codes it placed, and the cut ones reached from the top are the ones told.
|
|
57
|
+
const cut = new Set(tooDeep);
|
|
58
|
+
const placed = new Map();
|
|
59
|
+
let holder = null;
|
|
36
60
|
// each code is read once, after the codes it holds, so deep nesting needs no recursion
|
|
37
61
|
const built = new Map();
|
|
38
62
|
// text between codes, the codes themselves read by their letter
|
|
@@ -42,6 +66,11 @@ const readCodes = (text, options = {}) => {
|
|
|
42
66
|
for (const code of list) {
|
|
43
67
|
if (code.start > i)
|
|
44
68
|
out.push(text.slice(i, code.start));
|
|
69
|
+
const kids = placed.get(holder);
|
|
70
|
+
if (kids)
|
|
71
|
+
kids.push(code);
|
|
72
|
+
else
|
|
73
|
+
placed.set(holder, [code]);
|
|
45
74
|
out.push(...(built.get(code) || []));
|
|
46
75
|
i = code.end;
|
|
47
76
|
}
|
|
@@ -182,8 +211,10 @@ const readCodes = (text, options = {}) => {
|
|
|
182
211
|
};
|
|
183
212
|
}
|
|
184
213
|
const content = part(code, code.bodyStart, bar);
|
|
185
|
-
//
|
|
186
|
-
|
|
214
|
+
// whitespace on either side of the bar is not significant (Specification 3930); a
|
|
215
|
+
// specification holding spaces is quoted (4040), and the quotes are not part of the
|
|
216
|
+
// address, so what they hold keeps its spaces
|
|
217
|
+
const written = addressOf(code, specFrom, configAt < 0 ? code.bodyEnd : specFrom + configAt).trim();
|
|
187
218
|
const address = configAt < 0 ? written : unquote(written);
|
|
188
219
|
if (configAt < 0)
|
|
189
220
|
return { content, type: 'fcode', name, meta: address };
|
|
@@ -245,9 +276,22 @@ const readCodes = (text, options = {}) => {
|
|
|
245
276
|
};
|
|
246
277
|
// read the codes after the codes they hold, without recursion
|
|
247
278
|
const order = [];
|
|
279
|
+
// written out as it stands, except that a comment is left out and a hidden word masked,
|
|
280
|
+
// as in an address, so text past the limit shows nothing the codes would hide
|
|
281
|
+
const asWritten = (code) => code.name === 'Z'
|
|
282
|
+
? ''
|
|
283
|
+
: code.name === 'G'
|
|
284
|
+
? (0, handlers_1.maskText)(text.slice(code.bodyStart, code.bodyEnd))
|
|
285
|
+
: text.slice(code.start, code.bodyStart) +
|
|
286
|
+
addressOf(code, code.bodyStart, code.bodyEnd) +
|
|
287
|
+
text.slice(code.bodyEnd, code.end);
|
|
288
|
+
for (const code of tooDeep)
|
|
289
|
+
built.set(code, [asWritten(code)]);
|
|
248
290
|
const stack = codes.map(code => ({ code, open: false })).reverse();
|
|
249
291
|
while (stack.length) {
|
|
250
292
|
const top = stack.pop();
|
|
293
|
+
if (cut.has(top.code))
|
|
294
|
+
continue;
|
|
251
295
|
if (top.open)
|
|
252
296
|
order.push(top.code);
|
|
253
297
|
else {
|
|
@@ -256,9 +300,42 @@ const readCodes = (text, options = {}) => {
|
|
|
256
300
|
stack.push({ code: top.code.children[k], open: false });
|
|
257
301
|
}
|
|
258
302
|
}
|
|
259
|
-
for (const code of order)
|
|
303
|
+
for (const code of order) {
|
|
304
|
+
holder = code;
|
|
260
305
|
built.set(code, node(code));
|
|
261
|
-
|
|
306
|
+
}
|
|
307
|
+
holder = null;
|
|
308
|
+
const content = contentOf(codes, 0, text.length);
|
|
309
|
+
const used = new Set();
|
|
310
|
+
const reach = [null];
|
|
311
|
+
while (reach.length) {
|
|
312
|
+
for (const code of placed.get(reach.pop()) ?? []) {
|
|
313
|
+
if (cut.has(code))
|
|
314
|
+
used.add(code);
|
|
315
|
+
else
|
|
316
|
+
reach.push(code);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// what the scanner says about text that is no longer read as codes is not said
|
|
320
|
+
const usedCuts = Array.from(used);
|
|
321
|
+
const inCut = (at) => usedCuts.some(code => at >= code.start && at < code.end);
|
|
322
|
+
const scanned = [];
|
|
323
|
+
for (const issue of issues)
|
|
324
|
+
if (!inCut(issue.kind === 'unclosed' ? issue.code.start : issue.start))
|
|
325
|
+
reportScan(issue, (code, message, start, end) => scanned.push({ code, message, start, end }));
|
|
326
|
+
if (used.size) {
|
|
327
|
+
const first = usedCuts.reduce((a, b) => (b.start < a.start ? b : a));
|
|
328
|
+
found.push({
|
|
329
|
+
code: 'markup-code-too-deep',
|
|
330
|
+
message: `markup codes nest deeper than ${exports.MARKUP_CODE_DEPTH_LIMIT} levels; the deeper ones are written out as text`,
|
|
331
|
+
start: first.start,
|
|
332
|
+
end: first.end,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (options.issues)
|
|
336
|
+
for (const issue of [scanned, found].flat())
|
|
337
|
+
options.issues.push(issue);
|
|
338
|
+
return content;
|
|
262
339
|
};
|
|
263
340
|
exports.readCodes = readCodes;
|
|
264
341
|
// the text of read content, without recursion: Z<> left out, G<> masked when asked,
|
package/lib/exportHtml.js
CHANGED
|
@@ -45,6 +45,7 @@ const image_base_1 = require("./image-base");
|
|
|
45
45
|
const guard_1 = require("./guard");
|
|
46
46
|
const writerHtml_1 = __importDefault(require("./writerHtml"));
|
|
47
47
|
const plugin_clean_location_1 = __importDefault(require("./plugin-clean-location"));
|
|
48
|
+
const alias_1 = require("./helpers/alias");
|
|
48
49
|
const ast_helpers_1 = require("./ast-helpers");
|
|
49
50
|
const link_config_1 = require("./helpers/link-config");
|
|
50
51
|
const test_display_1 = require("./test-display");
|
|
@@ -125,21 +126,22 @@ const rules = {
|
|
|
125
126
|
'A<>': (writer, processor) => (node, ctx, interator) => {
|
|
126
127
|
//get replacement text
|
|
127
128
|
const term = (0, handlers_1.collectText)(node.content).trim();
|
|
128
|
-
|
|
129
|
+
const expanded = ctx.alias &&
|
|
130
|
+
ctx.alias.hasOwnProperty(term) &&
|
|
131
|
+
(0, alias_1.expandAlias)(ctx, term, () => {
|
|
132
|
+
const src = ctx.alias[term].join('\n');
|
|
133
|
+
const tree_1 = processor(src);
|
|
134
|
+
// now clean locations
|
|
135
|
+
const tree = (0, plugin_clean_location_1.default)()(tree_1);
|
|
136
|
+
if (tree[0].type === 'para') {
|
|
137
|
+
interator(tree[0].content, ctx);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
interator(tree, ctx);
|
|
141
|
+
}
|
|
142
|
+
}, message => console.warn(`[podlite] ${message}`)).expanded;
|
|
143
|
+
if (!expanded)
|
|
129
144
|
writer.write(`A<${covered(node, ctx, term)}>`);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
const src = ctx.alias[term].join('\n');
|
|
133
|
-
const tree_1 = processor(src);
|
|
134
|
-
// now clean locations
|
|
135
|
-
const tree = (0, plugin_clean_location_1.default)()(tree_1);
|
|
136
|
-
if (tree[0].type === 'para') {
|
|
137
|
-
interator(tree[0].content, ctx);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
interator(tree, ctx);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
145
|
},
|
|
144
146
|
'C<>': (0, handlers_1.wrapContent)('<code>', '</code>'),
|
|
145
147
|
'E<>': (writer, processor) => (node, ctx, interator) => {
|
package/lib/exportMarkdown.js
CHANGED
|
@@ -44,6 +44,7 @@ const configPropagation_1 = require("./helpers/configPropagation");
|
|
|
44
44
|
const image_base_1 = require("./image-base");
|
|
45
45
|
const writerMarkdown_1 = __importDefault(require("./writerMarkdown"));
|
|
46
46
|
const plugin_clean_location_1 = __importDefault(require("./plugin-clean-location"));
|
|
47
|
+
const alias_1 = require("./helpers/alias");
|
|
47
48
|
const ast_helpers_1 = require("./ast-helpers");
|
|
48
49
|
const html_attr_1 = require("./helpers/html-attr");
|
|
49
50
|
const link_config_1 = require("./helpers/link-config");
|
|
@@ -161,20 +162,21 @@ const rules = {
|
|
|
161
162
|
// Formatting codes
|
|
162
163
|
'A<>': (writer, processor) => (node, ctx, interator) => {
|
|
163
164
|
const term = (0, handlers_1.collectText)(node.content).trim();
|
|
164
|
-
|
|
165
|
+
const expanded = ctx.alias &&
|
|
166
|
+
ctx.alias.hasOwnProperty(term) &&
|
|
167
|
+
(0, alias_1.expandAlias)(ctx, term, () => {
|
|
168
|
+
const src = ctx.alias[term].join('\n');
|
|
169
|
+
const tree_1 = processor(src);
|
|
170
|
+
const tree = (0, plugin_clean_location_1.default)()(tree_1);
|
|
171
|
+
if (tree[0].type === 'para') {
|
|
172
|
+
interator(tree[0].content, ctx);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
interator(tree, ctx);
|
|
176
|
+
}
|
|
177
|
+
}, message => console.warn(`[podlite] ${message}`)).expanded;
|
|
178
|
+
if (!expanded)
|
|
165
179
|
writer.writeRaw(`A<${covered(node, ctx, term)}>`);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
const src = ctx.alias[term].join('\n');
|
|
169
|
-
const tree_1 = processor(src);
|
|
170
|
-
const tree = (0, plugin_clean_location_1.default)()(tree_1);
|
|
171
|
-
if (tree[0].type === 'para') {
|
|
172
|
-
interator(tree[0].content, ctx);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
interator(tree, ctx);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
180
|
},
|
|
179
181
|
'C<>': (0, handlers_1.wrapContent)('`', '`'),
|
|
180
182
|
'D<>': (writer, processor) => (node, ctx, interator) => {
|