podlite 0.0.96 → 0.0.98
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 +34 -0
- package/esm/assemble/index.js +5 -4
- package/esm/assemble/index.js.map +1 -1
- package/esm/lint/grammar/lint.js +47 -22
- package/esm/lint/grammar/lint.js.map +1 -1
- package/esm/lint/grammar/scan.js +6 -6
- package/esm/lint/grammar/scan.js.map +1 -1
- package/esm/lint/implicit-code.d.ts +3 -0
- package/esm/lint/implicit-code.js +83 -0
- package/esm/lint/implicit-code.js.map +1 -0
- package/esm/lint/index.js +4 -2
- package/esm/lint/index.js.map +1 -1
- package/esm/lint/line-starts.d.ts +3 -0
- package/esm/lint/line-starts.js +14 -0
- package/esm/lint/line-starts.js.map +1 -0
- package/esm/lint/rules/abbreviated-attrs.js +6 -4
- package/esm/lint/rules/abbreviated-attrs.js.map +1 -1
- package/esm/lint/rules/allow-value.d.ts +3 -0
- package/esm/lint/rules/allow-value.js +42 -0
- package/esm/lint/rules/allow-value.js.map +1 -0
- package/esm/lint/rules/dead-definitions.js +19 -8
- package/esm/lint/rules/dead-definitions.js.map +1 -1
- package/esm/lint/rules/index.js +6 -0
- package/esm/lint/rules/index.js.map +1 -1
- package/esm/lint/rules/link-targets.js +8 -2
- package/esm/lint/rules/link-targets.js.map +1 -1
- package/esm/lint/rules/list-depth.d.ts +3 -0
- package/esm/lint/rules/list-depth.js +10 -0
- package/esm/lint/rules/list-depth.js.map +1 -0
- package/esm/lint/rules/markdown-in-pod.js +36 -4
- package/esm/lint/rules/markdown-in-pod.js.map +1 -1
- package/esm/lint/rules/table-column-width.d.ts +2 -3
- package/esm/lint/rules/table-column-width.js +8 -112
- package/esm/lint/rules/table-column-width.js.map +1 -1
- package/esm/lint/rules/unclosed-markup-code.js +46 -10
- package/esm/lint/rules/unclosed-markup-code.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/assemble/index.js +5 -4
- package/lib/assemble/index.js.map +1 -1
- package/lib/lint/grammar/lint.js +47 -22
- package/lib/lint/grammar/lint.js.map +1 -1
- package/lib/lint/grammar/scan.js +6 -6
- package/lib/lint/grammar/scan.js.map +1 -1
- package/lib/lint/implicit-code.d.ts +3 -0
- package/lib/lint/implicit-code.js +86 -0
- package/lib/lint/implicit-code.js.map +1 -0
- package/lib/lint/index.js +4 -2
- package/lib/lint/index.js.map +1 -1
- package/lib/lint/line-starts.d.ts +3 -0
- package/lib/lint/line-starts.js +19 -0
- package/lib/lint/line-starts.js.map +1 -0
- package/lib/lint/rules/abbreviated-attrs.js +6 -4
- package/lib/lint/rules/abbreviated-attrs.js.map +1 -1
- package/lib/lint/rules/allow-value.d.ts +3 -0
- package/lib/lint/rules/allow-value.js +45 -0
- package/lib/lint/rules/allow-value.js.map +1 -0
- package/lib/lint/rules/dead-definitions.js +19 -8
- package/lib/lint/rules/dead-definitions.js.map +1 -1
- package/lib/lint/rules/index.js +6 -0
- package/lib/lint/rules/index.js.map +1 -1
- package/lib/lint/rules/link-targets.js +8 -2
- package/lib/lint/rules/link-targets.js.map +1 -1
- package/lib/lint/rules/list-depth.d.ts +3 -0
- package/lib/lint/rules/list-depth.js +13 -0
- package/lib/lint/rules/list-depth.js.map +1 -0
- package/lib/lint/rules/markdown-in-pod.js +36 -4
- package/lib/lint/rules/markdown-in-pod.js.map +1 -1
- package/lib/lint/rules/table-column-width.d.ts +2 -3
- package/lib/lint/rules/table-column-width.js +8 -113
- package/lib/lint/rules/table-column-width.js.map +1 -1
- package/lib/lint/rules/unclosed-markup-code.js +46 -10
- package/lib/lint/rules/unclosed-markup-code.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allow-value.js","sourceRoot":"","sources":["../../../src/lint/rules/allow-value.ts"],"names":[],"mappings":";;;AAAA,4CAAoG;AAGvF,QAAA,mBA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CAAC,CAAC,CAAA;IACN,CAAC,CAAC;CACL,CAAA"}
|
|
@@ -8,13 +8,16 @@ const attr = (node, name) => {
|
|
|
8
8
|
return item && item.value !== undefined && item.value !== null ? String(item.value) : undefined;
|
|
9
9
|
};
|
|
10
10
|
// An alias node carries no location, so the line is read back from the source;
|
|
11
|
-
// a warning that cannot say where is a warning the author cannot act on.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
// a warning that cannot say where is a warning the author cannot act on. The
|
|
12
|
+
// source is read once for all aliases, and the first line declaring a name wins.
|
|
13
|
+
const aliasLines = (source) => {
|
|
14
|
+
const lines = new Map();
|
|
15
|
+
source.split(/\r?\n/).forEach((line, at) => {
|
|
16
|
+
const found = /^\s*=alias\s+(\S+)(\s|$)/.exec(line);
|
|
17
|
+
if (found && !lines.has(found[1]))
|
|
18
|
+
lines.set(found[1], at + 1);
|
|
19
|
+
});
|
|
20
|
+
return lines;
|
|
18
21
|
};
|
|
19
22
|
const definitions = (ast) => {
|
|
20
23
|
const nodes = (0, schema_1.getFromTree)(ast, () => true);
|
|
@@ -68,6 +71,14 @@ exports.deadDefinitionsRule = {
|
|
|
68
71
|
return [];
|
|
69
72
|
const aliases = aliasUses(ast);
|
|
70
73
|
const keys = dataUses(ctx.source || '');
|
|
74
|
+
let lines;
|
|
75
|
+
const aliasLine = (name) => {
|
|
76
|
+
lines = lines || aliasLines(ctx.source || '');
|
|
77
|
+
const line = lines.get(name);
|
|
78
|
+
return line === undefined
|
|
79
|
+
? undefined
|
|
80
|
+
: { start: { line, column: 1, offset: 0 }, end: { line, column: 1, offset: 0 } };
|
|
81
|
+
};
|
|
71
82
|
return declared
|
|
72
83
|
.filter(item => !(item.kind === 'alias' ? aliases.has(item.name) : keys.has(item.name)))
|
|
73
84
|
.map(item => ({
|
|
@@ -76,7 +87,7 @@ exports.deadDefinitionsRule = {
|
|
|
76
87
|
message: item.kind === 'alias'
|
|
77
88
|
? `=alias ${item.name} is never used; A<${item.name}> appears nowhere in the document`
|
|
78
89
|
: `=data :key<${item.name}> is never used; data:${item.name} appears nowhere in the document`,
|
|
79
|
-
location: item.location || (item.kind === 'alias' ? aliasLine(
|
|
90
|
+
location: item.location || (item.kind === 'alias' ? aliasLine(item.name) : undefined),
|
|
80
91
|
}));
|
|
81
92
|
},
|
|
82
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-definitions.js","sourceRoot":"","sources":["../../../src/lint/rules/dead-definitions.ts"],"names":[],"mappings":";;;AAAA,4CAAsF;AAGzE,QAAA,wBAAwB,GAAG,kBAAkB,CAAA;AAY1D,MAAM,IAAI,GAAG,CAAC,IAAa,EAAE,IAAY,EAAsB,EAAE;IAC/D,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;IAC5F,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACjG,CAAC,CAAA;AAED,+EAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"dead-definitions.js","sourceRoot":"","sources":["../../../src/lint/rules/dead-definitions.ts"],"names":[],"mappings":";;;AAAA,4CAAsF;AAGzE,QAAA,wBAAwB,GAAG,kBAAkB,CAAA;AAY1D,MAAM,IAAI,GAAG,CAAC,IAAa,EAAE,IAAY,EAAsB,EAAE;IAC/D,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,C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CAAC,CAAA;QAED,OAAO,QAAQ;aACZ,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aACvF,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACZ,IAAI,EAAE,gCAAwB;YAC9B,QAAQ,EAAE,SAAkB;YAC5B,OAAO,EACL,IAAI,CAAC,IAAI,KAAK,OAAO;gBACnB,CAAC,CAAC,UAAU,IAAI,CAAC,IAAI,qBAAqB,IAAI,CAAC,IAAI,mCAAmC;gBACtF,CAAC,CAAC,cAAc,IAAI,CAAC,IAAI,yBAAyB,IAAI,CAAC,IAAI,kCAAkC;YACjG,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACtF,CAAC,CAAC,CAAA;IACP,CAAC;CACF,CAAA"}
|
package/lib/lint/rules/index.js
CHANGED
|
@@ -12,12 +12,15 @@ const link_file_resolves_1 = require("./link-file-resolves");
|
|
|
12
12
|
const link_not_empty_1 = require("./link-not-empty");
|
|
13
13
|
const attr_value_dropped_1 = require("./attr-value-dropped");
|
|
14
14
|
const table_shape_1 = require("./table-shape");
|
|
15
|
+
const table_column_width_1 = require("./table-column-width");
|
|
16
|
+
const list_depth_1 = require("./list-depth");
|
|
15
17
|
const markup_code_too_deep_1 = require("./markup-code-too-deep");
|
|
16
18
|
const dead_definitions_1 = require("./dead-definitions");
|
|
17
19
|
const include_resolves_1 = require("./include-resolves");
|
|
18
20
|
const named_blocks_1 = require("./named-blocks");
|
|
19
21
|
const notify_attribute_1 = require("./notify-attribute");
|
|
20
22
|
const toc_title_attribute_1 = require("./toc-title-attribute");
|
|
23
|
+
const allow_value_1 = require("./allow-value");
|
|
21
24
|
exports.DEFAULT_RULES = [
|
|
22
25
|
syntax_valid_1.syntaxValidRule,
|
|
23
26
|
heading_hierarchy_1.headingHierarchyRule,
|
|
@@ -30,6 +33,8 @@ exports.DEFAULT_RULES = [
|
|
|
30
33
|
link_not_empty_1.linkNotEmptyRule,
|
|
31
34
|
attr_value_dropped_1.attrValueDroppedRule,
|
|
32
35
|
table_shape_1.tableShapeRule,
|
|
36
|
+
table_column_width_1.tableColumnWidthRule,
|
|
37
|
+
list_depth_1.listDepthRule,
|
|
33
38
|
markup_code_too_deep_1.markupCodeTooDeepRule,
|
|
34
39
|
dead_definitions_1.deadDefinitionsRule,
|
|
35
40
|
include_resolves_1.includeResolvesRule,
|
|
@@ -37,5 +42,6 @@ exports.DEFAULT_RULES = [
|
|
|
37
42
|
named_blocks_1.imageNamedBlockRule,
|
|
38
43
|
notify_attribute_1.notifyAttributeRule,
|
|
39
44
|
toc_title_attribute_1.tocTitleAttributeRule,
|
|
45
|
+
allow_value_1.allowValueRule,
|
|
40
46
|
];
|
|
41
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAChD,2DAA0D;AAC1D,qDAAoD;AACpD,uDAAqD;AACrD,2CAA0C;AAC1C,+DAA6D;AAC7D,iEAA+D;AAC/D,6DAA2D;AAC3D,qDAAmD;AACnD,6DAA2D;AAC3D,+CAA8C;AAC9C,iEAA8D;AAC9D,yDAAwD;AACxD,yDAAwD;AACxD,iDAA6E;AAC7E,yDAAwD;AACxD,+DAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAChD,2DAA0D;AAC1D,qDAAoD;AACpD,uDAAqD;AACrD,2CAA0C;AAC1C,+DAA6D;AAC7D,iEAA+D;AAC/D,6DAA2D;AAC3D,qDAAmD;AACnD,6DAA2D;AAC3D,+CAA8C;AAC9C,6DAA2D;AAC3D,6CAA4C;AAC5C,iEAA8D;AAC9D,yDAAwD;AACxD,yDAAwD;AACxD,iDAA6E;AAC7E,yDAAwD;AACxD,+DAA6D;AAC7D,+CAA8C;AAEjC,QAAA,aAAa,GAAW;IACnC,8BAAe;IACf,wCAAoB;IACpB,kCAAiB;IACjB,mCAAiB;IACjB,wBAAY;IACZ,2CAAqB;IACrB,6CAAsB;IACtB,yCAAoB;IACpB,iCAAgB;IAChB,yCAAoB;IACpB,4BAAc;IACd,yCAAoB;IACpB,0BAAa;IACb,4CAAqB;IACrB,sCAAmB;IACnB,sCAAmB;IACnB,sCAAuB;IACvB,kCAAmB;IACnB,sCAAmB;IACnB,2CAAqB;IACrB,4BAAc;CACf,CAAA"}
|
|
@@ -5,8 +5,11 @@ exports.readAddress = exports.collectLinks = void 0;
|
|
|
5
5
|
const textOf = (value) => {
|
|
6
6
|
if (typeof value === 'string')
|
|
7
7
|
return value;
|
|
8
|
-
if (value && typeof value === 'object'
|
|
9
|
-
|
|
8
|
+
if (value && typeof value === 'object') {
|
|
9
|
+
const inner = Reflect.get(value, 'value');
|
|
10
|
+
if (typeof inner === 'string')
|
|
11
|
+
return inner;
|
|
12
|
+
}
|
|
10
13
|
return '';
|
|
11
14
|
};
|
|
12
15
|
// A link without display text carries the target in its content instead of meta.
|
|
@@ -24,6 +27,9 @@ const collectLinks = (node, at) => {
|
|
|
24
27
|
if (!node || typeof node !== 'object')
|
|
25
28
|
return [];
|
|
26
29
|
const n = node;
|
|
30
|
+
// a comment is not rendered, so a link inside it leads nowhere and is not checked
|
|
31
|
+
if (n.type === 'block' && n.name === 'comment')
|
|
32
|
+
return [];
|
|
27
33
|
const here = n.location || at;
|
|
28
34
|
const found = isLink(n) ? [{ target: linkTarget(n), at: here }] : [];
|
|
29
35
|
return [...found, ...(0, exports.collectLinks)(n.content, here)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-targets.js","sourceRoot":"","sources":["../../../src/lint/rules/link-targets.ts"],"names":[],"mappings":";;;AAcA,6EAA6E;AAC7E,MAAM,MAAM,GAAG,CAAC,KAAc,EAAU,EAAE;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"link-targets.js","sourceRoot":"","sources":["../../../src/lint/rules/link-targets.ts"],"names":[],"mappings":";;;AAcA,6EAA6E;AAC7E,MAAM,MAAM,GAAG,CAAC,KAAc,EAAU,EAAE;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,KAAK,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAClD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;IAC7C,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAED,iFAAiF;AACjF,MAAM,UAAU,GAAG,CAAC,IAAc,EAAU,EAAE;IAC5C,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/D,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;AAClC,CAAC,CAAA;AAED,MAAM,MAAM,GA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,EAAe,EAAE;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IACxD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAC1C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC3D,CAAC,CAAA;AALY,QAAA,WAAW,eAKvB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listDepthRule = exports.LIST_DEPTH_RULE_ID = void 0;
|
|
4
|
+
exports.LIST_DEPTH_RULE_ID = 'list-depth';
|
|
5
|
+
// passes on what the parser reports about a list nested deeper than it builds
|
|
6
|
+
exports.listDepthRule = {
|
|
7
|
+
id: exports.LIST_DEPTH_RULE_ID,
|
|
8
|
+
severity: 'warning',
|
|
9
|
+
check: (ast, _ctx) => (ast.diagnostics || [])
|
|
10
|
+
.filter(d => d.code === 'list-too-deep')
|
|
11
|
+
.map(d => ({ rule: exports.LIST_DEPTH_RULE_ID, severity: d.severity, message: d.message, location: d.location })),
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=list-depth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-depth.js","sourceRoot":"","sources":["../../../src/lint/rules/list-depth.ts"],"names":[],"mappings":";;;AAGa,QAAA,kBAAkB,GAAG,YAAY,CAAA;AAE9C,8EAA8E;AACjE,QAAA,aAAa,GAAS;IACjC,EAAE,EAAE,0BAAkB;IACtB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,CAAC,GAAoB,EAAE,IAAiB,EAAe,EAAE,CAC9D,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC;SACvC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,0BAAkB,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC9G,CAAA"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.markdownInPodRule = exports.MARKDOWN_IN_POD_RULE_ID = void 0;
|
|
4
4
|
exports.scanMarkdownInPod = scanMarkdownInPod;
|
|
5
5
|
const schema_1 = require("@podlite/schema");
|
|
6
|
+
const line_starts_1 = require("../line-starts");
|
|
6
7
|
exports.MARKDOWN_IN_POD_RULE_ID = 'markdown-in-pod';
|
|
7
8
|
exports.markdownInPodRule = {
|
|
8
9
|
id: exports.MARKDOWN_IN_POD_RULE_ID,
|
|
@@ -16,27 +17,59 @@ const FOREIGN = [
|
|
|
16
17
|
},
|
|
17
18
|
{ test: /\*\*[^*\s](?:[^*]*[^*\s])?\*\*/, says: 'a pair of asterisks is text here; bold is written as B<>' },
|
|
18
19
|
];
|
|
20
|
+
// A lone # as the first word of an item, a heading or a definition numbers it, and
|
|
21
|
+
// with :!numbered it is a literal #; either way it is not a Markdown heading.
|
|
22
|
+
const NUMBERABLE = /^(item\d*|head\d*|defn)$/;
|
|
23
|
+
const LONE_HASH = /^\s*#(\s|$)/;
|
|
24
|
+
// directives that set things up and add no text of their own
|
|
25
|
+
const SETUP = /^\s*=(config|alias|set)\b/;
|
|
19
26
|
// Talk about Markdown is legal: a line whose construct sits inside an inline
|
|
20
27
|
// code span is showing the markup, not using it.
|
|
21
28
|
const insideCode = (line) => /C<[^>]*>/.test(line) || /`[^`]+`/.test(line);
|
|
22
29
|
function scanMarkdownInPod(content) {
|
|
23
30
|
const lines = content.split(/\r?\n/);
|
|
31
|
+
const starts = (0, line_starts_1.lineStarts)(content);
|
|
24
32
|
const open = [];
|
|
25
33
|
const violations = [];
|
|
26
34
|
let abbreviatedTable = false;
|
|
35
|
+
// the first word of a numberable block is still to come: in a delimited block blank
|
|
36
|
+
// lines and setup directives come before it, in the other forms they end the block
|
|
37
|
+
let awaiting = null;
|
|
27
38
|
for (let i = 0; i < lines.length; i++) {
|
|
28
39
|
const line = lines[i];
|
|
29
40
|
const end = line.match(/^\s*=end\s+([\w-]+)/);
|
|
30
41
|
if (end) {
|
|
42
|
+
awaiting = null;
|
|
43
|
+
// a short table inside a block ends with the block
|
|
44
|
+
abbreviatedTable = false;
|
|
31
45
|
open.pop();
|
|
32
46
|
continue;
|
|
33
47
|
}
|
|
34
48
|
const begin = line.match(/^\s*=begin\s+([\w-]+)/);
|
|
35
49
|
if (begin) {
|
|
50
|
+
awaiting = NUMBERABLE.test(begin[1]) ? 'delimited' : null;
|
|
36
51
|
open.push(begin[1]);
|
|
37
52
|
abbreviatedTable = false;
|
|
38
53
|
continue;
|
|
39
54
|
}
|
|
55
|
+
// a continuation line belongs to the directive above it
|
|
56
|
+
if (awaiting && /^\s*=(\s|$)/.test(line))
|
|
57
|
+
continue;
|
|
58
|
+
if (awaiting === 'delimited' && SETUP.test(line))
|
|
59
|
+
continue;
|
|
60
|
+
if (/^\s*=/.test(line)) {
|
|
61
|
+
const marker = line.match(/^\s*=(?:for\s+)?([\w-]+)(.*)$/);
|
|
62
|
+
const named = marker ? marker[1] : '';
|
|
63
|
+
const shortForm = !/^\s*=for\s/.test(line);
|
|
64
|
+
awaiting = marker && NUMBERABLE.test(named) && (!shortForm || marker[2].trim() === '') ? 'paragraph' : null;
|
|
65
|
+
}
|
|
66
|
+
else if (line.trim() === '') {
|
|
67
|
+
if (awaiting === 'paragraph')
|
|
68
|
+
awaiting = null;
|
|
69
|
+
}
|
|
70
|
+
const first = awaiting !== null && line.trim() !== '' && !/^\s*=/.test(line);
|
|
71
|
+
if (first)
|
|
72
|
+
awaiting = null;
|
|
40
73
|
// a dash separator belongs to a table written the short way too, and that
|
|
41
74
|
// block runs to the first blank line
|
|
42
75
|
if (/^\s*=(?:for\s+)?table\b/.test(line)) {
|
|
@@ -54,14 +87,13 @@ function scanMarkdownInPod(content) {
|
|
|
54
87
|
for (const foreign of FOREIGN) {
|
|
55
88
|
if (!foreign.test.test(line))
|
|
56
89
|
continue;
|
|
90
|
+
if (first && foreign === FOREIGN[0] && LONE_HASH.test(line))
|
|
91
|
+
continue;
|
|
57
92
|
violations.push({
|
|
58
93
|
rule: exports.MARKDOWN_IN_POD_RULE_ID,
|
|
59
94
|
severity: 'warning',
|
|
60
95
|
message: foreign.says,
|
|
61
|
-
location:
|
|
62
|
-
start: { line: i + 1, column: 1, offset: 0 },
|
|
63
|
-
end: { line: i + 1, column: 1, offset: 0 },
|
|
64
|
-
},
|
|
96
|
+
location: (0, line_starts_1.placeAtLine)(starts, i + 1),
|
|
65
97
|
});
|
|
66
98
|
break;
|
|
67
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-in-pod.js","sourceRoot":"","sources":["../../../src/lint/rules/markdown-in-pod.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"markdown-in-pod.js","sourceRoot":"","sources":["../../../src/lint/rules/markdown-in-pod.ts"],"names":[],"mappings":";;;AAqCA,8CAmEC;AAxGD,4CAAiD;AAEjD,gDAAwD;AAE3C,QAAA,uBAAuB,GAAG,iBAAiB,CAAA;AAE3C,QAAA,iBAAiB,GAAe;IAC3C,EAAE,EAAE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ACP,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Rule } from '../types';
|
|
2
2
|
export declare const TABLE_COLUMN_WIDTH_RULE_ID = "table-column-width";
|
|
3
|
-
export declare const tableColumnWidthRule:
|
|
4
|
-
export declare function scanTableColumns(content: string): Violation[];
|
|
3
|
+
export declare const tableColumnWidthRule: Rule;
|
|
@@ -1,122 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tableColumnWidthRule = exports.TABLE_COLUMN_WIDTH_RULE_ID = void 0;
|
|
4
|
-
exports.scanTableColumns = scanTableColumns;
|
|
5
|
-
const schema_1 = require("@podlite/schema");
|
|
6
4
|
exports.TABLE_COLUMN_WIDTH_RULE_ID = 'table-column-width';
|
|
5
|
+
const named = (d) => d.code === exports.TABLE_COLUMN_WIDTH_RULE_ID;
|
|
6
|
+
// passes on what the parser reports under this name
|
|
7
7
|
exports.tableColumnWidthRule = {
|
|
8
8
|
id: exports.TABLE_COLUMN_WIDTH_RULE_ID,
|
|
9
9
|
severity: 'warning',
|
|
10
|
+
check: (ast, _ctx) => (ast.diagnostics || []).filter(named).map(d => ({
|
|
11
|
+
rule: exports.TABLE_COLUMN_WIDTH_RULE_ID,
|
|
12
|
+
severity: d.severity,
|
|
13
|
+
message: d.message,
|
|
14
|
+
location: d.location,
|
|
15
|
+
})),
|
|
10
16
|
};
|
|
11
|
-
const SEPARATOR_LINE = /^[\s=+|_-]*[|+][\s=+|_-]*$/;
|
|
12
|
-
const hasBar = (line) => line.includes('|') || line.includes('+');
|
|
13
|
-
// A table with visible bars is cut by the column positions its separator line
|
|
14
|
-
// sets, not by the bars in the row itself. A cell that reaches the boundary
|
|
15
|
-
// pushes the column open for the whole table, so every row loses its last
|
|
16
|
-
// column at once — and the document still parses, silently.
|
|
17
|
-
const boundaries = (separator) => {
|
|
18
|
-
const out = [];
|
|
19
|
-
for (let i = 0; i < separator.length; i++) {
|
|
20
|
-
if (separator[i] === '|' || separator[i] === '+')
|
|
21
|
-
out.push(i);
|
|
22
|
-
}
|
|
23
|
-
return out;
|
|
24
|
-
};
|
|
25
|
-
const isEdge = (char) => char === '|' || char === '+' || char === ' ';
|
|
26
|
-
const collides = (line, boundary) => {
|
|
27
|
-
if (boundary >= line.length)
|
|
28
|
-
return false;
|
|
29
|
-
// content standing on the boundary is wrong however the row is written
|
|
30
|
-
if (!isEdge(line[boundary]))
|
|
31
|
-
return true;
|
|
32
|
-
// pressed against the boundary only matters where the row draws a bar of its
|
|
33
|
-
// own: a row whose cells are held apart by spaces may fill its column to the
|
|
34
|
-
// last position, and the parser reads it correctly
|
|
35
|
-
const drawsBar = line[boundary] === '|' || line[boundary] === '+';
|
|
36
|
-
return drawsBar && boundary > 0 && !isEdge(line[boundary - 1]);
|
|
37
|
-
};
|
|
38
|
-
const checkTable = (lines) => {
|
|
39
|
-
const separator = lines.find(l => SEPARATOR_LINE.test(l.text) && hasBar(l.text));
|
|
40
|
-
if (!separator)
|
|
41
|
-
return [];
|
|
42
|
-
const columns = boundaries(separator.text);
|
|
43
|
-
if (columns.length === 0)
|
|
44
|
-
return [];
|
|
45
|
-
const violations = [];
|
|
46
|
-
for (const row of lines) {
|
|
47
|
-
if (row === separator || row.text.trim() === '')
|
|
48
|
-
continue;
|
|
49
|
-
if (SEPARATOR_LINE.test(row.text))
|
|
50
|
-
continue;
|
|
51
|
-
const hit = columns.find(b => collides(row.text, b));
|
|
52
|
-
if (hit === undefined)
|
|
53
|
-
continue;
|
|
54
|
-
violations.push({
|
|
55
|
-
rule: exports.TABLE_COLUMN_WIDTH_RULE_ID,
|
|
56
|
-
severity: 'warning',
|
|
57
|
-
message: `cell reaches the column boundary at column ${hit + 1}; leave a space before the bar or the table loses a column`,
|
|
58
|
-
location: {
|
|
59
|
-
start: { line: row.line, column: hit + 1, offset: 0 },
|
|
60
|
-
end: { line: row.line, column: hit + 1, offset: 0 },
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return violations;
|
|
65
|
-
};
|
|
66
|
-
function scanTableColumns(content) {
|
|
67
|
-
const lines = content.split(/\r?\n/);
|
|
68
|
-
// a table keeps its content verbatim too, and it is the one being read here
|
|
69
|
-
const verbatim = (name) => name !== 'table' && (0, schema_1.isVerbatimBlock)(name);
|
|
70
|
-
const openBlocks = [];
|
|
71
|
-
const violations = [];
|
|
72
|
-
let table = null;
|
|
73
|
-
// the form of the table being read, not of a table around it: an abbreviated
|
|
74
|
-
// one ends where the parser ends it, inside a delimited table too
|
|
75
|
-
let abbreviatedForm = false;
|
|
76
|
-
const closeTable = () => {
|
|
77
|
-
if (table)
|
|
78
|
-
violations.push(...checkTable(table));
|
|
79
|
-
table = null;
|
|
80
|
-
};
|
|
81
|
-
for (let i = 0; i < lines.length; i++) {
|
|
82
|
-
const text = lines[i];
|
|
83
|
-
const begin = text.match(/^\s*=begin\s+([\w-]+)/);
|
|
84
|
-
const end = text.match(/^\s*=end\s+([\w-]+)/);
|
|
85
|
-
const abbreviated = text.match(/^\s*=(?:for\s+)?table\b/);
|
|
86
|
-
// an abbreviated table ends at the first blank line or directive
|
|
87
|
-
if (table && abbreviatedForm && /^\s*=[A-Za-z]/.test(text))
|
|
88
|
-
closeTable();
|
|
89
|
-
if (table && abbreviatedForm && text.trim() === '') {
|
|
90
|
-
closeTable();
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
if (end) {
|
|
94
|
-
if (end[1] === 'table')
|
|
95
|
-
closeTable();
|
|
96
|
-
openBlocks.pop();
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
if (begin) {
|
|
100
|
-
closeTable();
|
|
101
|
-
openBlocks.push(begin[1]);
|
|
102
|
-
if (begin[1] === 'table' && !openBlocks.some(verbatim)) {
|
|
103
|
-
table = [];
|
|
104
|
-
abbreviatedForm = false;
|
|
105
|
-
}
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
if (openBlocks.some(verbatim))
|
|
109
|
-
continue;
|
|
110
|
-
if (abbreviated) {
|
|
111
|
-
closeTable();
|
|
112
|
-
table = [];
|
|
113
|
-
abbreviatedForm = true;
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
if (table)
|
|
117
|
-
table.push({ text, line: i + 1 });
|
|
118
|
-
}
|
|
119
|
-
closeTable();
|
|
120
|
-
return violations;
|
|
121
|
-
}
|
|
122
17
|
//# sourceMappingURL=table-column-width.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-column-width.js","sourceRoot":"","sources":["../../../src/lint/rules/table-column-width.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"table-column-width.js","sourceRoot":"","sources":["../../../src/lint/rules/table-column-width.ts"],"names":[],"mappings":";;;AAGa,QAAA,0BAA0B,GAAG,oBAAoB,CAAA;AAE9D,MAAM,KAAK,GAAG,CAAC,CAAmB,EAAW,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,kCAA0B,CAAA;AAErF,oDAAoD;AACvC,QAAA,oBAAoB,GAAS;IACxC,EAAE,EAAE,kCAA0B;IAC9B,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,CAAC,GAAoB,EAAE,IAAiB,EAAe,EAAE,CAC9D,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9C,IAAI,EAAE,kCAA0B;QAChC,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC,CAAC;CACN,CAAA"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.unclosedMarkupCodeRule = exports.UNCLOSED_MARKUP_CODE_RULE_ID = void 0;
|
|
4
4
|
exports.scanUnclosedMarkupCodes = scanUnclosedMarkupCodes;
|
|
5
5
|
const schema_1 = require("@podlite/schema");
|
|
6
|
+
const line_starts_1 = require("../line-starts");
|
|
6
7
|
exports.UNCLOSED_MARKUP_CODE_RULE_ID = 'unclosed-markup-code';
|
|
7
8
|
exports.unclosedMarkupCodeRule = {
|
|
8
9
|
id: exports.UNCLOSED_MARKUP_CODE_RULE_ID,
|
|
@@ -25,15 +26,42 @@ exports.unclosedMarkupCodeRule = {
|
|
|
25
26
|
// code written inside a doubled one reads as unclosed, and correct markup gets
|
|
26
27
|
// reported — the worse of the two.
|
|
27
28
|
const OPENER = /(^|[^A-Za-z])([A-Z])(<+|«)/g;
|
|
29
|
+
// For each length of a run of closing brackets, the last place a closer of that
|
|
30
|
+
// length can start: a code opened with N brackets is closed if one starts after it.
|
|
31
|
+
// Built once per fragment, so a long paragraph is not searched again for every code.
|
|
32
|
+
const lastCloserStarts = (text) => {
|
|
33
|
+
const bestEnd = [-1, -1];
|
|
34
|
+
let at = 0;
|
|
35
|
+
while (at < text.length) {
|
|
36
|
+
if (text.charCodeAt(at) !== 62) {
|
|
37
|
+
at++;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const start = at;
|
|
41
|
+
while (at < text.length && text.charCodeAt(at) === 62)
|
|
42
|
+
at++;
|
|
43
|
+
const length = at - start;
|
|
44
|
+
while (bestEnd.length < length + 2)
|
|
45
|
+
bestEnd.push(-1);
|
|
46
|
+
bestEnd[length] = Math.max(bestEnd[length], at);
|
|
47
|
+
}
|
|
48
|
+
// a longer run holds every shorter closer, ending where it ends
|
|
49
|
+
for (let length = bestEnd.length - 2; length >= 1; length--) {
|
|
50
|
+
bestEnd[length] = Math.max(bestEnd[length], bestEnd[length + 1]);
|
|
51
|
+
}
|
|
52
|
+
return bestEnd.map((end, length) => (end === -1 ? -1 : end - length));
|
|
53
|
+
};
|
|
28
54
|
const unclosed = (text) => {
|
|
29
55
|
const missing = [];
|
|
56
|
+
const closerStarts = lastCloserStarts(text);
|
|
57
|
+
const lastGuillemet = text.lastIndexOf('»');
|
|
30
58
|
let match;
|
|
31
59
|
OPENER.lastIndex = 0;
|
|
32
60
|
while ((match = OPENER.exec(text)) !== null) {
|
|
33
61
|
const [whole, before, name, open] = match;
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
62
|
+
const from = match.index + whole.length;
|
|
63
|
+
const closer = open === '«' ? lastGuillemet : closerStarts[open.length] ?? -1;
|
|
64
|
+
if (closer < from) {
|
|
37
65
|
missing.push({ name, at: match.index + before.length });
|
|
38
66
|
}
|
|
39
67
|
}
|
|
@@ -41,7 +69,9 @@ const unclosed = (text) => {
|
|
|
41
69
|
};
|
|
42
70
|
function scanUnclosedMarkupCodes(content) {
|
|
43
71
|
const lines = content.split(/\r?\n/);
|
|
72
|
+
const starts = (0, line_starts_1.lineStarts)(content);
|
|
44
73
|
const open = [];
|
|
74
|
+
let verbatimOpen = 0;
|
|
45
75
|
const violations = [];
|
|
46
76
|
let chunk = null;
|
|
47
77
|
let inAbbreviatedVerbatim = false;
|
|
@@ -49,17 +79,19 @@ function scanUnclosedMarkupCodes(content) {
|
|
|
49
79
|
if (!chunk)
|
|
50
80
|
return;
|
|
51
81
|
const at = chunk;
|
|
82
|
+
// the codes come in order, so the line is counted on from the one before
|
|
83
|
+
let line = at.line;
|
|
84
|
+
let counted = 0;
|
|
52
85
|
for (const found of unclosed(at.text)) {
|
|
53
86
|
const name = found.name;
|
|
54
|
-
|
|
87
|
+
for (; counted < found.at; counted++)
|
|
88
|
+
if (at.text.charCodeAt(counted) === 10)
|
|
89
|
+
line++;
|
|
55
90
|
violations.push({
|
|
56
91
|
rule: exports.UNCLOSED_MARKUP_CODE_RULE_ID,
|
|
57
92
|
severity: 'warning',
|
|
58
93
|
message: `${name}<> is closed by the end of the block, not by its own bracket; the text goes out as written`,
|
|
59
|
-
location:
|
|
60
|
-
start: { line, column: 1, offset: 0 },
|
|
61
|
-
end: { line, column: 1, offset: 0 },
|
|
62
|
-
},
|
|
94
|
+
location: (0, line_starts_1.placeAtLine)(starts, line),
|
|
63
95
|
});
|
|
64
96
|
}
|
|
65
97
|
chunk = null;
|
|
@@ -69,7 +101,9 @@ function scanUnclosedMarkupCodes(content) {
|
|
|
69
101
|
if (/^\s*=end\s+[\w-]+/.test(line)) {
|
|
70
102
|
close();
|
|
71
103
|
inAbbreviatedVerbatim = false;
|
|
72
|
-
open.pop();
|
|
104
|
+
const closed = open.pop();
|
|
105
|
+
if (closed !== undefined && (0, schema_1.isVerbatimBlock)(closed))
|
|
106
|
+
verbatimOpen--;
|
|
73
107
|
continue;
|
|
74
108
|
}
|
|
75
109
|
const begin = line.match(/^\s*=begin\s+([\w-]+)/);
|
|
@@ -77,9 +111,11 @@ function scanUnclosedMarkupCodes(content) {
|
|
|
77
111
|
close();
|
|
78
112
|
inAbbreviatedVerbatim = false;
|
|
79
113
|
open.push(begin[1]);
|
|
114
|
+
if ((0, schema_1.isVerbatimBlock)(begin[1]))
|
|
115
|
+
verbatimOpen++;
|
|
80
116
|
continue;
|
|
81
117
|
}
|
|
82
|
-
if (
|
|
118
|
+
if (verbatimOpen > 0)
|
|
83
119
|
continue;
|
|
84
120
|
// a directive starts a chunk of its own; a blank line ends the one running
|
|
85
121
|
if (/^\s*=/.test(line)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unclosed-markup-code.js","sourceRoot":"","sources":["../../../src/lint/rules/unclosed-markup-code.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"unclosed-markup-code.js","sourceRoot":"","sources":["../../../src/lint/rules/unclosed-markup-code.ts"],"names":[],"mappings":";;;AAwEA,0DAqEC;AA7ID,4CAAiD;AAEjD,gDAAwD;AAE3C,QAAA,4BAA4B,GAAG,sBAAsB,CAAA;AAErD,QAAA,sBAAsB,GAAe;IAChD,EAA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EAAE,CAAC;YACvB,KAAK,EAAE,CAAA;YACP,qBAAqB,GAAG,KAAK,CAAA;YAC7B,SAAQ;QACV,CAAC;QACD,IAAI,qBAAqB;YAAE,SAAQ;QACnC,IAAI,KAAK;YAAE,KAAK,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAA;;YAC/B,KAAK,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAA;IAC1C,CAAC;IACD,KAAK,EAAE,CAAA;IAEP,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.98";
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podlite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.98",
|
|
4
4
|
"description": "Podlite markup language: parser and CLI (convert, lint, query, test). Reads Markdown; includes Mermaid diagram and LaTeX formula plugins.",
|
|
5
5
|
"homepage": "https://podlite.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"url": "https://github.com/podlite/podlite/issues"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@podlite/diagram": "^0.0.
|
|
104
|
-
"@podlite/formula": "0.0.
|
|
105
|
-
"@podlite/image": "^0.0.
|
|
106
|
-
"@podlite/markdown": "0.0.
|
|
107
|
-
"@podlite/schema": "^0.0.
|
|
108
|
-
"@podlite/toc": "0.0.
|
|
103
|
+
"@podlite/diagram": "^0.0.89",
|
|
104
|
+
"@podlite/formula": "0.0.67",
|
|
105
|
+
"@podlite/image": "^0.0.84",
|
|
106
|
+
"@podlite/markdown": "0.0.78",
|
|
107
|
+
"@podlite/schema": "^0.0.85",
|
|
108
|
+
"@podlite/toc": "0.0.78",
|
|
109
109
|
"nanoid": "^3.3.20"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|