polytypo 1.10.0 → 1.11.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/dist/chunk-4IMDK5WJ.cjs +31 -0
- package/dist/{chunk-H26TGFP7.cjs.map → chunk-4IMDK5WJ.cjs.map} +1 -1
- package/dist/chunk-6SL3VC37.cjs +35 -0
- package/dist/{chunk-KSW5EOAP.cjs.map → chunk-6SL3VC37.cjs.map} +1 -1
- package/dist/{chunk-X3RDLKUA.js → chunk-7YM3XE7R.js} +2 -2
- package/dist/{chunk-QPIQMX2S.cjs → chunk-E7PHHD77.cjs} +16 -16
- package/dist/{chunk-QPIQMX2S.cjs.map → chunk-E7PHHD77.cjs.map} +1 -1
- package/dist/{chunk-ZMIMLHKI.js → chunk-EB47BYQP.js} +5 -5
- package/dist/{chunk-7AC2JBQG.cjs → chunk-GT3YI4HK.cjs} +4 -4
- package/dist/{chunk-7AC2JBQG.cjs.map → chunk-GT3YI4HK.cjs.map} +1 -1
- package/dist/{chunk-TRUHKCDB.js → chunk-HUSFFMHK.js} +3 -1
- package/dist/chunk-HUSFFMHK.js.map +1 -0
- package/dist/{chunk-BGA6QQBY.js → chunk-M2O7YEYA.js} +125 -22
- package/dist/chunk-M2O7YEYA.js.map +1 -0
- package/dist/{chunk-FFIR7BWQ.cjs → chunk-M2XO2UOC.cjs} +3 -1
- package/dist/chunk-M2XO2UOC.cjs.map +1 -0
- package/dist/{chunk-CVPCIIOT.js → chunk-MYO6QNUZ.js} +2 -2
- package/dist/{chunk-EROJVHMJ.js → chunk-OO5UBFQ3.js} +2 -2
- package/dist/{chunk-NSVC7XZG.js → chunk-R7AVFEMZ.js} +4 -4
- package/dist/{chunk-HB4TT6IE.cjs → chunk-RGL2IVXT.cjs} +21 -21
- package/dist/{chunk-HB4TT6IE.cjs.map → chunk-RGL2IVXT.cjs.map} +1 -1
- package/dist/{chunk-7AGGQEWJ.js → chunk-U3BQVYLI.js} +4 -4
- package/dist/{chunk-XK7NZDVI.cjs → chunk-UF734P5M.cjs} +3 -3
- package/dist/{chunk-XK7NZDVI.cjs.map → chunk-UF734P5M.cjs.map} +1 -1
- package/dist/{chunk-IMLOL2TH.js → chunk-UHXG7EUL.js} +2 -2
- package/dist/chunk-VRCQJFUG.cjs +33 -0
- package/dist/{chunk-FR2MCL5K.cjs.map → chunk-VRCQJFUG.cjs.map} +1 -1
- package/dist/{chunk-IH26NEJ6.cjs → chunk-XNXXVTRR.cjs} +129 -26
- package/dist/chunk-XNXXVTRR.cjs.map +1 -0
- package/dist/html.cjs +10 -10
- package/dist/html.js +5 -5
- package/dist/index.cjs +18 -18
- package/dist/index.js +8 -8
- package/dist/markdown.cjs +11 -11
- package/dist/markdown.js +6 -6
- package/dist/text.cjs +8 -8
- package/dist/text.js +3 -3
- package/dist/yaml.cjs +10 -10
- package/dist/yaml.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-BGA6QQBY.js.map +0 -1
- package/dist/chunk-FFIR7BWQ.cjs.map +0 -1
- package/dist/chunk-FR2MCL5K.cjs +0 -33
- package/dist/chunk-H26TGFP7.cjs +0 -31
- package/dist/chunk-IH26NEJ6.cjs.map +0 -1
- package/dist/chunk-KSW5EOAP.cjs +0 -35
- package/dist/chunk-TRUHKCDB.js.map +0 -1
- /package/dist/{chunk-X3RDLKUA.js.map → chunk-7YM3XE7R.js.map} +0 -0
- /package/dist/{chunk-ZMIMLHKI.js.map → chunk-EB47BYQP.js.map} +0 -0
- /package/dist/{chunk-CVPCIIOT.js.map → chunk-MYO6QNUZ.js.map} +0 -0
- /package/dist/{chunk-EROJVHMJ.js.map → chunk-OO5UBFQ3.js.map} +0 -0
- /package/dist/{chunk-NSVC7XZG.js.map → chunk-R7AVFEMZ.js.map} +0 -0
- /package/dist/{chunk-7AGGQEWJ.js.map → chunk-U3BQVYLI.js.map} +0 -0
- /package/dist/{chunk-IMLOL2TH.js.map → chunk-UHXG7EUL.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM2XO2UOCcjs = require('./chunk-M2XO2UOC.cjs');
|
|
4
4
|
|
|
5
5
|
// src/modes/yaml.ts
|
|
6
6
|
var TAB = 9;
|
|
@@ -21,6 +21,7 @@ var ZERO = 48;
|
|
|
21
21
|
var ONE = 49;
|
|
22
22
|
var NINE = 57;
|
|
23
23
|
var COLON = 58;
|
|
24
|
+
var QUESTION = 63;
|
|
24
25
|
var GREATER = 62;
|
|
25
26
|
var LBRACKET = 91;
|
|
26
27
|
var BACKSLASH = 92;
|
|
@@ -79,52 +80,154 @@ function valueRunEnd(source, lines, li, indent) {
|
|
|
79
80
|
}
|
|
80
81
|
return k;
|
|
81
82
|
}
|
|
83
|
+
function hasContinuation(source, lines, li, runEnd) {
|
|
84
|
+
for (let k = li + 1; k < runEnd; k += 1) if (!isBlank(source, lines[k])) return true;
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
function dropCarriageReturnRegions(source, lines, spans) {
|
|
88
|
+
const declined = [];
|
|
89
|
+
let inRegion = false;
|
|
90
|
+
for (const line of lines) {
|
|
91
|
+
if (hasLoneCarriageReturn(source, line)) inRegion = true;
|
|
92
|
+
else if (line.end > line.start && source.charCodeAt(line.start) !== SPACE) inRegion = false;
|
|
93
|
+
declined.push(inRegion);
|
|
94
|
+
}
|
|
95
|
+
if (!declined.includes(true)) return spans;
|
|
96
|
+
const kept = [];
|
|
97
|
+
let li = 0;
|
|
98
|
+
for (const span of spans) {
|
|
99
|
+
while (li + 1 < lines.length && span.start >= lines[li + 1].start) li += 1;
|
|
100
|
+
if (!declined[li]) kept.push(span);
|
|
101
|
+
}
|
|
102
|
+
return kept;
|
|
103
|
+
}
|
|
82
104
|
function yamlSpans(source, keys) {
|
|
83
105
|
const listed = new Set(keys);
|
|
84
106
|
const lines = splitLines(source);
|
|
85
107
|
const spans = [];
|
|
86
108
|
let li = 0;
|
|
87
109
|
while (li < lines.length) li = scanLine(source, lines, li, listed, spans);
|
|
88
|
-
return spans;
|
|
110
|
+
return dropCarriageReturnRegions(source, lines, spans);
|
|
111
|
+
}
|
|
112
|
+
function closingQuote(source, line, q) {
|
|
113
|
+
const quote = source.charCodeAt(q);
|
|
114
|
+
for (let j = q + 1; j < line.end; j += 1) {
|
|
115
|
+
const c = source.charCodeAt(j);
|
|
116
|
+
if (quote === DQUOTE && c === BACKSLASH) {
|
|
117
|
+
j += 1;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (c !== quote) continue;
|
|
121
|
+
if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {
|
|
122
|
+
j += 1;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
return j;
|
|
126
|
+
}
|
|
127
|
+
return -1;
|
|
128
|
+
}
|
|
129
|
+
function documentRunEnd(source, lines, li) {
|
|
130
|
+
let k = li + 1;
|
|
131
|
+
while (k < lines.length) {
|
|
132
|
+
const next = lines[k];
|
|
133
|
+
if (isDocumentMarker(source, next.start, next.end)) break;
|
|
134
|
+
k += 1;
|
|
135
|
+
}
|
|
136
|
+
return k;
|
|
137
|
+
}
|
|
138
|
+
function ownLineRunEnd(source, lines, li, indent) {
|
|
139
|
+
if (indent === 0) return documentRunEnd(source, lines, li);
|
|
140
|
+
let k = li + 1;
|
|
141
|
+
while (k < lines.length) {
|
|
142
|
+
const next = lines[k];
|
|
143
|
+
if (next.end > next.start && source.charCodeAt(next.start) !== SPACE) break;
|
|
144
|
+
k += 1;
|
|
145
|
+
}
|
|
146
|
+
return k;
|
|
147
|
+
}
|
|
148
|
+
function isNodeMarker(source, j, end) {
|
|
149
|
+
const c = source.charCodeAt(j);
|
|
150
|
+
if (c !== DASH && c !== QUESTION && c !== COLON) return false;
|
|
151
|
+
return j + 1 === end || source.charCodeAt(j + 1) === SPACE;
|
|
89
152
|
}
|
|
90
153
|
function scanLine(source, lines, li, listed, spans) {
|
|
91
154
|
const line = lines[li];
|
|
92
155
|
const skipLine = li + 1;
|
|
93
156
|
const start = firstNonSpace(source, line);
|
|
94
|
-
if (start === line.end
|
|
157
|
+
if (start === line.end) return skipLine;
|
|
158
|
+
const isQuiet = hasTab(source, line);
|
|
95
159
|
const indent = start - line.start;
|
|
96
160
|
const head = source.charCodeAt(start);
|
|
97
161
|
if (head === HASH || head === PERCENT) return skipLine;
|
|
98
|
-
if (isDocumentMarker(source, start, line.end))
|
|
162
|
+
if (isDocumentMarker(source, start, line.end)) {
|
|
163
|
+
let p = start + 3;
|
|
164
|
+
while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;
|
|
165
|
+
if (p >= line.end || source.charCodeAt(p) === HASH) return skipLine;
|
|
166
|
+
return indent === 0 ? documentRunEnd(source, lines, li) : skipLine;
|
|
167
|
+
}
|
|
99
168
|
let i = start;
|
|
100
|
-
while (i < line.end &&
|
|
169
|
+
while (i < line.end && isNodeMarker(source, i, line.end)) {
|
|
101
170
|
i += 2;
|
|
102
171
|
while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;
|
|
103
172
|
}
|
|
104
|
-
if (i >= line.end) return skipLine;
|
|
173
|
+
if (i >= line.end || source.charCodeAt(i) === HASH) return skipLine;
|
|
174
|
+
const hasMarker = i > start;
|
|
105
175
|
const keyStart = i;
|
|
176
|
+
const first = source.charCodeAt(i);
|
|
106
177
|
let colon = -1;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
178
|
+
let keyEnd = -1;
|
|
179
|
+
let isDeclined = false;
|
|
180
|
+
let isOpenQuote = false;
|
|
181
|
+
if (first === DQUOTE || first === SQUOTE) {
|
|
182
|
+
const close = closingQuote(source, line, i);
|
|
183
|
+
if (close < 0) isOpenQuote = true;
|
|
184
|
+
else {
|
|
185
|
+
let p = close + 1;
|
|
186
|
+
while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;
|
|
187
|
+
if (isIndicatorColon(source, p, line.end)) {
|
|
188
|
+
colon = p;
|
|
189
|
+
keyEnd = close + 1;
|
|
190
|
+
isDeclined = true;
|
|
191
|
+
}
|
|
111
192
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
193
|
+
} else if (first !== LBRACE && first !== LBRACKET && first !== AMPERSAND && first !== STAR && first !== BANG) {
|
|
194
|
+
for (let j = i; j < line.end; j += 1) {
|
|
195
|
+
const c = source.charCodeAt(j);
|
|
196
|
+
if (c === HASH && source.charCodeAt(j - 1) === SPACE) break;
|
|
197
|
+
if (isIndicatorColon(source, j, line.end)) {
|
|
198
|
+
colon = j;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
if (c === DQUOTE || c === SQUOTE || c === LBRACE || c === LBRACKET || c === AMPERSAND || c === STAR || c === BANG || c === HASH) {
|
|
202
|
+
isDeclined = true;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (colon >= 0) {
|
|
206
|
+
keyEnd = colon;
|
|
207
|
+
while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;
|
|
115
208
|
}
|
|
116
209
|
}
|
|
117
|
-
if (colon < 0)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
210
|
+
if (colon < 0) {
|
|
211
|
+
const isOwnLine = !hasMarker && (isOpenQuote || first === LBRACE || first === LBRACKET || first === PIPE || first === GREATER);
|
|
212
|
+
return isOwnLine ? ownLineRunEnd(source, lines, li, indent) : valueRunEnd(source, lines, li, indent);
|
|
213
|
+
}
|
|
121
214
|
let v = colon + 1;
|
|
122
215
|
while (v < line.end && source.charCodeAt(v) === SPACE) v += 1;
|
|
123
216
|
if (v >= line.end) return skipLine;
|
|
217
|
+
const value = source.charCodeAt(v);
|
|
218
|
+
if (isDeclined) {
|
|
219
|
+
let isOpen = value === PIPE || value === GREATER || value === LBRACE || value === LBRACKET || value === AMPERSAND || value === BANG;
|
|
220
|
+
if (value === DQUOTE || value === SQUOTE) {
|
|
221
|
+
const close = closingQuote(source, line, v);
|
|
222
|
+
let p = close + 1;
|
|
223
|
+
while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;
|
|
224
|
+
isOpen = close < 0 || p < line.end && source.charCodeAt(p) !== HASH;
|
|
225
|
+
}
|
|
226
|
+
return isOpen ? valueRunEnd(source, lines, li, indent) : skipLine;
|
|
227
|
+
}
|
|
124
228
|
const next = valueRunEnd(source, lines, li, indent);
|
|
125
229
|
if (!listed.has(source.slice(keyStart, keyEnd))) return next;
|
|
126
|
-
if (
|
|
127
|
-
const value = source.charCodeAt(v);
|
|
230
|
+
if (isQuiet) return next;
|
|
128
231
|
if (value === HASH || value === AMPERSAND || value === STAR || value === BANG || value === LBRACE || value === LBRACKET) {
|
|
129
232
|
return next;
|
|
130
233
|
}
|
|
@@ -133,10 +236,10 @@ function scanLine(source, lines, li, listed, spans) {
|
|
|
133
236
|
return next;
|
|
134
237
|
}
|
|
135
238
|
if (value === DQUOTE || value === SQUOTE) {
|
|
136
|
-
if (
|
|
239
|
+
if (!hasContinuation(source, lines, li, next)) quotedScalar(source, line, v, spans);
|
|
137
240
|
return next;
|
|
138
241
|
}
|
|
139
|
-
if (
|
|
242
|
+
if (!hasContinuation(source, lines, li, next)) plainScalar(source, line, v, spans);
|
|
140
243
|
return next;
|
|
141
244
|
}
|
|
142
245
|
function blockScalar(source, lines, li, runEnd, indent, v, spans) {
|
|
@@ -228,14 +331,14 @@ function plainScalar(source, line, v, spans) {
|
|
|
228
331
|
// src/engine/yaml-keys.ts
|
|
229
332
|
function resolveYamlKeys(value) {
|
|
230
333
|
if (!Array.isArray(value)) {
|
|
231
|
-
throw new (0,
|
|
334
|
+
throw new (0, _chunkM2XO2UOCcjs.PolytypoError)(
|
|
232
335
|
"POLYTYPO_INVALID_OPTION",
|
|
233
336
|
`"keys" is required when mode is "yaml" and must be a list of strings (modes.md \xA73.8.2). Received ${value === void 0 ? "nothing" : JSON.stringify(value)}.`
|
|
234
337
|
);
|
|
235
338
|
}
|
|
236
339
|
for (const key of value) {
|
|
237
340
|
if (typeof key !== "string") {
|
|
238
|
-
throw new (0,
|
|
341
|
+
throw new (0, _chunkM2XO2UOCcjs.PolytypoError)(
|
|
239
342
|
"POLYTYPO_INVALID_OPTION",
|
|
240
343
|
`"keys" must contain only strings; received ${JSON.stringify(key)}.`
|
|
241
344
|
);
|
|
@@ -246,14 +349,14 @@ function resolveYamlKeys(value) {
|
|
|
246
349
|
function resolveFrontmatterKeys(value) {
|
|
247
350
|
if (value === void 0) return void 0;
|
|
248
351
|
if (!Array.isArray(value)) {
|
|
249
|
-
throw new (0,
|
|
352
|
+
throw new (0, _chunkM2XO2UOCcjs.PolytypoError)(
|
|
250
353
|
"POLYTYPO_INVALID_OPTION",
|
|
251
354
|
`"frontmatterKeys" must be a list of strings when given (modes.md \xA73.7.4). Received ${JSON.stringify(value)}.`
|
|
252
355
|
);
|
|
253
356
|
}
|
|
254
357
|
for (const key of value) {
|
|
255
358
|
if (typeof key !== "string") {
|
|
256
|
-
throw new (0,
|
|
359
|
+
throw new (0, _chunkM2XO2UOCcjs.PolytypoError)(
|
|
257
360
|
"POLYTYPO_INVALID_OPTION",
|
|
258
361
|
`"frontmatterKeys" must contain only strings; received ${JSON.stringify(key)}.`
|
|
259
362
|
);
|
|
@@ -267,4 +370,4 @@ function resolveFrontmatterKeys(value) {
|
|
|
267
370
|
|
|
268
371
|
|
|
269
372
|
exports.yamlSpans = yamlSpans; exports.resolveYamlKeys = resolveYamlKeys; exports.resolveFrontmatterKeys = resolveFrontmatterKeys;
|
|
270
|
-
//# sourceMappingURL=chunk-
|
|
373
|
+
//# sourceMappingURL=chunk-XNXXVTRR.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/polytypo-js/polytypo-js/dist/chunk-XNXXVTRR.cjs","../src/modes/yaml.ts","../src/engine/yaml-keys.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;A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polytypo-js/dist/chunk-XNXXVTRR.cjs","sourcesContent":[null,"import type { Span } from \"./spans.js\";\n\n/**\n * spec/rules/modes.md 3.8. `yaml` differs from the other two document modes twice over.\n *\n * It uses **no parser** (3.8.1): two of the five ecosystems' YAML libraries cannot report the\n * source offsets the round-trip guarantee needs, so the scan below is specified rather than\n * delegated and is written the same way in every runtime.\n *\n * And the caller names the keys (3.8.2). YAML is a data format with islands of prose in it — the\n * inverse of HTML and Markdown — and nothing in its syntax separates `description:` from `run:`.\n * A keyless draft of this file rewrote `if !` as `if!` inside a workflow's shell script; there is\n * no content test that would not, because shell and template expressions are written in words.\n *\n * It also **skips by default** — the inverse of 3.6's closed skip list. A construct this scan\n * does not recognise with certainty yields no spans, so the worst outcome of a gap in it is prose\n * left untypeset, never a changed byte.\n *\n * Offsets are UTF-16 indices, like every other mode in this runtime; every character the scan\n * tests is ASCII, so indexing by code unit and indexing by code point agree on all of them.\n */\n\nconst TAB = 0x09;\nconst LF = 0x0a;\nconst CR = 0x0d;\nconst SPACE = 0x20;\nconst BANG = 0x21;\nconst DQUOTE = 0x22;\nconst HASH = 0x23;\nconst PERCENT = 0x25;\nconst AMPERSAND = 0x26;\nconst SQUOTE = 0x27;\nconst STAR = 0x2a;\nconst PLUS = 0x2b;\nconst DASH = 0x2d;\nconst DOT = 0x2e;\nconst ZERO = 0x30;\nconst ONE = 0x31;\nconst NINE = 0x39;\nconst COLON = 0x3a;\nconst QUESTION = 0x3f;\nconst GREATER = 0x3e;\nconst LBRACKET = 0x5b;\nconst BACKSLASH = 0x5c;\nconst LBRACE = 0x7b;\nconst PIPE = 0x7c;\n\ninterface Line {\n readonly start: number;\n /** Index of the line terminator, or of the end of the source — never inside a span. */\n readonly end: number;\n}\n\n/**\n * 3.8.4: a line ends at U+000A, and **a U+000D immediately before it is not part of the line** —\n * it is a terminator like the U+000A itself, so it lies outside every span and comes back\n * untouched. Without that clause a CRLF file behaves differently from the same bytes with LF: the\n * block header reads as `|\\r` and is unrecognised, and a plain scalar carries the carriage return\n * inside its span. Five runtimes split lines with five different standard-library calls, so the\n * treatment has to be stated rather than inherited.\n */\nfunction splitLines(source: string): Line[] {\n const lines: Line[] = [];\n let start = 0;\n const endOf = (i: number): number => (i > start && source.charCodeAt(i - 1) === CR ? i - 1 : i);\n for (let i = 0; i < source.length; i += 1) {\n if (source.charCodeAt(i) === LF) {\n lines.push({ start, end: endOf(i) });\n start = i + 1;\n }\n }\n if (start < source.length) lines.push({ start, end: endOf(source.length) });\n return lines;\n}\n\n/** Index of the first code unit that is not U+0020, or `line.end` for a blank line. */\nfunction firstNonSpace(source: string, line: Line): number {\n let i = line.start;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n return i;\n}\n\nfunction isBlank(source: string, line: Line): boolean {\n return firstNonSpace(source, line) === line.end;\n}\n\nfunction hasTab(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === TAB) return true;\n return false;\n}\n\n/**\n * 3.8.4 step 9. A U+000D that splitLines did not take for a terminator is a lone one, and YAML\n * 1.2.2 5.4 reads it as a line break the LF-only model of 3.8.4 does not. Declining the line is\n * what keeps \"line terminators are never inside a span\" true.\n */\nfunction hasLoneCarriageReturn(source: string, line: Line): boolean {\n for (let i = line.start; i < line.end; i += 1) if (source.charCodeAt(i) === CR) return true;\n return false;\n}\n\n/**\n * 3.8.4 step 3. `---` and `...` at the head of a line, bare or introducing a node: the\n * trailing-content form is declined too, so `--- key: value` never yields a key of `--- key`.\n */\nfunction isDocumentMarker(source: string, from: number, end: number): boolean {\n if (end - from < 3) return false;\n const c = source.charCodeAt(from);\n if (c !== DASH && c !== DOT) return false;\n if (source.charCodeAt(from + 1) !== c || source.charCodeAt(from + 2) !== c) return false;\n return from + 3 === end || source.charCodeAt(from + 3) === SPACE;\n}\n\n/** A colon that ends the line or is followed by U+0020 — the only colon YAML reads as an indicator. */\nfunction isIndicatorColon(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/** A `-` that ends the line or is followed by U+0020 — a block sequence entry marker. */\nfunction isSequenceDash(source: string, j: number, end: number): boolean {\n if (source.charCodeAt(j) !== DASH) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/**\n * The value run of 3.8.4 step 7: every following line that is blank or indented more than the\n * key line. **Those lines are never scanned again** — without that, a multi-line quoted scalar,\n * a multi-line flow collection and a folded plain scalar all leak their continuation lines back\n * into the scan as if they were mappings, and a span can end up holding a scalar's own closing\n * delimiter.\n */\nfunction valueRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (!isBlank(source, next) && firstNonSpace(source, next) - next.start <= indent) break;\n k += 1;\n }\n return k;\n}\n\n/** 3.8.4 step 7: a line of the value run that is not blank. Blank lines alone are not one. */\nfunction hasContinuation(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n): boolean {\n for (let k = li + 1; k < runEnd; k += 1) if (!isBlank(source, lines[k] as Line)) return true;\n return false;\n}\n\n/**\n * 3.8.4's carriage-return region: a line containing a U+000D yields no spans, and neither does any\n * later line up to the first one that is non-empty, does not begin with U+0020 and contains none.\n * It removes spans and never adds one, so it cannot change which lines a value run consumes.\n */\nfunction dropCarriageReturnRegions(source: string, lines: readonly Line[], spans: Span[]): Span[] {\n const declined: boolean[] = [];\n let inRegion = false;\n for (const line of lines) {\n if (hasLoneCarriageReturn(source, line)) inRegion = true;\n else if (line.end > line.start && source.charCodeAt(line.start) !== SPACE) inRegion = false;\n declined.push(inRegion);\n }\n if (!declined.includes(true)) return spans;\n const kept: Span[] = [];\n let li = 0;\n for (const span of spans) {\n while (li + 1 < lines.length && span.start >= (lines[li + 1] as Line).start) li += 1;\n if (!declined[li]) kept.push(span);\n }\n return kept;\n}\n\nexport function yamlSpans(source: string, keys: readonly string[]): Span[] {\n const listed = new Set(keys);\n const lines = splitLines(source);\n const spans: Span[] = [];\n let li = 0;\n while (li < lines.length) li = scanLine(source, lines, li, listed, spans);\n return dropCarriageReturnRegions(source, lines, spans);\n}\n\n/**\n * 3.8.4 step 5. The index of the quote that closes the one at `q`, or -1. In a double-quoted scalar\n * a U+005C and the code point after it never close the quote, which decodes nothing: no YAML\n * escape ends in anything that would be a closing quote. A quote not closed on the line returns -1.\n */\nfunction closingQuote(source: string, line: Line, q: number): number {\n const quote = source.charCodeAt(q);\n for (let j = q + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) {\n j += 1;\n continue;\n }\n if (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n j += 1;\n continue;\n }\n return j;\n }\n return -1;\n}\n\n/** 3.8.4 step 3. A document marker at column 0, which is where YAML reads one. */\nfunction documentRunEnd(source: string, lines: readonly Line[], li: number): number {\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (isDocumentMarker(source, next.start, next.end)) break;\n k += 1;\n }\n return k;\n}\n\n/**\n * 3.8.4 step 5, the own-line node: everything up to the first later line that is non-empty and\n * does not begin with U+0020, because the scan does not track the key above and a flow collection,\n * a block scalar header or an unclosed quote on a line of its own can continue at any depth.\n */\nfunction ownLineRunEnd(source: string, lines: readonly Line[], li: number, indent: number): number {\n if (indent === 0) return documentRunEnd(source, lines, li);\n let k = li + 1;\n while (k < lines.length) {\n const next = lines[k] as Line;\n if (next.end > next.start && source.charCodeAt(next.start) !== SPACE) break;\n k += 1;\n }\n return k;\n}\n\n/** 3.8.4 step 4: `-`, `?` or `:` followed by U+0020 or the line end. */\nfunction isNodeMarker(source: string, j: number, end: number): boolean {\n const c = source.charCodeAt(j);\n if (c !== DASH && c !== QUESTION && c !== COLON) return false;\n return j + 1 === end || source.charCodeAt(j + 1) === SPACE;\n}\n\n/** One step of 3.8.4. Returns the index of the next line to scan. */\nfunction scanLine(\n source: string,\n lines: readonly Line[],\n li: number,\n listed: ReadonlySet<string>,\n spans: Span[],\n): number {\n const line = lines[li] as Line;\n const skipLine = li + 1;\n\n // step 1 — blank. A tab makes indentation undecidable, so the line and whatever it absorbs\n // yield no spans, but steps 2 to 7 still decide what it absorbs.\n const start = firstNonSpace(source, line);\n if (start === line.end) return skipLine;\n const isQuiet = hasTab(source, line);\n const indent = start - line.start;\n\n // steps 2 and 3 — comment, directive, document marker. A marker with a node after it absorbs\n // the document.\n const head = source.charCodeAt(start);\n if (head === HASH || head === PERCENT) return skipLine;\n if (isDocumentMarker(source, start, line.end)) {\n let p = start + 3;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (p >= line.end || source.charCodeAt(p) === HASH) return skipLine;\n return indent === 0 ? documentRunEnd(source, lines, li) : skipLine;\n }\n\n // step 4 — node markers are consumed, not skipped; `- - key: v` nests.\n let i = start;\n while (i < line.end && isNodeMarker(source, i, line.end)) {\n i += 2;\n while (i < line.end && source.charCodeAt(i) === SPACE) i += 1;\n }\n if (i >= line.end || source.charCodeAt(i) === HASH) return skipLine;\n const hasMarker = i > start;\n\n // step 5 — find the key. A colon NOT followed by U+0020 or the line end is an ordinary key\n // character, so `a:b: v` has the key `a:b`; stating that is what keeps five scanners agreeing.\n const keyStart = i;\n const first = source.charCodeAt(i);\n let colon = -1;\n let keyEnd = -1;\n let isDeclined = false;\n let isOpenQuote = false;\n if (first === DQUOTE || first === SQUOTE) {\n const close = closingQuote(source, line, i);\n if (close < 0) isOpenQuote = true;\n else {\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n if (isIndicatorColon(source, p, line.end)) {\n colon = p;\n keyEnd = close + 1;\n isDeclined = true;\n }\n }\n } else if (\n first !== LBRACE &&\n first !== LBRACKET &&\n first !== AMPERSAND &&\n first !== STAR &&\n first !== BANG\n ) {\n for (let j = i; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (c === HASH && source.charCodeAt(j - 1) === SPACE) break;\n if (isIndicatorColon(source, j, line.end)) {\n colon = j;\n break;\n }\n if (\n c === DQUOTE ||\n c === SQUOTE ||\n c === LBRACE ||\n c === LBRACKET ||\n c === AMPERSAND ||\n c === STAR ||\n c === BANG ||\n c === HASH\n ) {\n isDeclined = true;\n }\n }\n if (colon >= 0) {\n keyEnd = colon;\n while (keyEnd > keyStart && source.charCodeAt(keyEnd - 1) === SPACE) keyEnd -= 1;\n }\n }\n\n // No key: the line is a node of its own, and it absorbs its value run. One that opens a flow\n // collection, a block scalar or a quote and sits on a line of its own absorbs the region.\n if (colon < 0) {\n const isOwnLine =\n !hasMarker &&\n (isOpenQuote ||\n first === LBRACE ||\n first === LBRACKET ||\n first === PIPE ||\n first === GREATER);\n return isOwnLine\n ? ownLineRunEnd(source, lines, li, indent)\n : valueRunEnd(source, lines, li, indent);\n }\n\n // step 6 — an empty value means a nested node, whose lines ARE scanned on their own.\n let v = colon + 1;\n while (v < line.end && source.charCodeAt(v) === SPACE) v += 1;\n if (v >= line.end) return skipLine;\n\n // step 7 — the line carries an inline value, so its continuation lines belong to that value. A\n // declined key's value absorbs them only if it can continue on the next line.\n const value = source.charCodeAt(v);\n if (isDeclined) {\n let isOpen =\n value === PIPE ||\n value === GREATER ||\n value === LBRACE ||\n value === LBRACKET ||\n value === AMPERSAND ||\n value === BANG;\n if (value === DQUOTE || value === SQUOTE) {\n const close = closingQuote(source, line, v);\n let p = close + 1;\n while (p < line.end && source.charCodeAt(p) === SPACE) p += 1;\n isOpen = close < 0 || (p < line.end && source.charCodeAt(p) !== HASH);\n }\n return isOpen ? valueRunEnd(source, lines, li, indent) : skipLine;\n }\n const next = valueRunEnd(source, lines, li, indent);\n\n // step 8 — the key must be listed. Checked before the value's form, so an unlisted key costs\n // nothing to decline: this is what makes `run:`, `if:` and `image:` unreachable.\n if (!listed.has(source.slice(keyStart, keyEnd))) return next;\n if (isQuiet) return next;\n\n // step 9 — the scalar form.\n if (\n value === HASH ||\n value === AMPERSAND ||\n value === STAR ||\n value === BANG ||\n value === LBRACE ||\n value === LBRACKET\n ) {\n return next;\n }\n if (value === PIPE || value === GREATER) {\n blockScalar(source, lines, li, next, indent, v, spans);\n return next;\n }\n if (value === DQUOTE || value === SQUOTE) {\n if (!hasContinuation(source, lines, li, next)) quotedScalar(source, line, v, spans);\n return next;\n }\n if (!hasContinuation(source, lines, li, next)) plainScalar(source, line, v, spans);\n return next;\n}\n\n/**\n * 3.8.5. One span per non-blank content line, starting after the block's own indentation. The\n * header, the indentation and every line terminator lie outside every span — including the run\n * of line terminators at the end that the chomping indicator governs, which is why `|`, `|-`,\n * `|+`, `>`, `>-` and `>+` are handled identically here.\n */\nfunction blockScalar(\n source: string,\n lines: readonly Line[],\n li: number,\n runEnd: number,\n indent: number,\n v: number,\n spans: Span[],\n): void {\n const line = lines[li] as Line;\n\n // The header: at most one chomping indicator and at most one indentation indicator, in either\n // order, then optional spaces and an optional comment. Anything else is unrecognised.\n let h = v + 1;\n let explicitIndent = 0;\n let chomping = false;\n while (h < line.end) {\n const c = source.charCodeAt(h);\n if ((c === DASH || c === PLUS) && !chomping) {\n chomping = true;\n h += 1;\n continue;\n }\n if (c >= ONE && c <= NINE && explicitIndent === 0) {\n explicitIndent = c - ZERO;\n h += 1;\n continue;\n }\n break;\n }\n while (h < line.end && source.charCodeAt(h) === SPACE) h += 1;\n if (h < line.end && source.charCodeAt(h) !== HASH) return;\n\n // One definition of the run, and three conditions that make the whole block yield no spans.\n const content: Line[] = [];\n let contentIndent = -1;\n for (let k = li + 1; k < runEnd; k += 1) {\n const next = lines[k] as Line;\n if (isBlank(source, next)) continue; // blank lines belong to the block and yield no span\n if (hasTab(source, next) || hasLoneCarriageReturn(source, next)) return;\n const nextIndent = firstNonSpace(source, next) - next.start;\n if (contentIndent < 0) {\n contentIndent = explicitIndent > 0 ? indent + explicitIndent : nextIndent;\n }\n // An explicit indicator that disagrees with the block as written, or a later line dedented\n // inside it, is ambiguous rather than guessable — bail rather than choose.\n if (nextIndent < contentIndent) return;\n content.push(next);\n }\n if (contentIndent <= 0) return;\n\n for (const c of content) {\n const from = c.start + contentIndent;\n if (c.end > from) spans.push({ start: from, end: c.end });\n }\n}\n\n/**\n * 3.8.6. The span is the content between the quotes. A double-quoted scalar containing a backslash\n * yields no spans: the source spells that content with more characters than it has, which the\n * offset model of 3.1 cannot hold — the same constraint that makes an HTML character reference an\n * opaque unit in 3.6. In a single-quoted scalar `''` is the same kind of construct, and since spec\n * 1.9.0 it is such a unit: the range is split around it, so the apostrophe it spells stays\n * U+0027 and everything on either side converts. No colon test applies here: quoting neutralises\n * the colon, and applying the plain-scalar test would decline `title: \"Chapter 1: the beginning\"`.\n */\nfunction quotedScalar(source: string, line: Line, v: number, spans: Span[]): void {\n const quote = source.charCodeAt(v);\n const found: Span[] = [];\n let close = -1;\n let segment = v + 1;\n for (let j = v + 1; j < line.end; j += 1) {\n const c = source.charCodeAt(j);\n if (quote === DQUOTE && c === BACKSLASH) return;\n if (c !== quote) continue;\n if (quote === SQUOTE && j + 1 < line.end && source.charCodeAt(j + 1) === SQUOTE) {\n if (j > segment) found.push({ start: segment, end: j });\n segment = j + 2;\n j += 1;\n continue;\n }\n close = j;\n break;\n }\n if (close < 0) return;\n\n let after = close + 1;\n while (after < line.end && source.charCodeAt(after) === SPACE) after += 1;\n if (after < line.end && source.charCodeAt(after) !== HASH) return;\n\n if (close > segment) found.push({ start: segment, end: close });\n spans.push(...found);\n}\n\n/**\n * 3.8.6. In a plain scalar `:` and `#` are still live: U+0020 beside either of them is what turns\n * a scalar into a mapping indicator or a comment, and `dashes` emits U+0020 in every `-spaced`\n * locale. Lifting both out as opaque units leaves the dash token against a boundary marker, which\n * `dashes` declines on its own account — the edge-growth rule of 3.4 is the second net, not the\n * first.\n */\nfunction plainScalar(source: string, line: Line, v: number, spans: Span[]): void {\n // The scalar ends before a trailing comment, so a colon inside that comment is not the\n // scalar's and must not decline it.\n let end = line.end;\n for (let j = v; j < line.end; j += 1) {\n if (source.charCodeAt(j) === HASH && j > v && source.charCodeAt(j - 1) === SPACE) {\n end = j - 1;\n break;\n }\n }\n while (end > v && source.charCodeAt(end - 1) === SPACE) end -= 1;\n if (end <= v) return;\n\n // Compact nesting is not a value: `key: - item` opens a sequence, and `key: a .:` is a mapping\n // whose key is `a .` — a plain scalar can never contain a colon in that position.\n if (isSequenceDash(source, v, line.end)) return;\n for (let j = v; j < end; j += 1) if (isIndicatorColon(source, j, line.end)) return;\n\n let segment = v;\n for (let j = v; j <= end; j += 1) {\n if (j === end || source.charCodeAt(j) === COLON || source.charCodeAt(j) === HASH) {\n if (j > segment) spans.push({ start: segment, end: j });\n segment = j + 1;\n }\n }\n}\n","import { PolytypoError } from \"../errors.js\";\n\n/**\n * modes.md §3.8.2: `yaml` mode's `keys` option, resolved once at the call boundary.\n *\n * It has **no default**, for the reason `dialect` has none. YAML is a data format with islands of\n * prose in it, and nothing in its syntax marks them — `description` holds a sentence and `run`\n * holds a shell script, spelled identically — so a default would be a guess about the schema\n * above the document. An **empty list is legal**: \"process nothing\" is a choice a caller may\n * make, not an error.\n *\n * Checked after `locale`, last of the option checks, alongside `dialect` (ARCHITECTURE.md §7).\n * The two never both apply, since each belongs to a different mode.\n */\nexport function resolveYamlKeys(value: unknown): readonly string[] {\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" is required when mode is \"yaml\" and must be a list of strings (modes.md §3.8.2). ` +\n `Received ${value === undefined ? \"nothing\" : JSON.stringify(value)}.`,\n );\n }\n for (const key of value as readonly unknown[]) {\n if (typeof key !== \"string\") {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"keys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n\n/**\n * modes.md 3.7.4: `markdown` mode's `frontmatterKeys`. Optional — absent means the frontmatter\n * block is skipped whole, which is every pre-1.7.0 document's behaviour — and an empty list is\n * legal, exactly as it is for `keys`.\n *\n * Checked **after `dialect` and before the parse** (modes.md 3.7.4), which is what decides that a\n * document failing to parse in its dialect still reports the option error rather than\n * POLYTYPO_MALFORMED_INPUT. It is a separate function from `resolveYamlKeys` because the two\n * differ exactly where a caller would be bitten by sharing one: this option has no requiredness.\n */\nexport function resolveFrontmatterKeys(value: unknown): readonly string[] | undefined {\n if (value === undefined) return undefined;\n if (!Array.isArray(value)) {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"frontmatterKeys\" must be a list of strings when given (modes.md §3.7.4). ` +\n `Received ${JSON.stringify(value)}.`,\n );\n }\n for (const key of value as readonly unknown[]) {\n if (typeof key !== \"string\") {\n throw new PolytypoError(\n \"POLYTYPO_INVALID_OPTION\",\n `\"frontmatterKeys\" must contain only strings; received ${JSON.stringify(key)}.`,\n );\n }\n }\n return value as readonly string[];\n}\n"]}
|
package/dist/html.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunkVRCQJFUGcjs = require('./chunk-VRCQJFUG.cjs');
|
|
5
|
+
require('./chunk-GT3YI4HK.cjs');
|
|
6
|
+
require('./chunk-E7PHHD77.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkUF734P5Mcjs = require('./chunk-UF734P5M.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkM2XO2UOCcjs = require('./chunk-M2XO2UOC.cjs');
|
|
13
13
|
|
|
14
14
|
// src/index.html.ts
|
|
15
15
|
function transform(input, options) {
|
|
16
16
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
17
|
-
|
|
18
|
-
return
|
|
17
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
18
|
+
return _chunkVRCQJFUGcjs.runHtmlPipeline.call(void 0, input, given);
|
|
19
19
|
}
|
|
20
20
|
function analyze(input, options) {
|
|
21
21
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
22
|
-
|
|
23
|
-
return
|
|
22
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "html", "polytypo/html");
|
|
23
|
+
return _chunkVRCQJFUGcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.PolytypoError =
|
|
29
|
+
exports.PolytypoError = _chunkM2XO2UOCcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
30
30
|
//# sourceMappingURL=html.cjs.map
|
package/dist/html.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeHtmlPipeline,
|
|
3
3
|
runHtmlPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-R7AVFEMZ.js";
|
|
5
|
+
import "./chunk-OO5UBFQ3.js";
|
|
6
|
+
import "./chunk-7YM3XE7R.js";
|
|
7
7
|
import {
|
|
8
8
|
assertFixedMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MYO6QNUZ.js";
|
|
10
10
|
import {
|
|
11
11
|
PolytypoError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HUSFFMHK.js";
|
|
13
13
|
|
|
14
14
|
// src/index.html.ts
|
|
15
15
|
function transform(input, options) {
|
package/dist/index.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4IMDK5WJcjs = require('./chunk-4IMDK5WJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkVRCQJFUGcjs = require('./chunk-VRCQJFUG.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('./chunk-
|
|
12
|
+
var _chunkRGL2IVXTcjs = require('./chunk-RGL2IVXT.cjs');
|
|
13
|
+
require('./chunk-GT3YI4HK.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
require('./chunk-
|
|
19
|
-
require('./chunk-
|
|
17
|
+
var _chunk6SL3VC37cjs = require('./chunk-6SL3VC37.cjs');
|
|
18
|
+
require('./chunk-XNXXVTRR.cjs');
|
|
19
|
+
require('./chunk-E7PHHD77.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkM2XO2UOCcjs = require('./chunk-M2XO2UOC.cjs');
|
|
23
23
|
|
|
24
24
|
// src/engine/pipeline.ts
|
|
25
25
|
function resolveMode(mode) {
|
|
26
26
|
if (mode === void 0 || mode === "text") return "text";
|
|
27
27
|
if (mode === "html" || mode === "markdown" || mode === "yaml") return mode;
|
|
28
|
-
throw new (0,
|
|
28
|
+
throw new (0, _chunkM2XO2UOCcjs.PolytypoError)(
|
|
29
29
|
"POLYTYPO_INVALID_MODE",
|
|
30
30
|
`Unknown mode "${String(mode)}". Expected "text", "html", "markdown" or "yaml".`
|
|
31
31
|
);
|
|
@@ -33,18 +33,18 @@ function resolveMode(mode) {
|
|
|
33
33
|
function runPipeline(input, options) {
|
|
34
34
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
35
35
|
const mode = resolveMode(given.mode);
|
|
36
|
-
if (mode === "text") return
|
|
37
|
-
if (mode === "html") return
|
|
38
|
-
if (mode === "yaml") return
|
|
39
|
-
return
|
|
36
|
+
if (mode === "text") return _chunk4IMDK5WJcjs.runTextPipeline.call(void 0, input, given);
|
|
37
|
+
if (mode === "html") return _chunkVRCQJFUGcjs.runHtmlPipeline.call(void 0, input, given);
|
|
38
|
+
if (mode === "yaml") return _chunk6SL3VC37cjs.runYamlPipeline.call(void 0, input, given);
|
|
39
|
+
return _chunkRGL2IVXTcjs.runMarkdownPipeline.call(void 0, input, given);
|
|
40
40
|
}
|
|
41
41
|
function runAnalyze(input, options) {
|
|
42
42
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
43
43
|
const mode = resolveMode(given.mode);
|
|
44
|
-
if (mode === "text") return
|
|
45
|
-
if (mode === "html") return
|
|
46
|
-
if (mode === "yaml") return
|
|
47
|
-
return
|
|
44
|
+
if (mode === "text") return _chunk4IMDK5WJcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
45
|
+
if (mode === "html") return _chunkVRCQJFUGcjs.analyzeHtmlPipeline.call(void 0, input, given);
|
|
46
|
+
if (mode === "yaml") return _chunk6SL3VC37cjs.analyzeYamlPipeline.call(void 0, input, given);
|
|
47
|
+
return _chunkRGL2IVXTcjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/index.ts
|
|
@@ -58,5 +58,5 @@ function analyze(input, options) {
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.PolytypoError =
|
|
61
|
+
exports.PolytypoError = _chunkM2XO2UOCcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
62
62
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UHXG7EUL.js";
|
|
5
5
|
import {
|
|
6
6
|
analyzeHtmlPipeline,
|
|
7
7
|
runHtmlPipeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R7AVFEMZ.js";
|
|
9
9
|
import {
|
|
10
10
|
analyzeMarkdownPipeline,
|
|
11
11
|
runMarkdownPipeline
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EB47BYQP.js";
|
|
13
|
+
import "./chunk-OO5UBFQ3.js";
|
|
14
14
|
import {
|
|
15
15
|
analyzeYamlPipeline,
|
|
16
16
|
runYamlPipeline
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-U3BQVYLI.js";
|
|
18
|
+
import "./chunk-M2O7YEYA.js";
|
|
19
|
+
import "./chunk-7YM3XE7R.js";
|
|
20
20
|
import {
|
|
21
21
|
PolytypoError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HUSFFMHK.js";
|
|
23
23
|
|
|
24
24
|
// src/engine/pipeline.ts
|
|
25
25
|
function resolveMode(mode) {
|
package/dist/markdown.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var _chunkRGL2IVXTcjs = require('./chunk-RGL2IVXT.cjs');
|
|
5
|
+
require('./chunk-GT3YI4HK.cjs');
|
|
6
|
+
require('./chunk-XNXXVTRR.cjs');
|
|
7
|
+
require('./chunk-E7PHHD77.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkUF734P5Mcjs = require('./chunk-UF734P5M.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkM2XO2UOCcjs = require('./chunk-M2XO2UOC.cjs');
|
|
14
14
|
|
|
15
15
|
// src/index.markdown.ts
|
|
16
16
|
function transform(input, options) {
|
|
17
17
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
19
|
+
return _chunkRGL2IVXTcjs.runMarkdownPipeline.call(void 0, input, given);
|
|
20
20
|
}
|
|
21
21
|
function analyze(input, options) {
|
|
22
22
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
23
|
-
|
|
24
|
-
return
|
|
23
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "markdown", "polytypo/markdown");
|
|
24
|
+
return _chunkRGL2IVXTcjs.analyzeMarkdownPipeline.call(void 0, input, given);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
exports.PolytypoError =
|
|
30
|
+
exports.PolytypoError = _chunkM2XO2UOCcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
31
31
|
//# sourceMappingURL=markdown.cjs.map
|
package/dist/markdown.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeMarkdownPipeline,
|
|
3
3
|
runMarkdownPipeline
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-EB47BYQP.js";
|
|
5
|
+
import "./chunk-OO5UBFQ3.js";
|
|
6
|
+
import "./chunk-M2O7YEYA.js";
|
|
7
|
+
import "./chunk-7YM3XE7R.js";
|
|
8
8
|
import {
|
|
9
9
|
assertFixedMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MYO6QNUZ.js";
|
|
11
11
|
import {
|
|
12
12
|
PolytypoError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HUSFFMHK.js";
|
|
14
14
|
|
|
15
15
|
// src/index.markdown.ts
|
|
16
16
|
function transform(input, options) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4IMDK5WJcjs = require('./chunk-4IMDK5WJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUF734P5Mcjs = require('./chunk-UF734P5M.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkM2XO2UOCcjs = require('./chunk-M2XO2UOC.cjs');
|
|
11
11
|
|
|
12
12
|
// src/index.text.ts
|
|
13
13
|
function transform(input, options) {
|
|
14
14
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
16
|
+
return _chunk4IMDK5WJcjs.runTextPipeline.call(void 0, input, given);
|
|
17
17
|
}
|
|
18
18
|
function analyze(input, options) {
|
|
19
19
|
const given = _nullishCoalesce(options, () => ( {}));
|
|
20
|
-
|
|
21
|
-
return
|
|
20
|
+
_chunkUF734P5Mcjs.assertFixedMode.call(void 0, given.mode, "text", "polytypo/text");
|
|
21
|
+
return _chunk4IMDK5WJcjs.analyzeTextPipeline.call(void 0, input, given);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.PolytypoError =
|
|
27
|
+
exports.PolytypoError = _chunkM2XO2UOCcjs.PolytypoError; exports.analyze = analyze; exports.transform = transform;
|
|
28
28
|
//# sourceMappingURL=text.cjs.map
|
package/dist/text.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzeTextPipeline,
|
|
3
3
|
runTextPipeline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UHXG7EUL.js";
|
|
5
5
|
import {
|
|
6
6
|
assertFixedMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MYO6QNUZ.js";
|
|
8
8
|
import {
|
|
9
9
|
PolytypoError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HUSFFMHK.js";
|
|
11
11
|
|
|
12
12
|
// src/index.text.ts
|
|
13
13
|
function transform(input, options) {
|