@wirecat/wordpress-cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/LICENSE +204 -0
- package/README.md +248 -2
- package/contracts/wirecat.json +2535 -0
- package/dist/bin/wordpress.d.ts +3 -0
- package/dist/bin/wordpress.d.ts.map +1 -0
- package/dist/bin/wordpress.js +40 -0
- package/dist/bin/wordpress.js.map +1 -0
- package/dist/bundle/agent-LKBRYKNB.js +37 -0
- package/dist/bundle/all-profiles-OEV7VFQG.js +320 -0
- package/dist/bundle/anthropic-JKTZP2DW.js +91 -0
- package/dist/bundle/app-server-7LWLDDE2.js +249 -0
- package/dist/bundle/bun-2FLR4IV4.js +169 -0
- package/dist/bundle/bun-sqlite-GRSRX5P4.js +76 -0
- package/dist/bundle/chunk-2BI25SEE.js +259 -0
- package/dist/bundle/chunk-2UEGJ5AJ.js +52 -0
- package/dist/bundle/chunk-2XUV7HNE.js +58 -0
- package/dist/bundle/chunk-2Z7UOXFC.js +16 -0
- package/dist/bundle/chunk-3BM6KBWP.js +2788 -0
- package/dist/bundle/chunk-3BRAZVHR.js +1010 -0
- package/dist/bundle/chunk-3LMW7U7F.js +1233 -0
- package/dist/bundle/chunk-3LVTQFGB.js +2000 -0
- package/dist/bundle/chunk-3TKFFSFU.js +106 -0
- package/dist/bundle/chunk-3UX4VJWD.js +78 -0
- package/dist/bundle/chunk-4HEXAGKT.js +334 -0
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/chunk-5XPHFV7H.js +2333 -0
- package/dist/bundle/chunk-5Z3P543G.js +80 -0
- package/dist/bundle/chunk-6UYDKCV6.js +794 -0
- package/dist/bundle/chunk-7GNB4LBX.js +50 -0
- package/dist/bundle/chunk-7HJFBOAT.js +161 -0
- package/dist/bundle/chunk-7JVKQ6NM.js +206 -0
- package/dist/bundle/chunk-7QH5BZUG.js +142 -0
- package/dist/bundle/chunk-A474OVIW.js +1392 -0
- package/dist/bundle/chunk-AENEMQL3.js +1068 -0
- package/dist/bundle/chunk-AL7I4DT4.js +65718 -0
- package/dist/bundle/chunk-ARGRGTPX.js +108 -0
- package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
- package/dist/bundle/chunk-BAXNAOOL.js +76 -0
- package/dist/bundle/chunk-BH63B66W.js +407 -0
- package/dist/bundle/chunk-CCOSG3F2.js +24616 -0
- package/dist/bundle/chunk-CFQQTDSA.js +46 -0
- package/dist/bundle/chunk-CGCUOT67.js +388 -0
- package/dist/bundle/chunk-CHPWBQUK.js +39 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-EHW45LLT.js +100 -0
- package/dist/bundle/chunk-F3AV5ZSL.js +338 -0
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/chunk-F5ZAN7OC.js +6848 -0
- package/dist/bundle/chunk-FMMYBVCH.js +38 -0
- package/dist/bundle/chunk-FNB4SWTY.js +66 -0
- package/dist/bundle/chunk-FQROWBKV.js +12660 -0
- package/dist/bundle/chunk-FV2HJOSC.js +771 -0
- package/dist/bundle/chunk-GCAJW4SR.js +53 -0
- package/dist/bundle/chunk-GPRJXJC7.js +102 -0
- package/dist/bundle/chunk-HCOZUOSN.js +54 -0
- package/dist/bundle/chunk-HM6AMYHR.js +72 -0
- package/dist/bundle/chunk-HVXOA4FO.js +23 -0
- package/dist/bundle/chunk-HWQ7572G.js +95 -0
- package/dist/bundle/chunk-IJVTN5L3.js +82 -0
- package/dist/bundle/chunk-IZDDBOHU.js +3610 -0
- package/dist/bundle/chunk-JAE5B4G7.js +388 -0
- package/dist/bundle/chunk-K2Y5K37O.js +218 -0
- package/dist/bundle/chunk-KCH224US.js +9581 -0
- package/dist/bundle/chunk-KZJQPJK5.js +230 -0
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/chunk-LECMHK2F.js +18 -0
- package/dist/bundle/chunk-LWEMZJLG.js +1332 -0
- package/dist/bundle/chunk-LWTETL2O.js +185 -0
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/chunk-MJ6LTG4L.js +170 -0
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/chunk-ODVGFCBE.js +557 -0
- package/dist/bundle/chunk-OEQNP56V.js +633 -0
- package/dist/bundle/chunk-OV6WQY3L.js +39 -0
- package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
- package/dist/bundle/chunk-PPNTY7LD.js +733 -0
- package/dist/bundle/chunk-PRZYRA66.js +358 -0
- package/dist/bundle/chunk-PV5UYGRJ.js +41594 -0
- package/dist/bundle/chunk-QYTOLPNI.js +52 -0
- package/dist/bundle/chunk-R7Y3XU66.js +362 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-SD5CXGIG.js +188 -0
- package/dist/bundle/chunk-SXY5G62I.js +288 -0
- package/dist/bundle/chunk-T37TAXVL.js +29 -0
- package/dist/bundle/chunk-T5SOY3AE.js +1197 -0
- package/dist/bundle/chunk-TJ7OORSO.js +1876 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/chunk-U6VLNYCO.js +73 -0
- package/dist/bundle/chunk-UC7JLE6J.js +58 -0
- package/dist/bundle/chunk-UUIOAZPH.js +156 -0
- package/dist/bundle/chunk-UXQ24OY6.js +4072 -0
- package/dist/bundle/chunk-VBRRMGON.js +1007 -0
- package/dist/bundle/chunk-VRIBES2C.js +319 -0
- package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
- package/dist/bundle/chunk-XT5XYQEZ.js +3414 -0
- package/dist/bundle/chunk-XTAS5Z3G.js +2231 -0
- package/dist/bundle/chunk-XYQVVW4R.js +24 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/chunk-YUDVRFXN.js +63 -0
- package/dist/bundle/chunk-Z3I2MCUT.js +131 -0
- package/dist/bundle/chunk-ZDI3WC7V.js +353 -0
- package/dist/bundle/chunk-ZVQ7KFMT.js +274 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-P7YE4EKS.js +37 -0
- package/dist/bundle/command-server-entry-XIMCBWMV.js +166 -0
- package/dist/bundle/decode-6XK55WYV.js +297 -0
- package/dist/bundle/definitions-GIQCGYPR.js +7986 -0
- package/dist/bundle/dispatch-JQBAZWCL.js +411 -0
- package/dist/bundle/dist-2TV3NVE5.js +7577 -0
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/echarts-YRRVLEX3.js +42501 -0
- package/dist/bundle/embed-L3EEQSGX.js +38 -0
- package/dist/bundle/embedder-BIKLBV3J.js +111 -0
- package/dist/bundle/failure-I6AAF5R5.js +25 -0
- package/dist/bundle/first-run-W6G6TYZ2.js +29 -0
- package/dist/bundle/first-screen-ITIAJIBU.js +37 -0
- package/dist/bundle/hast-util-from-html-ZHU6HGIE.js +10531 -0
- package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
- package/dist/bundle/hast-util-to-mdast-D62XX3NR.js +2272 -0
- package/dist/bundle/instructions-AG7SRWTR.js +11 -0
- package/dist/bundle/mcp-YGOAUNC3.js +167 -0
- package/dist/bundle/mdast-util-from-markdown-WVUJDSUO.js +1900 -0
- package/dist/bundle/mdast-util-gfm-KN2D32QS.js +1040 -0
- package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-UCAJNHJO.js +18 -0
- package/dist/bundle/meeting-combined-CQJ3JHHU.js +24 -0
- package/dist/bundle/meeting-model-MZ7VVBNK.js +25 -0
- package/dist/bundle/meeting-semantic-DADWRRHP.js +22 -0
- package/dist/bundle/micromark-extension-gfm-EEJRRJ36.js +1771 -0
- package/dist/bundle/node-GJQYN4FT.js +176 -0
- package/dist/bundle/node-JJ3WDCNJ.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-TPR62DT2.js +74 -0
- package/dist/bundle/oauth-WGY7JQVW.js +20 -0
- package/dist/bundle/open-DE7QZNAN.js +23 -0
- package/dist/bundle/openai-NHEFT3HS.js +238 -0
- package/dist/bundle/process-MEKCZMX3.js +91 -0
- package/dist/bundle/program-EP2S5BTM.js +38857 -0
- package/dist/bundle/prompt-PWY53BYH.js +17 -0
- package/dist/bundle/recognize-74TXHKMQ.js +26 -0
- package/dist/bundle/remote-F5TJZ5ER.js +31 -0
- package/dist/bundle/rerank-HWUO52UF.js +52 -0
- package/dist/bundle/schemas-4K6WWS5N.js +2157 -0
- package/dist/bundle/serve-I2USUY4X.js +199 -0
- package/dist/bundle/server-GDYDNO6K.js +79 -0
- package/dist/bundle/server-KYUW2AHB.js +212 -0
- package/dist/bundle/sqlite-runtime-N6VFGBJK.js +20 -0
- package/dist/bundle/state-L6JSCN77.js +36 -0
- package/dist/bundle/store-EPG2YPN3.js +291 -0
- package/dist/bundle/store-SQWQJE32.js +181 -0
- package/dist/bundle/store-maintenance-command-FTGSICVA.js +66 -0
- package/dist/bundle/surface-SNMHY6GP.js +65 -0
- package/dist/bundle/wordpress.js +183 -0
- package/dist/commands/api.d.ts +22 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +37 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/content.d.ts +4 -0
- package/dist/commands/content.d.ts.map +1 -0
- package/dist/commands/content.js +94 -0
- package/dist/commands/content.js.map +1 -0
- package/dist/commands/session.d.ts +8 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +28 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +69 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +37 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +31 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +7982 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +8830 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +229 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2019 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +3365 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/generated/wirecat-config.d.ts +11 -0
- package/dist/generated/wirecat-config.d.ts.map +1 -0
- package/dist/generated/wirecat-config.js +337 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/identity.d.ts +28 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +29 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +53 -0
- package/dist/program.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +87 -4
- package/skills/wordpress-cli/SKILL.md +88 -0
- package/skills/wordpress-cli/references/api/api-block-directory.md +17 -0
- package/skills/wordpress-cli/references/api/api-block-patterns.md +13 -0
- package/skills/wordpress-cli/references/api/api-block-types.md +34 -0
- package/skills/wordpress-cli/references/api/api-blocks.md +159 -0
- package/skills/wordpress-cli/references/api/api-categories.md +69 -0
- package/skills/wordpress-cli/references/api/api-comments.md +79 -0
- package/skills/wordpress-cli/references/api/api-font-collections.md +16 -0
- package/skills/wordpress-cli/references/api/api-font-families.md +122 -0
- package/skills/wordpress-cli/references/api/api-global-styles.md +29 -0
- package/skills/wordpress-cli/references/api/api-media.md +106 -0
- package/skills/wordpress-cli/references/api/api-menu-items.md +115 -0
- package/skills/wordpress-cli/references/api/api-menu-locations.md +22 -0
- package/skills/wordpress-cli/references/api/api-menus.md +69 -0
- package/skills/wordpress-cli/references/api/api-navigation.md +155 -0
- package/skills/wordpress-cli/references/api/api-pages.md +161 -0
- package/skills/wordpress-cli/references/api/api-pattern-directory.md +23 -0
- package/skills/wordpress-cli/references/api/api-plugins.md +25 -0
- package/skills/wordpress-cli/references/api/api-posts.md +166 -0
- package/skills/wordpress-cli/references/api/api-search.md +21 -0
- package/skills/wordpress-cli/references/api/api-settings.md +19 -0
- package/skills/wordpress-cli/references/api/api-sidebars.md +34 -0
- package/skills/wordpress-cli/references/api/api-statuses.md +22 -0
- package/skills/wordpress-cli/references/api/api-tags.md +69 -0
- package/skills/wordpress-cli/references/api/api-taxonomies.md +23 -0
- package/skills/wordpress-cli/references/api/api-template-parts.md +38 -0
- package/skills/wordpress-cli/references/api/api-templates.md +38 -0
- package/skills/wordpress-cli/references/api/api-themes.md +12 -0
- package/skills/wordpress-cli/references/api/api-types.md +22 -0
- package/skills/wordpress-cli/references/api/api-users.md +149 -0
- package/skills/wordpress-cli/references/api/api-widget-types.md +46 -0
- package/skills/wordpress-cli/references/api/api-widgets.md +57 -0
- package/skills/wordpress-cli/references/api/api-wp-pattern-category.md +69 -0
- package/skills/wordpress-cli/references/api.md +44 -0
|
@@ -0,0 +1,3414 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
normalizeIdentifier
|
|
5
|
+
} from "./chunk-F4BX7TH2.js";
|
|
6
|
+
import {
|
|
7
|
+
classifyCharacter,
|
|
8
|
+
decodeNamedCharacterReference,
|
|
9
|
+
htmlBlockNames,
|
|
10
|
+
htmlRawNames
|
|
11
|
+
} from "./chunk-XTAS5Z3G.js";
|
|
12
|
+
import {
|
|
13
|
+
asciiAlpha,
|
|
14
|
+
asciiAlphanumeric,
|
|
15
|
+
asciiAtext,
|
|
16
|
+
asciiControl,
|
|
17
|
+
asciiDigit,
|
|
18
|
+
asciiHexDigit,
|
|
19
|
+
asciiPunctuation,
|
|
20
|
+
markdownLineEnding,
|
|
21
|
+
markdownLineEndingOrSpace,
|
|
22
|
+
markdownSpace
|
|
23
|
+
} from "./chunk-UC7JLE6J.js";
|
|
24
|
+
import {
|
|
25
|
+
__name
|
|
26
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
27
|
+
|
|
28
|
+
// node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.js
|
|
29
|
+
function splice(list2, start, remove, items) {
|
|
30
|
+
const end = list2.length;
|
|
31
|
+
let chunkStart = 0;
|
|
32
|
+
let parameters;
|
|
33
|
+
if (start < 0) {
|
|
34
|
+
start = -start > end ? 0 : end + start;
|
|
35
|
+
} else {
|
|
36
|
+
start = start > end ? end : start;
|
|
37
|
+
}
|
|
38
|
+
remove = remove > 0 ? remove : 0;
|
|
39
|
+
if (items.length < 1e4) {
|
|
40
|
+
parameters = Array.from(items);
|
|
41
|
+
parameters.unshift(start, remove);
|
|
42
|
+
list2.splice(...parameters);
|
|
43
|
+
} else {
|
|
44
|
+
if (remove) list2.splice(start, remove);
|
|
45
|
+
while (chunkStart < items.length) {
|
|
46
|
+
parameters = items.slice(chunkStart, chunkStart + 1e4);
|
|
47
|
+
parameters.unshift(start, 0);
|
|
48
|
+
list2.splice(...parameters);
|
|
49
|
+
chunkStart += 1e4;
|
|
50
|
+
start += 1e4;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
__name(splice, "splice");
|
|
55
|
+
function push(list2, items) {
|
|
56
|
+
if (list2.length > 0) {
|
|
57
|
+
splice(list2, list2.length, 0, items);
|
|
58
|
+
return list2;
|
|
59
|
+
}
|
|
60
|
+
return items;
|
|
61
|
+
}
|
|
62
|
+
__name(push, "push");
|
|
63
|
+
|
|
64
|
+
// node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
65
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
66
|
+
function combineExtensions(extensions) {
|
|
67
|
+
const all = {};
|
|
68
|
+
let index = -1;
|
|
69
|
+
while (++index < extensions.length) {
|
|
70
|
+
syntaxExtension(all, extensions[index]);
|
|
71
|
+
}
|
|
72
|
+
return all;
|
|
73
|
+
}
|
|
74
|
+
__name(combineExtensions, "combineExtensions");
|
|
75
|
+
function syntaxExtension(all, extension) {
|
|
76
|
+
let hook;
|
|
77
|
+
for (hook in extension) {
|
|
78
|
+
const maybe = hasOwnProperty.call(all, hook) ? all[hook] : void 0;
|
|
79
|
+
const left = maybe || (all[hook] = {});
|
|
80
|
+
const right = extension[hook];
|
|
81
|
+
let code;
|
|
82
|
+
if (right) {
|
|
83
|
+
for (code in right) {
|
|
84
|
+
if (!hasOwnProperty.call(left, code)) left[code] = [];
|
|
85
|
+
const value = right[code];
|
|
86
|
+
constructs(
|
|
87
|
+
// @ts-expect-error Looks like a list.
|
|
88
|
+
left[code],
|
|
89
|
+
Array.isArray(value) ? value : value ? [value] : []
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
__name(syntaxExtension, "syntaxExtension");
|
|
96
|
+
function constructs(existing, list2) {
|
|
97
|
+
let index = -1;
|
|
98
|
+
const before = [];
|
|
99
|
+
while (++index < list2.length) {
|
|
100
|
+
;
|
|
101
|
+
(list2[index].add === "after" ? existing : before).push(list2[index]);
|
|
102
|
+
}
|
|
103
|
+
splice(existing, 0, 0, before);
|
|
104
|
+
}
|
|
105
|
+
__name(constructs, "constructs");
|
|
106
|
+
function combineHtmlExtensions(htmlExtensions) {
|
|
107
|
+
const handlers = {};
|
|
108
|
+
let index = -1;
|
|
109
|
+
while (++index < htmlExtensions.length) {
|
|
110
|
+
htmlExtension(handlers, htmlExtensions[index]);
|
|
111
|
+
}
|
|
112
|
+
return handlers;
|
|
113
|
+
}
|
|
114
|
+
__name(combineHtmlExtensions, "combineHtmlExtensions");
|
|
115
|
+
function htmlExtension(all, extension) {
|
|
116
|
+
let hook;
|
|
117
|
+
for (hook in extension) {
|
|
118
|
+
const maybe = hasOwnProperty.call(all, hook) ? all[hook] : void 0;
|
|
119
|
+
const left = maybe || (all[hook] = {});
|
|
120
|
+
const right = extension[hook];
|
|
121
|
+
let type;
|
|
122
|
+
if (right) {
|
|
123
|
+
for (type in right) {
|
|
124
|
+
left[type] = right[type];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
__name(htmlExtension, "htmlExtension");
|
|
130
|
+
|
|
131
|
+
// node_modules/.pnpm/micromark-factory-space@2.1.0/node_modules/micromark-factory-space/index.js
|
|
132
|
+
function factorySpace(effects, ok, type, max) {
|
|
133
|
+
const limit = max ? max - 1 : Infinity;
|
|
134
|
+
let size = 0;
|
|
135
|
+
return start;
|
|
136
|
+
function start(code) {
|
|
137
|
+
if (markdownSpace(code)) {
|
|
138
|
+
effects.enter(type);
|
|
139
|
+
return prefix(code);
|
|
140
|
+
}
|
|
141
|
+
return ok(code);
|
|
142
|
+
}
|
|
143
|
+
__name(start, "start");
|
|
144
|
+
function prefix(code) {
|
|
145
|
+
if (markdownSpace(code) && size++ < limit) {
|
|
146
|
+
effects.consume(code);
|
|
147
|
+
return prefix;
|
|
148
|
+
}
|
|
149
|
+
effects.exit(type);
|
|
150
|
+
return ok(code);
|
|
151
|
+
}
|
|
152
|
+
__name(prefix, "prefix");
|
|
153
|
+
}
|
|
154
|
+
__name(factorySpace, "factorySpace");
|
|
155
|
+
function factorySpaceMinMax(effects, ok, nok, type, min, max) {
|
|
156
|
+
let size = 0;
|
|
157
|
+
return start;
|
|
158
|
+
function start(code) {
|
|
159
|
+
if (max > 0 && markdownSpace(code)) {
|
|
160
|
+
effects.enter(type);
|
|
161
|
+
return prefix(code);
|
|
162
|
+
}
|
|
163
|
+
return after(code);
|
|
164
|
+
}
|
|
165
|
+
__name(start, "start");
|
|
166
|
+
function prefix(code) {
|
|
167
|
+
if (markdownSpace(code) && size < max) {
|
|
168
|
+
effects.consume(code);
|
|
169
|
+
size++;
|
|
170
|
+
return prefix;
|
|
171
|
+
}
|
|
172
|
+
effects.exit(type);
|
|
173
|
+
return after(code);
|
|
174
|
+
}
|
|
175
|
+
__name(prefix, "prefix");
|
|
176
|
+
function after(code) {
|
|
177
|
+
return size >= min ? ok(code) : nok(code);
|
|
178
|
+
}
|
|
179
|
+
__name(after, "after");
|
|
180
|
+
}
|
|
181
|
+
__name(factorySpaceMinMax, "factorySpaceMinMax");
|
|
182
|
+
|
|
183
|
+
// node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
|
|
184
|
+
function resolveAll(constructs2, events, context) {
|
|
185
|
+
const called = [];
|
|
186
|
+
let index = -1;
|
|
187
|
+
while (++index < constructs2.length) {
|
|
188
|
+
const resolve = constructs2[index].resolveAll;
|
|
189
|
+
if (resolve && !called.includes(resolve)) {
|
|
190
|
+
events = resolve(events, context);
|
|
191
|
+
called.push(resolve);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return events;
|
|
195
|
+
}
|
|
196
|
+
__name(resolveAll, "resolveAll");
|
|
197
|
+
|
|
198
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
199
|
+
var blankLine = {
|
|
200
|
+
partial: true,
|
|
201
|
+
tokenize: tokenizeBlankLine
|
|
202
|
+
};
|
|
203
|
+
function tokenizeBlankLine(effects, ok, nok) {
|
|
204
|
+
return start;
|
|
205
|
+
function start(code) {
|
|
206
|
+
return markdownSpace(code) ? factorySpace(effects, after, "linePrefix")(code) : after(code);
|
|
207
|
+
}
|
|
208
|
+
__name(start, "start");
|
|
209
|
+
function after(code) {
|
|
210
|
+
return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
|
|
211
|
+
}
|
|
212
|
+
__name(after, "after");
|
|
213
|
+
}
|
|
214
|
+
__name(tokenizeBlankLine, "tokenizeBlankLine");
|
|
215
|
+
|
|
216
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/attention.js
|
|
217
|
+
var attention = {
|
|
218
|
+
name: "attention",
|
|
219
|
+
resolveAll: resolveAllAttention,
|
|
220
|
+
tokenize: tokenizeAttention
|
|
221
|
+
};
|
|
222
|
+
function resolveAllAttention(events, context) {
|
|
223
|
+
let index = -1;
|
|
224
|
+
let nextEvents;
|
|
225
|
+
while (++index < events.length) {
|
|
226
|
+
if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
|
|
227
|
+
let open = index;
|
|
228
|
+
while (open--) {
|
|
229
|
+
if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same:
|
|
230
|
+
context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
|
|
231
|
+
if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
const use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
|
|
235
|
+
const start = {
|
|
236
|
+
...events[open][1].end
|
|
237
|
+
};
|
|
238
|
+
const end = {
|
|
239
|
+
...events[index][1].start
|
|
240
|
+
};
|
|
241
|
+
movePoint(start, -use);
|
|
242
|
+
movePoint(end, use);
|
|
243
|
+
const openingSequence = {
|
|
244
|
+
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
245
|
+
start,
|
|
246
|
+
end: {
|
|
247
|
+
...events[open][1].end
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
const closingSequence = {
|
|
251
|
+
type: use > 1 ? "strongSequence" : "emphasisSequence",
|
|
252
|
+
start: {
|
|
253
|
+
...events[index][1].start
|
|
254
|
+
},
|
|
255
|
+
end
|
|
256
|
+
};
|
|
257
|
+
const text = {
|
|
258
|
+
type: use > 1 ? "strongText" : "emphasisText",
|
|
259
|
+
start: {
|
|
260
|
+
...events[open][1].end
|
|
261
|
+
},
|
|
262
|
+
end: {
|
|
263
|
+
...events[index][1].start
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const group = {
|
|
267
|
+
type: use > 1 ? "strong" : "emphasis",
|
|
268
|
+
start: {
|
|
269
|
+
...openingSequence.start
|
|
270
|
+
},
|
|
271
|
+
end: {
|
|
272
|
+
...closingSequence.end
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
events[open][1].end = {
|
|
276
|
+
...openingSequence.start
|
|
277
|
+
};
|
|
278
|
+
events[index][1].start = {
|
|
279
|
+
...closingSequence.end
|
|
280
|
+
};
|
|
281
|
+
nextEvents = [];
|
|
282
|
+
if (events[open][1].end.offset - events[open][1].start.offset) {
|
|
283
|
+
nextEvents = push(nextEvents, [["enter", events[open][1], context], ["exit", events[open][1], context]]);
|
|
284
|
+
}
|
|
285
|
+
nextEvents = push(nextEvents, [["enter", group, context], ["enter", openingSequence, context], ["exit", openingSequence, context], ["enter", text, context]]);
|
|
286
|
+
nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));
|
|
287
|
+
nextEvents = push(nextEvents, [["exit", text, context], ["enter", closingSequence, context], ["exit", closingSequence, context], ["exit", group, context]]);
|
|
288
|
+
let offset = 0;
|
|
289
|
+
if (events[index][1].end.offset - events[index][1].start.offset) {
|
|
290
|
+
offset = 2;
|
|
291
|
+
nextEvents = push(nextEvents, [["enter", events[index][1], context], ["exit", events[index][1], context]]);
|
|
292
|
+
}
|
|
293
|
+
splice(events, open - 1, index - open + 3, nextEvents);
|
|
294
|
+
index = open + nextEvents.length - offset - 2;
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
index = -1;
|
|
301
|
+
while (++index < events.length) {
|
|
302
|
+
if (events[index][1].type === "attentionSequence") {
|
|
303
|
+
events[index][1].type = "data";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return events;
|
|
307
|
+
}
|
|
308
|
+
__name(resolveAllAttention, "resolveAllAttention");
|
|
309
|
+
function tokenizeAttention(effects, ok) {
|
|
310
|
+
const attentionMarkers = this.parser.constructs.attentionMarkers.null;
|
|
311
|
+
const previous2 = this.previous;
|
|
312
|
+
const before = classifyCharacter(previous2);
|
|
313
|
+
let marker;
|
|
314
|
+
return start;
|
|
315
|
+
function start(code) {
|
|
316
|
+
marker = code;
|
|
317
|
+
effects.enter("attentionSequence");
|
|
318
|
+
return inside(code);
|
|
319
|
+
}
|
|
320
|
+
__name(start, "start");
|
|
321
|
+
function inside(code) {
|
|
322
|
+
if (code === marker) {
|
|
323
|
+
effects.consume(code);
|
|
324
|
+
return inside;
|
|
325
|
+
}
|
|
326
|
+
const token = effects.exit("attentionSequence");
|
|
327
|
+
const after = classifyCharacter(code);
|
|
328
|
+
const open = !after || after === 2 && before || attentionMarkers.includes(code) && code !== 42 && code !== 95;
|
|
329
|
+
const close = !before || before === 2 && after || attentionMarkers.includes(previous2) && previous2 !== 42 && previous2 !== 95;
|
|
330
|
+
token._open = Boolean(marker === 42 ? open : open && (before || !close));
|
|
331
|
+
token._close = Boolean(marker === 42 ? close : close && (after || !open));
|
|
332
|
+
return ok(code);
|
|
333
|
+
}
|
|
334
|
+
__name(inside, "inside");
|
|
335
|
+
}
|
|
336
|
+
__name(tokenizeAttention, "tokenizeAttention");
|
|
337
|
+
function movePoint(point, offset) {
|
|
338
|
+
point.column += offset;
|
|
339
|
+
point.offset += offset;
|
|
340
|
+
point._bufferIndex += offset;
|
|
341
|
+
}
|
|
342
|
+
__name(movePoint, "movePoint");
|
|
343
|
+
|
|
344
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
345
|
+
var autolink = {
|
|
346
|
+
name: "autolink",
|
|
347
|
+
tokenize: tokenizeAutolink
|
|
348
|
+
};
|
|
349
|
+
function tokenizeAutolink(effects, ok, nok) {
|
|
350
|
+
let size = 0;
|
|
351
|
+
return start;
|
|
352
|
+
function start(code) {
|
|
353
|
+
effects.enter("autolink");
|
|
354
|
+
effects.enter("autolinkMarker");
|
|
355
|
+
effects.consume(code);
|
|
356
|
+
effects.exit("autolinkMarker");
|
|
357
|
+
effects.enter("autolinkProtocol");
|
|
358
|
+
return open;
|
|
359
|
+
}
|
|
360
|
+
__name(start, "start");
|
|
361
|
+
function open(code) {
|
|
362
|
+
if (asciiAlpha(code)) {
|
|
363
|
+
effects.consume(code);
|
|
364
|
+
return schemeOrEmailAtext;
|
|
365
|
+
}
|
|
366
|
+
if (code === 64) {
|
|
367
|
+
return nok(code);
|
|
368
|
+
}
|
|
369
|
+
return emailAtext(code);
|
|
370
|
+
}
|
|
371
|
+
__name(open, "open");
|
|
372
|
+
function schemeOrEmailAtext(code) {
|
|
373
|
+
if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
|
|
374
|
+
size = 1;
|
|
375
|
+
return schemeInsideOrEmailAtext(code);
|
|
376
|
+
}
|
|
377
|
+
return emailAtext(code);
|
|
378
|
+
}
|
|
379
|
+
__name(schemeOrEmailAtext, "schemeOrEmailAtext");
|
|
380
|
+
function schemeInsideOrEmailAtext(code) {
|
|
381
|
+
if (code === 58) {
|
|
382
|
+
effects.consume(code);
|
|
383
|
+
size = 0;
|
|
384
|
+
return urlInside;
|
|
385
|
+
}
|
|
386
|
+
if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {
|
|
387
|
+
effects.consume(code);
|
|
388
|
+
return schemeInsideOrEmailAtext;
|
|
389
|
+
}
|
|
390
|
+
size = 0;
|
|
391
|
+
return emailAtext(code);
|
|
392
|
+
}
|
|
393
|
+
__name(schemeInsideOrEmailAtext, "schemeInsideOrEmailAtext");
|
|
394
|
+
function urlInside(code) {
|
|
395
|
+
if (code === 62) {
|
|
396
|
+
effects.exit("autolinkProtocol");
|
|
397
|
+
effects.enter("autolinkMarker");
|
|
398
|
+
effects.consume(code);
|
|
399
|
+
effects.exit("autolinkMarker");
|
|
400
|
+
effects.exit("autolink");
|
|
401
|
+
return ok;
|
|
402
|
+
}
|
|
403
|
+
if (code === null || code === 32 || code === 60 || asciiControl(code)) {
|
|
404
|
+
return nok(code);
|
|
405
|
+
}
|
|
406
|
+
effects.consume(code);
|
|
407
|
+
return urlInside;
|
|
408
|
+
}
|
|
409
|
+
__name(urlInside, "urlInside");
|
|
410
|
+
function emailAtext(code) {
|
|
411
|
+
if (code === 64) {
|
|
412
|
+
effects.consume(code);
|
|
413
|
+
return emailAtSignOrDot;
|
|
414
|
+
}
|
|
415
|
+
if (asciiAtext(code)) {
|
|
416
|
+
effects.consume(code);
|
|
417
|
+
return emailAtext;
|
|
418
|
+
}
|
|
419
|
+
return nok(code);
|
|
420
|
+
}
|
|
421
|
+
__name(emailAtext, "emailAtext");
|
|
422
|
+
function emailAtSignOrDot(code) {
|
|
423
|
+
return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
|
|
424
|
+
}
|
|
425
|
+
__name(emailAtSignOrDot, "emailAtSignOrDot");
|
|
426
|
+
function emailLabel(code) {
|
|
427
|
+
if (code === 46) {
|
|
428
|
+
effects.consume(code);
|
|
429
|
+
size = 0;
|
|
430
|
+
return emailAtSignOrDot;
|
|
431
|
+
}
|
|
432
|
+
if (code === 62) {
|
|
433
|
+
effects.exit("autolinkProtocol").type = "autolinkEmail";
|
|
434
|
+
effects.enter("autolinkMarker");
|
|
435
|
+
effects.consume(code);
|
|
436
|
+
effects.exit("autolinkMarker");
|
|
437
|
+
effects.exit("autolink");
|
|
438
|
+
return ok;
|
|
439
|
+
}
|
|
440
|
+
return emailValue(code);
|
|
441
|
+
}
|
|
442
|
+
__name(emailLabel, "emailLabel");
|
|
443
|
+
function emailValue(code) {
|
|
444
|
+
if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
|
|
445
|
+
const next = code === 45 ? emailValue : emailLabel;
|
|
446
|
+
effects.consume(code);
|
|
447
|
+
return next;
|
|
448
|
+
}
|
|
449
|
+
return nok(code);
|
|
450
|
+
}
|
|
451
|
+
__name(emailValue, "emailValue");
|
|
452
|
+
}
|
|
453
|
+
__name(tokenizeAutolink, "tokenizeAutolink");
|
|
454
|
+
|
|
455
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
456
|
+
var blockQuote = {
|
|
457
|
+
continuation: {
|
|
458
|
+
tokenize: tokenizeBlockQuoteContinuation
|
|
459
|
+
},
|
|
460
|
+
exit,
|
|
461
|
+
name: "blockQuote",
|
|
462
|
+
tokenize: tokenizeBlockQuoteStart
|
|
463
|
+
};
|
|
464
|
+
function tokenizeBlockQuoteStart(effects, ok, nok) {
|
|
465
|
+
const self = this;
|
|
466
|
+
return start;
|
|
467
|
+
function start(code) {
|
|
468
|
+
if (code === 62) {
|
|
469
|
+
const state = self.containerState;
|
|
470
|
+
if (!state.open) {
|
|
471
|
+
effects.enter("blockQuote", {
|
|
472
|
+
_container: true
|
|
473
|
+
});
|
|
474
|
+
state.open = true;
|
|
475
|
+
}
|
|
476
|
+
effects.enter("blockQuotePrefix");
|
|
477
|
+
effects.enter("blockQuoteMarker");
|
|
478
|
+
effects.consume(code);
|
|
479
|
+
effects.exit("blockQuoteMarker");
|
|
480
|
+
return after;
|
|
481
|
+
}
|
|
482
|
+
return nok(code);
|
|
483
|
+
}
|
|
484
|
+
__name(start, "start");
|
|
485
|
+
function after(code) {
|
|
486
|
+
if (markdownSpace(code)) {
|
|
487
|
+
effects.enter("blockQuotePrefixWhitespace");
|
|
488
|
+
effects.consume(code);
|
|
489
|
+
effects.exit("blockQuotePrefixWhitespace");
|
|
490
|
+
effects.exit("blockQuotePrefix");
|
|
491
|
+
return ok;
|
|
492
|
+
}
|
|
493
|
+
effects.exit("blockQuotePrefix");
|
|
494
|
+
return ok(code);
|
|
495
|
+
}
|
|
496
|
+
__name(after, "after");
|
|
497
|
+
}
|
|
498
|
+
__name(tokenizeBlockQuoteStart, "tokenizeBlockQuoteStart");
|
|
499
|
+
function tokenizeBlockQuoteContinuation(effects, ok, nok) {
|
|
500
|
+
const self = this;
|
|
501
|
+
return contStart;
|
|
502
|
+
function contStart(code) {
|
|
503
|
+
if (markdownSpace(code)) {
|
|
504
|
+
return factorySpace(effects, contBefore, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
|
|
505
|
+
}
|
|
506
|
+
return contBefore(code);
|
|
507
|
+
}
|
|
508
|
+
__name(contStart, "contStart");
|
|
509
|
+
function contBefore(code) {
|
|
510
|
+
return effects.attempt(blockQuote, ok, nok)(code);
|
|
511
|
+
}
|
|
512
|
+
__name(contBefore, "contBefore");
|
|
513
|
+
}
|
|
514
|
+
__name(tokenizeBlockQuoteContinuation, "tokenizeBlockQuoteContinuation");
|
|
515
|
+
function exit(effects) {
|
|
516
|
+
effects.exit("blockQuote");
|
|
517
|
+
}
|
|
518
|
+
__name(exit, "exit");
|
|
519
|
+
|
|
520
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
521
|
+
var characterEscape = {
|
|
522
|
+
name: "characterEscape",
|
|
523
|
+
tokenize: tokenizeCharacterEscape
|
|
524
|
+
};
|
|
525
|
+
function tokenizeCharacterEscape(effects, ok, nok) {
|
|
526
|
+
return start;
|
|
527
|
+
function start(code) {
|
|
528
|
+
effects.enter("characterEscape");
|
|
529
|
+
effects.enter("escapeMarker");
|
|
530
|
+
effects.consume(code);
|
|
531
|
+
effects.exit("escapeMarker");
|
|
532
|
+
return inside;
|
|
533
|
+
}
|
|
534
|
+
__name(start, "start");
|
|
535
|
+
function inside(code) {
|
|
536
|
+
if (asciiPunctuation(code)) {
|
|
537
|
+
effects.enter("characterEscapeValue");
|
|
538
|
+
effects.consume(code);
|
|
539
|
+
effects.exit("characterEscapeValue");
|
|
540
|
+
effects.exit("characterEscape");
|
|
541
|
+
return ok;
|
|
542
|
+
}
|
|
543
|
+
return nok(code);
|
|
544
|
+
}
|
|
545
|
+
__name(inside, "inside");
|
|
546
|
+
}
|
|
547
|
+
__name(tokenizeCharacterEscape, "tokenizeCharacterEscape");
|
|
548
|
+
|
|
549
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
550
|
+
var characterReference = {
|
|
551
|
+
name: "characterReference",
|
|
552
|
+
tokenize: tokenizeCharacterReference
|
|
553
|
+
};
|
|
554
|
+
function tokenizeCharacterReference(effects, ok, nok) {
|
|
555
|
+
const self = this;
|
|
556
|
+
let size = 0;
|
|
557
|
+
let max;
|
|
558
|
+
let test;
|
|
559
|
+
return start;
|
|
560
|
+
function start(code) {
|
|
561
|
+
effects.enter("characterReference");
|
|
562
|
+
effects.enter("characterReferenceMarker");
|
|
563
|
+
effects.consume(code);
|
|
564
|
+
effects.exit("characterReferenceMarker");
|
|
565
|
+
return open;
|
|
566
|
+
}
|
|
567
|
+
__name(start, "start");
|
|
568
|
+
function open(code) {
|
|
569
|
+
if (code === 35) {
|
|
570
|
+
effects.enter("characterReferenceMarkerNumeric");
|
|
571
|
+
effects.consume(code);
|
|
572
|
+
effects.exit("characterReferenceMarkerNumeric");
|
|
573
|
+
return numeric;
|
|
574
|
+
}
|
|
575
|
+
effects.enter("characterReferenceValue");
|
|
576
|
+
max = 31;
|
|
577
|
+
test = asciiAlphanumeric;
|
|
578
|
+
return value(code);
|
|
579
|
+
}
|
|
580
|
+
__name(open, "open");
|
|
581
|
+
function numeric(code) {
|
|
582
|
+
if (code === 88 || code === 120) {
|
|
583
|
+
effects.enter("characterReferenceMarkerHexadecimal");
|
|
584
|
+
effects.consume(code);
|
|
585
|
+
effects.exit("characterReferenceMarkerHexadecimal");
|
|
586
|
+
effects.enter("characterReferenceValue");
|
|
587
|
+
max = 6;
|
|
588
|
+
test = asciiHexDigit;
|
|
589
|
+
return value;
|
|
590
|
+
}
|
|
591
|
+
effects.enter("characterReferenceValue");
|
|
592
|
+
max = 7;
|
|
593
|
+
test = asciiDigit;
|
|
594
|
+
return value(code);
|
|
595
|
+
}
|
|
596
|
+
__name(numeric, "numeric");
|
|
597
|
+
function value(code) {
|
|
598
|
+
if (code === 59 && size) {
|
|
599
|
+
const token = effects.exit("characterReferenceValue");
|
|
600
|
+
if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {
|
|
601
|
+
return nok(code);
|
|
602
|
+
}
|
|
603
|
+
effects.enter("characterReferenceMarker");
|
|
604
|
+
effects.consume(code);
|
|
605
|
+
effects.exit("characterReferenceMarker");
|
|
606
|
+
effects.exit("characterReference");
|
|
607
|
+
return ok;
|
|
608
|
+
}
|
|
609
|
+
if (test(code) && size++ < max) {
|
|
610
|
+
effects.consume(code);
|
|
611
|
+
return value;
|
|
612
|
+
}
|
|
613
|
+
return nok(code);
|
|
614
|
+
}
|
|
615
|
+
__name(value, "value");
|
|
616
|
+
}
|
|
617
|
+
__name(tokenizeCharacterReference, "tokenizeCharacterReference");
|
|
618
|
+
|
|
619
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js
|
|
620
|
+
var nonLazyContinuation = {
|
|
621
|
+
partial: true,
|
|
622
|
+
tokenize: tokenizeNonLazyContinuation
|
|
623
|
+
};
|
|
624
|
+
function tokenizeNonLazyContinuation(effects, ok, nok) {
|
|
625
|
+
const self = this;
|
|
626
|
+
return start;
|
|
627
|
+
function start(code) {
|
|
628
|
+
if (code === null) {
|
|
629
|
+
return nok(code);
|
|
630
|
+
}
|
|
631
|
+
effects.enter("lineEnding");
|
|
632
|
+
effects.consume(code);
|
|
633
|
+
effects.exit("lineEnding");
|
|
634
|
+
return after;
|
|
635
|
+
}
|
|
636
|
+
__name(start, "start");
|
|
637
|
+
function after(code) {
|
|
638
|
+
return self.parser.lazy[self.now().line] ? nok(code) : ok(code);
|
|
639
|
+
}
|
|
640
|
+
__name(after, "after");
|
|
641
|
+
}
|
|
642
|
+
__name(tokenizeNonLazyContinuation, "tokenizeNonLazyContinuation");
|
|
643
|
+
|
|
644
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/code-fenced.js
|
|
645
|
+
var codeFenced = {
|
|
646
|
+
concrete: true,
|
|
647
|
+
name: "codeFenced",
|
|
648
|
+
tokenize: tokenizeCodeFenced
|
|
649
|
+
};
|
|
650
|
+
function tokenizeCodeFenced(effects, ok, nok) {
|
|
651
|
+
const self = this;
|
|
652
|
+
const closeStart = {
|
|
653
|
+
partial: true,
|
|
654
|
+
tokenize: tokenizeCloseStart
|
|
655
|
+
};
|
|
656
|
+
let initialPrefix = 0;
|
|
657
|
+
let sizeOpen = 0;
|
|
658
|
+
let marker;
|
|
659
|
+
return start;
|
|
660
|
+
function start(code) {
|
|
661
|
+
return beforeSequenceOpen(code);
|
|
662
|
+
}
|
|
663
|
+
__name(start, "start");
|
|
664
|
+
function beforeSequenceOpen(code) {
|
|
665
|
+
const tail = self.events[self.events.length - 1];
|
|
666
|
+
initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
|
|
667
|
+
marker = code;
|
|
668
|
+
effects.enter("codeFenced");
|
|
669
|
+
effects.enter("codeFencedFence");
|
|
670
|
+
effects.enter("codeFencedFenceSequence");
|
|
671
|
+
return sequenceOpen(code);
|
|
672
|
+
}
|
|
673
|
+
__name(beforeSequenceOpen, "beforeSequenceOpen");
|
|
674
|
+
function sequenceOpen(code) {
|
|
675
|
+
if (code === marker) {
|
|
676
|
+
sizeOpen++;
|
|
677
|
+
effects.consume(code);
|
|
678
|
+
return sequenceOpen;
|
|
679
|
+
}
|
|
680
|
+
if (sizeOpen < 3) {
|
|
681
|
+
return nok(code);
|
|
682
|
+
}
|
|
683
|
+
effects.exit("codeFencedFenceSequence");
|
|
684
|
+
return markdownSpace(code) ? factorySpace(effects, infoBefore, "whitespace")(code) : infoBefore(code);
|
|
685
|
+
}
|
|
686
|
+
__name(sequenceOpen, "sequenceOpen");
|
|
687
|
+
function infoBefore(code) {
|
|
688
|
+
if (code === null || markdownLineEnding(code)) {
|
|
689
|
+
effects.exit("codeFencedFence");
|
|
690
|
+
return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
|
|
691
|
+
}
|
|
692
|
+
effects.enter("codeFencedFenceInfo");
|
|
693
|
+
effects.enter("chunkString", {
|
|
694
|
+
contentType: "string"
|
|
695
|
+
});
|
|
696
|
+
return info(code);
|
|
697
|
+
}
|
|
698
|
+
__name(infoBefore, "infoBefore");
|
|
699
|
+
function info(code) {
|
|
700
|
+
if (code === null || markdownLineEnding(code)) {
|
|
701
|
+
effects.exit("chunkString");
|
|
702
|
+
effects.exit("codeFencedFenceInfo");
|
|
703
|
+
return infoBefore(code);
|
|
704
|
+
}
|
|
705
|
+
if (markdownSpace(code)) {
|
|
706
|
+
effects.exit("chunkString");
|
|
707
|
+
effects.exit("codeFencedFenceInfo");
|
|
708
|
+
return factorySpace(effects, metaBefore, "whitespace")(code);
|
|
709
|
+
}
|
|
710
|
+
if (code === 96 && code === marker) {
|
|
711
|
+
return nok(code);
|
|
712
|
+
}
|
|
713
|
+
effects.consume(code);
|
|
714
|
+
return info;
|
|
715
|
+
}
|
|
716
|
+
__name(info, "info");
|
|
717
|
+
function metaBefore(code) {
|
|
718
|
+
if (code === null || markdownLineEnding(code)) {
|
|
719
|
+
return infoBefore(code);
|
|
720
|
+
}
|
|
721
|
+
effects.enter("codeFencedFenceMeta");
|
|
722
|
+
effects.enter("chunkString", {
|
|
723
|
+
contentType: "string"
|
|
724
|
+
});
|
|
725
|
+
return meta(code);
|
|
726
|
+
}
|
|
727
|
+
__name(metaBefore, "metaBefore");
|
|
728
|
+
function meta(code) {
|
|
729
|
+
if (code === null || markdownLineEnding(code)) {
|
|
730
|
+
effects.exit("chunkString");
|
|
731
|
+
effects.exit("codeFencedFenceMeta");
|
|
732
|
+
return infoBefore(code);
|
|
733
|
+
}
|
|
734
|
+
if (code === 96 && code === marker) {
|
|
735
|
+
return nok(code);
|
|
736
|
+
}
|
|
737
|
+
effects.consume(code);
|
|
738
|
+
return meta;
|
|
739
|
+
}
|
|
740
|
+
__name(meta, "meta");
|
|
741
|
+
function atNonLazyBreak(code) {
|
|
742
|
+
return effects.attempt(closeStart, after, contentBefore)(code);
|
|
743
|
+
}
|
|
744
|
+
__name(atNonLazyBreak, "atNonLazyBreak");
|
|
745
|
+
function contentBefore(code) {
|
|
746
|
+
effects.enter("lineEnding");
|
|
747
|
+
effects.consume(code);
|
|
748
|
+
effects.exit("lineEnding");
|
|
749
|
+
return contentStart;
|
|
750
|
+
}
|
|
751
|
+
__name(contentBefore, "contentBefore");
|
|
752
|
+
function contentStart(code) {
|
|
753
|
+
return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, "linePrefix", initialPrefix + 1)(code) : beforeContentChunk(code);
|
|
754
|
+
}
|
|
755
|
+
__name(contentStart, "contentStart");
|
|
756
|
+
function beforeContentChunk(code) {
|
|
757
|
+
if (code === null || markdownLineEnding(code)) {
|
|
758
|
+
return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
|
|
759
|
+
}
|
|
760
|
+
effects.enter("codeFlowValue");
|
|
761
|
+
return contentChunk(code);
|
|
762
|
+
}
|
|
763
|
+
__name(beforeContentChunk, "beforeContentChunk");
|
|
764
|
+
function contentChunk(code) {
|
|
765
|
+
if (code === null || markdownLineEnding(code)) {
|
|
766
|
+
effects.exit("codeFlowValue");
|
|
767
|
+
return beforeContentChunk(code);
|
|
768
|
+
}
|
|
769
|
+
effects.consume(code);
|
|
770
|
+
return contentChunk;
|
|
771
|
+
}
|
|
772
|
+
__name(contentChunk, "contentChunk");
|
|
773
|
+
function after(code) {
|
|
774
|
+
effects.exit("codeFenced");
|
|
775
|
+
return ok(code);
|
|
776
|
+
}
|
|
777
|
+
__name(after, "after");
|
|
778
|
+
function tokenizeCloseStart(effects2, ok2, nok2) {
|
|
779
|
+
let size = 0;
|
|
780
|
+
return startBefore;
|
|
781
|
+
function startBefore(code) {
|
|
782
|
+
effects2.enter("lineEnding");
|
|
783
|
+
effects2.consume(code);
|
|
784
|
+
effects2.exit("lineEnding");
|
|
785
|
+
return start2;
|
|
786
|
+
}
|
|
787
|
+
__name(startBefore, "startBefore");
|
|
788
|
+
function start2(code) {
|
|
789
|
+
effects2.enter("codeFencedFence");
|
|
790
|
+
return markdownSpace(code) ? factorySpace(effects2, beforeSequenceClose, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code) : beforeSequenceClose(code);
|
|
791
|
+
}
|
|
792
|
+
__name(start2, "start");
|
|
793
|
+
function beforeSequenceClose(code) {
|
|
794
|
+
if (code === marker) {
|
|
795
|
+
effects2.enter("codeFencedFenceSequence");
|
|
796
|
+
return sequenceClose(code);
|
|
797
|
+
}
|
|
798
|
+
return nok2(code);
|
|
799
|
+
}
|
|
800
|
+
__name(beforeSequenceClose, "beforeSequenceClose");
|
|
801
|
+
function sequenceClose(code) {
|
|
802
|
+
if (code === marker) {
|
|
803
|
+
size++;
|
|
804
|
+
effects2.consume(code);
|
|
805
|
+
return sequenceClose;
|
|
806
|
+
}
|
|
807
|
+
if (size >= sizeOpen) {
|
|
808
|
+
effects2.exit("codeFencedFenceSequence");
|
|
809
|
+
return markdownSpace(code) ? factorySpace(effects2, sequenceCloseAfter, "whitespace")(code) : sequenceCloseAfter(code);
|
|
810
|
+
}
|
|
811
|
+
return nok2(code);
|
|
812
|
+
}
|
|
813
|
+
__name(sequenceClose, "sequenceClose");
|
|
814
|
+
function sequenceCloseAfter(code) {
|
|
815
|
+
if (code === null || markdownLineEnding(code)) {
|
|
816
|
+
effects2.exit("codeFencedFence");
|
|
817
|
+
return ok2(code);
|
|
818
|
+
}
|
|
819
|
+
return nok2(code);
|
|
820
|
+
}
|
|
821
|
+
__name(sequenceCloseAfter, "sequenceCloseAfter");
|
|
822
|
+
}
|
|
823
|
+
__name(tokenizeCloseStart, "tokenizeCloseStart");
|
|
824
|
+
}
|
|
825
|
+
__name(tokenizeCodeFenced, "tokenizeCodeFenced");
|
|
826
|
+
|
|
827
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/code-indented.js
|
|
828
|
+
var codeIndented = {
|
|
829
|
+
name: "codeIndented",
|
|
830
|
+
tokenize: tokenizeCodeIndented
|
|
831
|
+
};
|
|
832
|
+
var furtherStart = {
|
|
833
|
+
partial: true,
|
|
834
|
+
tokenize: tokenizeFurtherStart
|
|
835
|
+
};
|
|
836
|
+
function tokenizeCodeIndented(effects, ok, nok) {
|
|
837
|
+
return start;
|
|
838
|
+
function start(code) {
|
|
839
|
+
effects.enter("codeIndented");
|
|
840
|
+
return factorySpaceMinMax(effects, atBreak, nok, "linePrefix", 4, 4)(code);
|
|
841
|
+
}
|
|
842
|
+
__name(start, "start");
|
|
843
|
+
function atBreak(code) {
|
|
844
|
+
if (code === null) {
|
|
845
|
+
return after(code);
|
|
846
|
+
}
|
|
847
|
+
if (markdownLineEnding(code)) {
|
|
848
|
+
return effects.attempt(furtherStart, atBreak, after)(code);
|
|
849
|
+
}
|
|
850
|
+
effects.enter("codeFlowValue");
|
|
851
|
+
return inside(code);
|
|
852
|
+
}
|
|
853
|
+
__name(atBreak, "atBreak");
|
|
854
|
+
function inside(code) {
|
|
855
|
+
if (code === null || markdownLineEnding(code)) {
|
|
856
|
+
effects.exit("codeFlowValue");
|
|
857
|
+
return atBreak(code);
|
|
858
|
+
}
|
|
859
|
+
effects.consume(code);
|
|
860
|
+
return inside;
|
|
861
|
+
}
|
|
862
|
+
__name(inside, "inside");
|
|
863
|
+
function after(code) {
|
|
864
|
+
effects.exit("codeIndented");
|
|
865
|
+
return ok(code);
|
|
866
|
+
}
|
|
867
|
+
__name(after, "after");
|
|
868
|
+
}
|
|
869
|
+
__name(tokenizeCodeIndented, "tokenizeCodeIndented");
|
|
870
|
+
function tokenizeFurtherStart(effects, ok, nok) {
|
|
871
|
+
const self = this;
|
|
872
|
+
return furtherStart2;
|
|
873
|
+
function furtherStart2(code) {
|
|
874
|
+
if (self.parser.lazy[self.now().line]) {
|
|
875
|
+
return nok(code);
|
|
876
|
+
}
|
|
877
|
+
if (markdownLineEnding(code)) {
|
|
878
|
+
effects.enter("lineEnding");
|
|
879
|
+
effects.consume(code);
|
|
880
|
+
effects.exit("lineEnding");
|
|
881
|
+
return furtherStart2;
|
|
882
|
+
}
|
|
883
|
+
return factorySpaceMinMax(effects, ok, onNotEnoughPrefix, "linePrefix", 4, 4)(code);
|
|
884
|
+
}
|
|
885
|
+
__name(furtherStart2, "furtherStart");
|
|
886
|
+
function onNotEnoughPrefix(code) {
|
|
887
|
+
return markdownLineEnding(code) ? furtherStart2(code) : nok(code);
|
|
888
|
+
}
|
|
889
|
+
__name(onNotEnoughPrefix, "onNotEnoughPrefix");
|
|
890
|
+
}
|
|
891
|
+
__name(tokenizeFurtherStart, "tokenizeFurtherStart");
|
|
892
|
+
|
|
893
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/code-text.js
|
|
894
|
+
var codeText = {
|
|
895
|
+
name: "codeText",
|
|
896
|
+
previous,
|
|
897
|
+
resolve: resolveCodeText,
|
|
898
|
+
tokenize: tokenizeCodeText
|
|
899
|
+
};
|
|
900
|
+
function resolveCodeText(events) {
|
|
901
|
+
let tailExitIndex = events.length - 4;
|
|
902
|
+
let headEnterIndex = 3;
|
|
903
|
+
let index;
|
|
904
|
+
let enter;
|
|
905
|
+
if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) {
|
|
906
|
+
index = headEnterIndex;
|
|
907
|
+
while (++index < tailExitIndex) {
|
|
908
|
+
if (events[index][1].type === "codeTextData") {
|
|
909
|
+
events[headEnterIndex][1].type = "codeTextPadding";
|
|
910
|
+
events[tailExitIndex][1].type = "codeTextPadding";
|
|
911
|
+
headEnterIndex += 2;
|
|
912
|
+
tailExitIndex -= 2;
|
|
913
|
+
break;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
index = headEnterIndex - 1;
|
|
918
|
+
tailExitIndex++;
|
|
919
|
+
while (++index <= tailExitIndex) {
|
|
920
|
+
if (enter === void 0) {
|
|
921
|
+
if (index !== tailExitIndex && events[index][1].type !== "lineEnding") {
|
|
922
|
+
enter = index;
|
|
923
|
+
}
|
|
924
|
+
} else if (index === tailExitIndex || events[index][1].type === "lineEnding") {
|
|
925
|
+
events[enter][1].type = "codeTextData";
|
|
926
|
+
if (index !== enter + 2) {
|
|
927
|
+
events[enter][1].end = events[index - 1][1].end;
|
|
928
|
+
events.splice(enter + 2, index - enter - 2);
|
|
929
|
+
tailExitIndex -= index - enter - 2;
|
|
930
|
+
index = enter + 2;
|
|
931
|
+
}
|
|
932
|
+
enter = void 0;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
return events;
|
|
936
|
+
}
|
|
937
|
+
__name(resolveCodeText, "resolveCodeText");
|
|
938
|
+
function previous(code) {
|
|
939
|
+
return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
940
|
+
}
|
|
941
|
+
__name(previous, "previous");
|
|
942
|
+
function tokenizeCodeText(effects, ok, nok) {
|
|
943
|
+
const self = this;
|
|
944
|
+
let sizeOpen = 0;
|
|
945
|
+
let size;
|
|
946
|
+
let token;
|
|
947
|
+
return start;
|
|
948
|
+
function start(code) {
|
|
949
|
+
effects.enter("codeText");
|
|
950
|
+
effects.enter("codeTextSequence");
|
|
951
|
+
return sequenceOpen(code);
|
|
952
|
+
}
|
|
953
|
+
__name(start, "start");
|
|
954
|
+
function sequenceOpen(code) {
|
|
955
|
+
if (code === 96) {
|
|
956
|
+
effects.consume(code);
|
|
957
|
+
sizeOpen++;
|
|
958
|
+
return sequenceOpen;
|
|
959
|
+
}
|
|
960
|
+
effects.exit("codeTextSequence");
|
|
961
|
+
return between(code);
|
|
962
|
+
}
|
|
963
|
+
__name(sequenceOpen, "sequenceOpen");
|
|
964
|
+
function between(code) {
|
|
965
|
+
if (code === null) {
|
|
966
|
+
return nok(code);
|
|
967
|
+
}
|
|
968
|
+
if (code === 32) {
|
|
969
|
+
effects.enter("space");
|
|
970
|
+
effects.consume(code);
|
|
971
|
+
effects.exit("space");
|
|
972
|
+
return between;
|
|
973
|
+
}
|
|
974
|
+
if (code === 96) {
|
|
975
|
+
token = effects.enter("codeTextSequence");
|
|
976
|
+
size = 0;
|
|
977
|
+
return sequenceClose(code);
|
|
978
|
+
}
|
|
979
|
+
if (markdownLineEnding(code)) {
|
|
980
|
+
effects.enter("lineEnding");
|
|
981
|
+
effects.consume(code);
|
|
982
|
+
effects.exit("lineEnding");
|
|
983
|
+
return between;
|
|
984
|
+
}
|
|
985
|
+
effects.enter("codeTextData");
|
|
986
|
+
return data(code);
|
|
987
|
+
}
|
|
988
|
+
__name(between, "between");
|
|
989
|
+
function data(code) {
|
|
990
|
+
if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {
|
|
991
|
+
effects.exit("codeTextData");
|
|
992
|
+
return between(code);
|
|
993
|
+
}
|
|
994
|
+
effects.consume(code);
|
|
995
|
+
return data;
|
|
996
|
+
}
|
|
997
|
+
__name(data, "data");
|
|
998
|
+
function sequenceClose(code) {
|
|
999
|
+
if (code === 96) {
|
|
1000
|
+
effects.consume(code);
|
|
1001
|
+
size++;
|
|
1002
|
+
return sequenceClose;
|
|
1003
|
+
}
|
|
1004
|
+
if (size === sizeOpen) {
|
|
1005
|
+
effects.exit("codeTextSequence");
|
|
1006
|
+
effects.exit("codeText");
|
|
1007
|
+
return ok(code);
|
|
1008
|
+
}
|
|
1009
|
+
token.type = "codeTextData";
|
|
1010
|
+
return data(code);
|
|
1011
|
+
}
|
|
1012
|
+
__name(sequenceClose, "sequenceClose");
|
|
1013
|
+
}
|
|
1014
|
+
__name(tokenizeCodeText, "tokenizeCodeText");
|
|
1015
|
+
|
|
1016
|
+
// node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.js
|
|
1017
|
+
var SpliceBuffer = class {
|
|
1018
|
+
static {
|
|
1019
|
+
__name(this, "SpliceBuffer");
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
1023
|
+
* Initial items (optional).
|
|
1024
|
+
* @returns
|
|
1025
|
+
* Splice buffer.
|
|
1026
|
+
*/
|
|
1027
|
+
constructor(initial) {
|
|
1028
|
+
this.left = initial ? [...initial] : [];
|
|
1029
|
+
this.right = [];
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Array access;
|
|
1033
|
+
* does not move the cursor.
|
|
1034
|
+
*
|
|
1035
|
+
* @param {number} index
|
|
1036
|
+
* Index.
|
|
1037
|
+
* @return {T}
|
|
1038
|
+
* Item.
|
|
1039
|
+
*/
|
|
1040
|
+
get(index) {
|
|
1041
|
+
if (index < 0 || index >= this.left.length + this.right.length) {
|
|
1042
|
+
throw new RangeError("Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
|
|
1043
|
+
}
|
|
1044
|
+
if (index < this.left.length) return this.left[index];
|
|
1045
|
+
return this.right[this.right.length - index + this.left.length - 1];
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* The length of the splice buffer, one greater than the largest index in the
|
|
1049
|
+
* array.
|
|
1050
|
+
*/
|
|
1051
|
+
get length() {
|
|
1052
|
+
return this.left.length + this.right.length;
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Remove and return `list[0]`;
|
|
1056
|
+
* moves the cursor to `0`.
|
|
1057
|
+
*
|
|
1058
|
+
* @returns {T | undefined}
|
|
1059
|
+
* Item, optional.
|
|
1060
|
+
*/
|
|
1061
|
+
shift() {
|
|
1062
|
+
this.setCursor(0);
|
|
1063
|
+
return this.right.pop();
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Slice the buffer to get an array;
|
|
1067
|
+
* does not move the cursor.
|
|
1068
|
+
*
|
|
1069
|
+
* @param {number} start
|
|
1070
|
+
* Start.
|
|
1071
|
+
* @param {number | null | undefined} [end]
|
|
1072
|
+
* End (optional).
|
|
1073
|
+
* @returns {Array<T>}
|
|
1074
|
+
* Array of items.
|
|
1075
|
+
*/
|
|
1076
|
+
slice(start, end) {
|
|
1077
|
+
const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
|
|
1078
|
+
if (stop < this.left.length) {
|
|
1079
|
+
return this.left.slice(start, stop);
|
|
1080
|
+
}
|
|
1081
|
+
if (start > this.left.length) {
|
|
1082
|
+
return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();
|
|
1083
|
+
}
|
|
1084
|
+
return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Mimics the behavior of Array.prototype.splice() except for the change of
|
|
1088
|
+
* interface necessary to avoid segfaults when patching in very large arrays.
|
|
1089
|
+
*
|
|
1090
|
+
* This operation moves cursor is moved to `start` and results in the cursor
|
|
1091
|
+
* placed after any inserted items.
|
|
1092
|
+
*
|
|
1093
|
+
* @param {number} start
|
|
1094
|
+
* Start;
|
|
1095
|
+
* zero-based index at which to start changing the array;
|
|
1096
|
+
* negative numbers count backwards from the end of the array and values
|
|
1097
|
+
* that are out-of bounds are clamped to the appropriate end of the array.
|
|
1098
|
+
* @param {number | null | undefined} [deleteCount=0]
|
|
1099
|
+
* Delete count (default: `0`);
|
|
1100
|
+
* maximum number of elements to delete, starting from start.
|
|
1101
|
+
* @param {Array<T> | null | undefined} [items=[]]
|
|
1102
|
+
* Items to include in place of the deleted items (default: `[]`).
|
|
1103
|
+
* @return {Array<T>}
|
|
1104
|
+
* Any removed items.
|
|
1105
|
+
*/
|
|
1106
|
+
splice(start, deleteCount, items) {
|
|
1107
|
+
const count = deleteCount || 0;
|
|
1108
|
+
this.setCursor(Math.trunc(start));
|
|
1109
|
+
const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
|
|
1110
|
+
if (items) chunkedPush(this.left, items);
|
|
1111
|
+
return removed.reverse();
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Remove and return the highest-numbered item in the array, so
|
|
1115
|
+
* `list[list.length - 1]`;
|
|
1116
|
+
* Moves the cursor to `length`.
|
|
1117
|
+
*
|
|
1118
|
+
* @returns {T | undefined}
|
|
1119
|
+
* Item, optional.
|
|
1120
|
+
*/
|
|
1121
|
+
pop() {
|
|
1122
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
1123
|
+
return this.left.pop();
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Inserts a single item to the high-numbered side of the array;
|
|
1127
|
+
* moves the cursor to `length`.
|
|
1128
|
+
*
|
|
1129
|
+
* @param {T} item
|
|
1130
|
+
* Item.
|
|
1131
|
+
* @returns {undefined}
|
|
1132
|
+
* Nothing.
|
|
1133
|
+
*/
|
|
1134
|
+
push(item) {
|
|
1135
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
1136
|
+
this.left.push(item);
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Inserts many items to the high-numbered side of the array.
|
|
1140
|
+
* Moves the cursor to `length`.
|
|
1141
|
+
*
|
|
1142
|
+
* @param {Array<T>} items
|
|
1143
|
+
* Items.
|
|
1144
|
+
* @returns {undefined}
|
|
1145
|
+
* Nothing.
|
|
1146
|
+
*/
|
|
1147
|
+
pushMany(items) {
|
|
1148
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
1149
|
+
chunkedPush(this.left, items);
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Inserts a single item to the low-numbered side of the array;
|
|
1153
|
+
* Moves the cursor to `0`.
|
|
1154
|
+
*
|
|
1155
|
+
* @param {T} item
|
|
1156
|
+
* Item.
|
|
1157
|
+
* @returns {undefined}
|
|
1158
|
+
* Nothing.
|
|
1159
|
+
*/
|
|
1160
|
+
unshift(item) {
|
|
1161
|
+
this.setCursor(0);
|
|
1162
|
+
this.right.push(item);
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Inserts many items to the low-numbered side of the array;
|
|
1166
|
+
* moves the cursor to `0`.
|
|
1167
|
+
*
|
|
1168
|
+
* @param {Array<T>} items
|
|
1169
|
+
* Items.
|
|
1170
|
+
* @returns {undefined}
|
|
1171
|
+
* Nothing.
|
|
1172
|
+
*/
|
|
1173
|
+
unshiftMany(items) {
|
|
1174
|
+
this.setCursor(0);
|
|
1175
|
+
chunkedPush(this.right, items.reverse());
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Move the cursor to a specific position in the array. Requires
|
|
1179
|
+
* time proportional to the distance moved.
|
|
1180
|
+
*
|
|
1181
|
+
* If `n < 0`, the cursor will end up at the beginning.
|
|
1182
|
+
* If `n > length`, the cursor will end up at the end.
|
|
1183
|
+
*
|
|
1184
|
+
* @param {number} n
|
|
1185
|
+
* Position.
|
|
1186
|
+
* @return {undefined}
|
|
1187
|
+
* Nothing.
|
|
1188
|
+
*/
|
|
1189
|
+
setCursor(n) {
|
|
1190
|
+
if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;
|
|
1191
|
+
if (n < this.left.length) {
|
|
1192
|
+
const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
|
|
1193
|
+
chunkedPush(this.right, removed.reverse());
|
|
1194
|
+
} else {
|
|
1195
|
+
const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);
|
|
1196
|
+
chunkedPush(this.left, removed.reverse());
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
function chunkedPush(list2, right) {
|
|
1201
|
+
let chunkStart = 0;
|
|
1202
|
+
if (right.length < 1e4) {
|
|
1203
|
+
list2.push(...right);
|
|
1204
|
+
} else {
|
|
1205
|
+
while (chunkStart < right.length) {
|
|
1206
|
+
list2.push(...right.slice(chunkStart, chunkStart + 1e4));
|
|
1207
|
+
chunkStart += 1e4;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
__name(chunkedPush, "chunkedPush");
|
|
1212
|
+
|
|
1213
|
+
// node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.js
|
|
1214
|
+
function subtokenize(eventsArray) {
|
|
1215
|
+
const jumps = {};
|
|
1216
|
+
let index = -1;
|
|
1217
|
+
let event;
|
|
1218
|
+
let lineIndex;
|
|
1219
|
+
let otherIndex;
|
|
1220
|
+
let otherEvent;
|
|
1221
|
+
let parameters;
|
|
1222
|
+
let subevents;
|
|
1223
|
+
let more;
|
|
1224
|
+
const events = new SpliceBuffer(eventsArray);
|
|
1225
|
+
while (++index < events.length) {
|
|
1226
|
+
while (index in jumps) {
|
|
1227
|
+
index = jumps[index];
|
|
1228
|
+
}
|
|
1229
|
+
event = events.get(index);
|
|
1230
|
+
if (index && event[1].type === "chunkFlow" && events.get(index - 1)[1].type === "listItemPrefix") {
|
|
1231
|
+
subevents = event[1]._tokenizer.events;
|
|
1232
|
+
otherIndex = 0;
|
|
1233
|
+
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") {
|
|
1234
|
+
otherIndex += 2;
|
|
1235
|
+
}
|
|
1236
|
+
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") {
|
|
1237
|
+
while (++otherIndex < subevents.length) {
|
|
1238
|
+
if (subevents[otherIndex][1].type === "content") {
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
if (subevents[otherIndex][1].type === "chunkText") {
|
|
1242
|
+
subevents[otherIndex][1]._isInFirstContentOfListItem = true;
|
|
1243
|
+
otherIndex++;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
if (event[0] === "enter") {
|
|
1249
|
+
if (event[1].contentType) {
|
|
1250
|
+
Object.assign(jumps, subcontent(events, index));
|
|
1251
|
+
index = jumps[index];
|
|
1252
|
+
more = true;
|
|
1253
|
+
}
|
|
1254
|
+
} else if (event[1]._container) {
|
|
1255
|
+
otherIndex = index;
|
|
1256
|
+
lineIndex = void 0;
|
|
1257
|
+
while (otherIndex--) {
|
|
1258
|
+
otherEvent = events.get(otherIndex);
|
|
1259
|
+
if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
|
|
1260
|
+
if (otherEvent[0] === "enter") {
|
|
1261
|
+
if (lineIndex) {
|
|
1262
|
+
events.get(lineIndex)[1].type = "lineEndingBlank";
|
|
1263
|
+
}
|
|
1264
|
+
otherEvent[1].type = "lineEnding";
|
|
1265
|
+
lineIndex = otherIndex;
|
|
1266
|
+
}
|
|
1267
|
+
} else if (otherEvent[1].type === "linePrefix" || otherEvent[1].type === "listItemIndent") {
|
|
1268
|
+
} else {
|
|
1269
|
+
break;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
if (lineIndex) {
|
|
1273
|
+
event[1].end = {
|
|
1274
|
+
...events.get(lineIndex)[1].start
|
|
1275
|
+
};
|
|
1276
|
+
parameters = events.slice(lineIndex, index);
|
|
1277
|
+
parameters.unshift(event);
|
|
1278
|
+
events.splice(lineIndex, index - lineIndex + 1, parameters);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));
|
|
1283
|
+
return !more;
|
|
1284
|
+
}
|
|
1285
|
+
__name(subtokenize, "subtokenize");
|
|
1286
|
+
function subcontent(events, eventIndex) {
|
|
1287
|
+
const token = events.get(eventIndex)[1];
|
|
1288
|
+
const context = events.get(eventIndex)[2];
|
|
1289
|
+
let startPosition = eventIndex - 1;
|
|
1290
|
+
const startPositions = [];
|
|
1291
|
+
let tokenizer = token._tokenizer;
|
|
1292
|
+
if (!tokenizer) {
|
|
1293
|
+
tokenizer = context.parser[token.contentType](token.start);
|
|
1294
|
+
if (token._contentTypeTextTrailing) {
|
|
1295
|
+
tokenizer._contentTypeTextTrailing = true;
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
const childEvents = tokenizer.events;
|
|
1299
|
+
const jumps = [];
|
|
1300
|
+
const gaps = {};
|
|
1301
|
+
let stream;
|
|
1302
|
+
let previous2;
|
|
1303
|
+
let index = -1;
|
|
1304
|
+
let current = token;
|
|
1305
|
+
let adjust = 0;
|
|
1306
|
+
let start = 0;
|
|
1307
|
+
const breaks = [start];
|
|
1308
|
+
while (current) {
|
|
1309
|
+
while (events.get(++startPosition)[1] !== current) {
|
|
1310
|
+
}
|
|
1311
|
+
startPositions.push(startPosition);
|
|
1312
|
+
if (!current._tokenizer) {
|
|
1313
|
+
stream = context.sliceStream(current);
|
|
1314
|
+
if (!current.next) {
|
|
1315
|
+
stream.push(null);
|
|
1316
|
+
}
|
|
1317
|
+
if (previous2) {
|
|
1318
|
+
tokenizer.defineSkip(current.start);
|
|
1319
|
+
}
|
|
1320
|
+
if (current._isInFirstContentOfListItem) {
|
|
1321
|
+
tokenizer._gfmTasklistFirstContentOfListItem = true;
|
|
1322
|
+
}
|
|
1323
|
+
tokenizer.write(stream);
|
|
1324
|
+
if (current._isInFirstContentOfListItem) {
|
|
1325
|
+
tokenizer._gfmTasklistFirstContentOfListItem = void 0;
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
previous2 = current;
|
|
1329
|
+
current = current.next;
|
|
1330
|
+
}
|
|
1331
|
+
current = token;
|
|
1332
|
+
while (++index < childEvents.length) {
|
|
1333
|
+
if (
|
|
1334
|
+
// Find a void token that includes a break.
|
|
1335
|
+
childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line
|
|
1336
|
+
) {
|
|
1337
|
+
start = index + 1;
|
|
1338
|
+
breaks.push(start);
|
|
1339
|
+
current._tokenizer = void 0;
|
|
1340
|
+
current.previous = void 0;
|
|
1341
|
+
current = current.next;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
tokenizer.events = [];
|
|
1345
|
+
if (current) {
|
|
1346
|
+
current._tokenizer = void 0;
|
|
1347
|
+
current.previous = void 0;
|
|
1348
|
+
} else {
|
|
1349
|
+
breaks.pop();
|
|
1350
|
+
}
|
|
1351
|
+
index = breaks.length;
|
|
1352
|
+
while (index--) {
|
|
1353
|
+
const slice = childEvents.slice(breaks[index], breaks[index + 1]);
|
|
1354
|
+
const start2 = startPositions.pop();
|
|
1355
|
+
jumps.push([start2, start2 + slice.length - 1]);
|
|
1356
|
+
events.splice(start2, 2, slice);
|
|
1357
|
+
}
|
|
1358
|
+
jumps.reverse();
|
|
1359
|
+
index = -1;
|
|
1360
|
+
while (++index < jumps.length) {
|
|
1361
|
+
gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
|
|
1362
|
+
adjust += jumps[index][1] - jumps[index][0] - 1;
|
|
1363
|
+
}
|
|
1364
|
+
return gaps;
|
|
1365
|
+
}
|
|
1366
|
+
__name(subcontent, "subcontent");
|
|
1367
|
+
|
|
1368
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/content.js
|
|
1369
|
+
var content = {
|
|
1370
|
+
resolve: resolveContent,
|
|
1371
|
+
tokenize: tokenizeContent
|
|
1372
|
+
};
|
|
1373
|
+
var continuationConstruct = {
|
|
1374
|
+
partial: true,
|
|
1375
|
+
tokenize: tokenizeContinuation
|
|
1376
|
+
};
|
|
1377
|
+
function resolveContent(events) {
|
|
1378
|
+
subtokenize(events);
|
|
1379
|
+
return events;
|
|
1380
|
+
}
|
|
1381
|
+
__name(resolveContent, "resolveContent");
|
|
1382
|
+
function tokenizeContent(effects, ok) {
|
|
1383
|
+
let previous2;
|
|
1384
|
+
return chunkStart;
|
|
1385
|
+
function chunkStart(code) {
|
|
1386
|
+
effects.enter("content");
|
|
1387
|
+
previous2 = effects.enter("chunkContent", {
|
|
1388
|
+
contentType: "content"
|
|
1389
|
+
});
|
|
1390
|
+
return chunkInside(code);
|
|
1391
|
+
}
|
|
1392
|
+
__name(chunkStart, "chunkStart");
|
|
1393
|
+
function chunkInside(code) {
|
|
1394
|
+
if (code === null) {
|
|
1395
|
+
return contentEnd(code);
|
|
1396
|
+
}
|
|
1397
|
+
if (markdownLineEnding(code)) {
|
|
1398
|
+
return effects.check(continuationConstruct, contentContinue, contentEnd)(code);
|
|
1399
|
+
}
|
|
1400
|
+
effects.consume(code);
|
|
1401
|
+
return chunkInside;
|
|
1402
|
+
}
|
|
1403
|
+
__name(chunkInside, "chunkInside");
|
|
1404
|
+
function contentEnd(code) {
|
|
1405
|
+
effects.exit("chunkContent");
|
|
1406
|
+
effects.exit("content");
|
|
1407
|
+
return ok(code);
|
|
1408
|
+
}
|
|
1409
|
+
__name(contentEnd, "contentEnd");
|
|
1410
|
+
function contentContinue(code) {
|
|
1411
|
+
effects.consume(code);
|
|
1412
|
+
effects.exit("chunkContent");
|
|
1413
|
+
previous2.next = effects.enter("chunkContent", {
|
|
1414
|
+
contentType: "content",
|
|
1415
|
+
previous: previous2
|
|
1416
|
+
});
|
|
1417
|
+
previous2 = previous2.next;
|
|
1418
|
+
return chunkInside;
|
|
1419
|
+
}
|
|
1420
|
+
__name(contentContinue, "contentContinue");
|
|
1421
|
+
}
|
|
1422
|
+
__name(tokenizeContent, "tokenizeContent");
|
|
1423
|
+
function tokenizeContinuation(effects, ok, nok) {
|
|
1424
|
+
const self = this;
|
|
1425
|
+
return startLookahead;
|
|
1426
|
+
function startLookahead(code) {
|
|
1427
|
+
effects.exit("chunkContent");
|
|
1428
|
+
effects.enter("lineEnding");
|
|
1429
|
+
effects.consume(code);
|
|
1430
|
+
effects.exit("lineEnding");
|
|
1431
|
+
return factorySpace(effects, prefixed, "linePrefix");
|
|
1432
|
+
}
|
|
1433
|
+
__name(startLookahead, "startLookahead");
|
|
1434
|
+
function prefixed(code) {
|
|
1435
|
+
if (code === null || markdownLineEnding(code)) {
|
|
1436
|
+
return nok(code);
|
|
1437
|
+
}
|
|
1438
|
+
const tail = self.events[self.events.length - 1];
|
|
1439
|
+
if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) {
|
|
1440
|
+
return ok(code);
|
|
1441
|
+
}
|
|
1442
|
+
return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);
|
|
1443
|
+
}
|
|
1444
|
+
__name(prefixed, "prefixed");
|
|
1445
|
+
}
|
|
1446
|
+
__name(tokenizeContinuation, "tokenizeContinuation");
|
|
1447
|
+
|
|
1448
|
+
// node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.js
|
|
1449
|
+
function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
|
|
1450
|
+
const limit = max || Number.POSITIVE_INFINITY;
|
|
1451
|
+
let balance = 0;
|
|
1452
|
+
return start;
|
|
1453
|
+
function start(code) {
|
|
1454
|
+
if (code === 60) {
|
|
1455
|
+
effects.enter(type);
|
|
1456
|
+
effects.enter(literalType);
|
|
1457
|
+
effects.enter(literalMarkerType);
|
|
1458
|
+
effects.consume(code);
|
|
1459
|
+
effects.exit(literalMarkerType);
|
|
1460
|
+
return enclosedBefore;
|
|
1461
|
+
}
|
|
1462
|
+
if (code === null || code === 32 || code === 41 || asciiControl(code)) {
|
|
1463
|
+
return nok(code);
|
|
1464
|
+
}
|
|
1465
|
+
effects.enter(type);
|
|
1466
|
+
effects.enter(rawType);
|
|
1467
|
+
effects.enter(stringType);
|
|
1468
|
+
effects.enter("chunkString", {
|
|
1469
|
+
contentType: "string"
|
|
1470
|
+
});
|
|
1471
|
+
return raw(code);
|
|
1472
|
+
}
|
|
1473
|
+
__name(start, "start");
|
|
1474
|
+
function enclosedBefore(code) {
|
|
1475
|
+
if (code === 62) {
|
|
1476
|
+
effects.enter(literalMarkerType);
|
|
1477
|
+
effects.consume(code);
|
|
1478
|
+
effects.exit(literalMarkerType);
|
|
1479
|
+
effects.exit(literalType);
|
|
1480
|
+
effects.exit(type);
|
|
1481
|
+
return ok;
|
|
1482
|
+
}
|
|
1483
|
+
effects.enter(stringType);
|
|
1484
|
+
effects.enter("chunkString", {
|
|
1485
|
+
contentType: "string"
|
|
1486
|
+
});
|
|
1487
|
+
return enclosed(code);
|
|
1488
|
+
}
|
|
1489
|
+
__name(enclosedBefore, "enclosedBefore");
|
|
1490
|
+
function enclosed(code) {
|
|
1491
|
+
if (code === 62) {
|
|
1492
|
+
effects.exit("chunkString");
|
|
1493
|
+
effects.exit(stringType);
|
|
1494
|
+
return enclosedBefore(code);
|
|
1495
|
+
}
|
|
1496
|
+
if (code === null || code === 60 || markdownLineEnding(code)) {
|
|
1497
|
+
return nok(code);
|
|
1498
|
+
}
|
|
1499
|
+
effects.consume(code);
|
|
1500
|
+
return code === 92 ? enclosedEscape : enclosed;
|
|
1501
|
+
}
|
|
1502
|
+
__name(enclosed, "enclosed");
|
|
1503
|
+
function enclosedEscape(code) {
|
|
1504
|
+
if (code === 60 || code === 62 || code === 92) {
|
|
1505
|
+
effects.consume(code);
|
|
1506
|
+
return enclosed;
|
|
1507
|
+
}
|
|
1508
|
+
return enclosed(code);
|
|
1509
|
+
}
|
|
1510
|
+
__name(enclosedEscape, "enclosedEscape");
|
|
1511
|
+
function raw(code) {
|
|
1512
|
+
if (!balance && (code === null || code === 41 || markdownLineEndingOrSpace(code))) {
|
|
1513
|
+
effects.exit("chunkString");
|
|
1514
|
+
effects.exit(stringType);
|
|
1515
|
+
effects.exit(rawType);
|
|
1516
|
+
effects.exit(type);
|
|
1517
|
+
return ok(code);
|
|
1518
|
+
}
|
|
1519
|
+
if (balance < limit && code === 40) {
|
|
1520
|
+
effects.consume(code);
|
|
1521
|
+
balance++;
|
|
1522
|
+
return raw;
|
|
1523
|
+
}
|
|
1524
|
+
if (code === 41) {
|
|
1525
|
+
effects.consume(code);
|
|
1526
|
+
balance--;
|
|
1527
|
+
return raw;
|
|
1528
|
+
}
|
|
1529
|
+
if (code === null || code === 32 || code === 40 || asciiControl(code)) {
|
|
1530
|
+
return nok(code);
|
|
1531
|
+
}
|
|
1532
|
+
effects.consume(code);
|
|
1533
|
+
return code === 92 ? rawEscape : raw;
|
|
1534
|
+
}
|
|
1535
|
+
__name(raw, "raw");
|
|
1536
|
+
function rawEscape(code) {
|
|
1537
|
+
if (code === 40 || code === 41 || code === 92) {
|
|
1538
|
+
effects.consume(code);
|
|
1539
|
+
return raw;
|
|
1540
|
+
}
|
|
1541
|
+
return raw(code);
|
|
1542
|
+
}
|
|
1543
|
+
__name(rawEscape, "rawEscape");
|
|
1544
|
+
}
|
|
1545
|
+
__name(factoryDestination, "factoryDestination");
|
|
1546
|
+
|
|
1547
|
+
// node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.js
|
|
1548
|
+
function factoryLabel(effects, ok, nok, type, markerType, stringType) {
|
|
1549
|
+
const self = this;
|
|
1550
|
+
let size = 0;
|
|
1551
|
+
let seen;
|
|
1552
|
+
return start;
|
|
1553
|
+
function start(code) {
|
|
1554
|
+
effects.enter(type);
|
|
1555
|
+
effects.enter(markerType);
|
|
1556
|
+
effects.consume(code);
|
|
1557
|
+
effects.exit(markerType);
|
|
1558
|
+
effects.enter(stringType);
|
|
1559
|
+
return atBreak;
|
|
1560
|
+
}
|
|
1561
|
+
__name(start, "start");
|
|
1562
|
+
function atBreak(code) {
|
|
1563
|
+
if (size > 999 || code === null || code === 91 || code === 93 && !seen || // To do: remove in the future once we’ve switched from
|
|
1564
|
+
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
|
|
1565
|
+
// which doesn’t need this.
|
|
1566
|
+
// Hidden footnotes hook.
|
|
1567
|
+
/* c8 ignore next 3 */
|
|
1568
|
+
code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) {
|
|
1569
|
+
return nok(code);
|
|
1570
|
+
}
|
|
1571
|
+
if (code === 93) {
|
|
1572
|
+
effects.exit(stringType);
|
|
1573
|
+
effects.enter(markerType);
|
|
1574
|
+
effects.consume(code);
|
|
1575
|
+
effects.exit(markerType);
|
|
1576
|
+
effects.exit(type);
|
|
1577
|
+
return ok;
|
|
1578
|
+
}
|
|
1579
|
+
if (markdownLineEnding(code)) {
|
|
1580
|
+
effects.enter("lineEnding");
|
|
1581
|
+
effects.consume(code);
|
|
1582
|
+
effects.exit("lineEnding");
|
|
1583
|
+
return atBreak;
|
|
1584
|
+
}
|
|
1585
|
+
effects.enter("chunkString", {
|
|
1586
|
+
contentType: "string"
|
|
1587
|
+
});
|
|
1588
|
+
return labelInside(code);
|
|
1589
|
+
}
|
|
1590
|
+
__name(atBreak, "atBreak");
|
|
1591
|
+
function labelInside(code) {
|
|
1592
|
+
if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999) {
|
|
1593
|
+
effects.exit("chunkString");
|
|
1594
|
+
return atBreak(code);
|
|
1595
|
+
}
|
|
1596
|
+
effects.consume(code);
|
|
1597
|
+
if (!seen) seen = !markdownSpace(code);
|
|
1598
|
+
return code === 92 ? labelEscape : labelInside;
|
|
1599
|
+
}
|
|
1600
|
+
__name(labelInside, "labelInside");
|
|
1601
|
+
function labelEscape(code) {
|
|
1602
|
+
if (code === 91 || code === 92 || code === 93) {
|
|
1603
|
+
effects.consume(code);
|
|
1604
|
+
size++;
|
|
1605
|
+
return labelInside;
|
|
1606
|
+
}
|
|
1607
|
+
return labelInside(code);
|
|
1608
|
+
}
|
|
1609
|
+
__name(labelEscape, "labelEscape");
|
|
1610
|
+
}
|
|
1611
|
+
__name(factoryLabel, "factoryLabel");
|
|
1612
|
+
|
|
1613
|
+
// node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.js
|
|
1614
|
+
function factoryTitle(effects, ok, nok, type, markerType, stringType) {
|
|
1615
|
+
let marker;
|
|
1616
|
+
return start;
|
|
1617
|
+
function start(code) {
|
|
1618
|
+
if (code === 34 || code === 39 || code === 40) {
|
|
1619
|
+
effects.enter(type);
|
|
1620
|
+
effects.enter(markerType);
|
|
1621
|
+
effects.consume(code);
|
|
1622
|
+
effects.exit(markerType);
|
|
1623
|
+
marker = code === 40 ? 41 : code;
|
|
1624
|
+
return begin;
|
|
1625
|
+
}
|
|
1626
|
+
return nok(code);
|
|
1627
|
+
}
|
|
1628
|
+
__name(start, "start");
|
|
1629
|
+
function begin(code) {
|
|
1630
|
+
if (code === marker) {
|
|
1631
|
+
effects.enter(markerType);
|
|
1632
|
+
effects.consume(code);
|
|
1633
|
+
effects.exit(markerType);
|
|
1634
|
+
effects.exit(type);
|
|
1635
|
+
return ok;
|
|
1636
|
+
}
|
|
1637
|
+
effects.enter(stringType);
|
|
1638
|
+
return atBreak(code);
|
|
1639
|
+
}
|
|
1640
|
+
__name(begin, "begin");
|
|
1641
|
+
function atBreak(code) {
|
|
1642
|
+
if (code === marker) {
|
|
1643
|
+
effects.exit(stringType);
|
|
1644
|
+
return begin(marker);
|
|
1645
|
+
}
|
|
1646
|
+
if (code === null) {
|
|
1647
|
+
return nok(code);
|
|
1648
|
+
}
|
|
1649
|
+
if (markdownLineEnding(code)) {
|
|
1650
|
+
effects.enter("lineEnding");
|
|
1651
|
+
effects.consume(code);
|
|
1652
|
+
effects.exit("lineEnding");
|
|
1653
|
+
return factorySpace(effects, atBreak, "linePrefix");
|
|
1654
|
+
}
|
|
1655
|
+
effects.enter("chunkString", {
|
|
1656
|
+
contentType: "string"
|
|
1657
|
+
});
|
|
1658
|
+
return inside(code);
|
|
1659
|
+
}
|
|
1660
|
+
__name(atBreak, "atBreak");
|
|
1661
|
+
function inside(code) {
|
|
1662
|
+
if (code === marker || code === null || markdownLineEnding(code)) {
|
|
1663
|
+
effects.exit("chunkString");
|
|
1664
|
+
return atBreak(code);
|
|
1665
|
+
}
|
|
1666
|
+
effects.consume(code);
|
|
1667
|
+
return code === 92 ? escape : inside;
|
|
1668
|
+
}
|
|
1669
|
+
__name(inside, "inside");
|
|
1670
|
+
function escape(code) {
|
|
1671
|
+
if (code === marker || code === 92) {
|
|
1672
|
+
effects.consume(code);
|
|
1673
|
+
return inside;
|
|
1674
|
+
}
|
|
1675
|
+
return inside(code);
|
|
1676
|
+
}
|
|
1677
|
+
__name(escape, "escape");
|
|
1678
|
+
}
|
|
1679
|
+
__name(factoryTitle, "factoryTitle");
|
|
1680
|
+
|
|
1681
|
+
// node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.js
|
|
1682
|
+
function factoryWhitespace(effects, ok) {
|
|
1683
|
+
let seen;
|
|
1684
|
+
return start;
|
|
1685
|
+
function start(code) {
|
|
1686
|
+
if (markdownLineEnding(code)) {
|
|
1687
|
+
effects.enter("lineEnding");
|
|
1688
|
+
effects.consume(code);
|
|
1689
|
+
effects.exit("lineEnding");
|
|
1690
|
+
seen = true;
|
|
1691
|
+
return start;
|
|
1692
|
+
}
|
|
1693
|
+
if (markdownSpace(code)) {
|
|
1694
|
+
return factorySpace(effects, start, seen ? "linePrefix" : "lineSuffix")(code);
|
|
1695
|
+
}
|
|
1696
|
+
return ok(code);
|
|
1697
|
+
}
|
|
1698
|
+
__name(start, "start");
|
|
1699
|
+
}
|
|
1700
|
+
__name(factoryWhitespace, "factoryWhitespace");
|
|
1701
|
+
|
|
1702
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/definition.js
|
|
1703
|
+
var definition = {
|
|
1704
|
+
name: "definition",
|
|
1705
|
+
tokenize: tokenizeDefinition
|
|
1706
|
+
};
|
|
1707
|
+
var titleBefore = {
|
|
1708
|
+
partial: true,
|
|
1709
|
+
tokenize: tokenizeTitleBefore
|
|
1710
|
+
};
|
|
1711
|
+
function tokenizeDefinition(effects, ok, nok) {
|
|
1712
|
+
const self = this;
|
|
1713
|
+
let identifier;
|
|
1714
|
+
return start;
|
|
1715
|
+
function start(code) {
|
|
1716
|
+
effects.enter("definition");
|
|
1717
|
+
return before(code);
|
|
1718
|
+
}
|
|
1719
|
+
__name(start, "start");
|
|
1720
|
+
function before(code) {
|
|
1721
|
+
return factoryLabel.call(
|
|
1722
|
+
self,
|
|
1723
|
+
effects,
|
|
1724
|
+
labelAfter,
|
|
1725
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
1726
|
+
nok,
|
|
1727
|
+
"definitionLabel",
|
|
1728
|
+
"definitionLabelMarker",
|
|
1729
|
+
"definitionLabelString"
|
|
1730
|
+
)(code);
|
|
1731
|
+
}
|
|
1732
|
+
__name(before, "before");
|
|
1733
|
+
function labelAfter(code) {
|
|
1734
|
+
identifier = normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));
|
|
1735
|
+
if (code === 58) {
|
|
1736
|
+
effects.enter("definitionMarker");
|
|
1737
|
+
effects.consume(code);
|
|
1738
|
+
effects.exit("definitionMarker");
|
|
1739
|
+
return markerAfter;
|
|
1740
|
+
}
|
|
1741
|
+
return nok(code);
|
|
1742
|
+
}
|
|
1743
|
+
__name(labelAfter, "labelAfter");
|
|
1744
|
+
function markerAfter(code) {
|
|
1745
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);
|
|
1746
|
+
}
|
|
1747
|
+
__name(markerAfter, "markerAfter");
|
|
1748
|
+
function destinationBefore(code) {
|
|
1749
|
+
return factoryDestination(
|
|
1750
|
+
effects,
|
|
1751
|
+
destinationAfter,
|
|
1752
|
+
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
1753
|
+
nok,
|
|
1754
|
+
"definitionDestination",
|
|
1755
|
+
"definitionDestinationLiteral",
|
|
1756
|
+
"definitionDestinationLiteralMarker",
|
|
1757
|
+
"definitionDestinationRaw",
|
|
1758
|
+
"definitionDestinationString"
|
|
1759
|
+
)(code);
|
|
1760
|
+
}
|
|
1761
|
+
__name(destinationBefore, "destinationBefore");
|
|
1762
|
+
function destinationAfter(code) {
|
|
1763
|
+
return effects.attempt(titleBefore, after, after)(code);
|
|
1764
|
+
}
|
|
1765
|
+
__name(destinationAfter, "destinationAfter");
|
|
1766
|
+
function after(code) {
|
|
1767
|
+
return markdownSpace(code) ? factorySpace(effects, afterWhitespace, "whitespace")(code) : afterWhitespace(code);
|
|
1768
|
+
}
|
|
1769
|
+
__name(after, "after");
|
|
1770
|
+
function afterWhitespace(code) {
|
|
1771
|
+
if (code === null || markdownLineEnding(code)) {
|
|
1772
|
+
effects.exit("definition");
|
|
1773
|
+
self.parser.defined.push(identifier);
|
|
1774
|
+
return ok(code);
|
|
1775
|
+
}
|
|
1776
|
+
return nok(code);
|
|
1777
|
+
}
|
|
1778
|
+
__name(afterWhitespace, "afterWhitespace");
|
|
1779
|
+
}
|
|
1780
|
+
__name(tokenizeDefinition, "tokenizeDefinition");
|
|
1781
|
+
function tokenizeTitleBefore(effects, ok, nok) {
|
|
1782
|
+
return titleBefore2;
|
|
1783
|
+
function titleBefore2(code) {
|
|
1784
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);
|
|
1785
|
+
}
|
|
1786
|
+
__name(titleBefore2, "titleBefore");
|
|
1787
|
+
function beforeMarker(code) {
|
|
1788
|
+
return factoryTitle(effects, titleAfter, nok, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(code);
|
|
1789
|
+
}
|
|
1790
|
+
__name(beforeMarker, "beforeMarker");
|
|
1791
|
+
function titleAfter(code) {
|
|
1792
|
+
return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, "whitespace")(code) : titleAfterOptionalWhitespace(code);
|
|
1793
|
+
}
|
|
1794
|
+
__name(titleAfter, "titleAfter");
|
|
1795
|
+
function titleAfterOptionalWhitespace(code) {
|
|
1796
|
+
return code === null || markdownLineEnding(code) ? ok(code) : nok(code);
|
|
1797
|
+
}
|
|
1798
|
+
__name(titleAfterOptionalWhitespace, "titleAfterOptionalWhitespace");
|
|
1799
|
+
}
|
|
1800
|
+
__name(tokenizeTitleBefore, "tokenizeTitleBefore");
|
|
1801
|
+
|
|
1802
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
|
|
1803
|
+
var hardBreakEscape = {
|
|
1804
|
+
name: "hardBreakEscape",
|
|
1805
|
+
tokenize: tokenizeHardBreakEscape
|
|
1806
|
+
};
|
|
1807
|
+
function tokenizeHardBreakEscape(effects, ok, nok) {
|
|
1808
|
+
return start;
|
|
1809
|
+
function start(code) {
|
|
1810
|
+
effects.enter("hardBreakEscape");
|
|
1811
|
+
effects.consume(code);
|
|
1812
|
+
return after;
|
|
1813
|
+
}
|
|
1814
|
+
__name(start, "start");
|
|
1815
|
+
function after(code) {
|
|
1816
|
+
if (markdownLineEnding(code)) {
|
|
1817
|
+
effects.exit("hardBreakEscape");
|
|
1818
|
+
return ok(code);
|
|
1819
|
+
}
|
|
1820
|
+
return nok(code);
|
|
1821
|
+
}
|
|
1822
|
+
__name(after, "after");
|
|
1823
|
+
}
|
|
1824
|
+
__name(tokenizeHardBreakEscape, "tokenizeHardBreakEscape");
|
|
1825
|
+
|
|
1826
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/heading-atx.js
|
|
1827
|
+
var headingAtx = {
|
|
1828
|
+
name: "headingAtx",
|
|
1829
|
+
resolve: resolveHeadingAtx,
|
|
1830
|
+
tokenize: tokenizeHeadingAtx
|
|
1831
|
+
};
|
|
1832
|
+
function resolveHeadingAtx(events, context) {
|
|
1833
|
+
let contentEnd = events.length - 2;
|
|
1834
|
+
let contentStart = 3;
|
|
1835
|
+
if (events[contentStart][1].type === "whitespace") {
|
|
1836
|
+
contentStart += 2;
|
|
1837
|
+
}
|
|
1838
|
+
if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") {
|
|
1839
|
+
contentEnd -= 2;
|
|
1840
|
+
}
|
|
1841
|
+
if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) {
|
|
1842
|
+
contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
|
|
1843
|
+
}
|
|
1844
|
+
if (contentEnd > contentStart) {
|
|
1845
|
+
const content2 = {
|
|
1846
|
+
type: "atxHeadingText",
|
|
1847
|
+
start: events[contentStart][1].start,
|
|
1848
|
+
end: events[contentEnd][1].end
|
|
1849
|
+
};
|
|
1850
|
+
const text = {
|
|
1851
|
+
type: "chunkText",
|
|
1852
|
+
start: events[contentStart][1].start,
|
|
1853
|
+
end: events[contentEnd][1].end,
|
|
1854
|
+
contentType: "text"
|
|
1855
|
+
};
|
|
1856
|
+
splice(events, contentStart, contentEnd - contentStart + 1, [["enter", content2, context], ["enter", text, context], ["exit", text, context], ["exit", content2, context]]);
|
|
1857
|
+
}
|
|
1858
|
+
return events;
|
|
1859
|
+
}
|
|
1860
|
+
__name(resolveHeadingAtx, "resolveHeadingAtx");
|
|
1861
|
+
function tokenizeHeadingAtx(effects, ok, nok) {
|
|
1862
|
+
let size = 0;
|
|
1863
|
+
return start;
|
|
1864
|
+
function start(code) {
|
|
1865
|
+
effects.enter("atxHeading");
|
|
1866
|
+
return before(code);
|
|
1867
|
+
}
|
|
1868
|
+
__name(start, "start");
|
|
1869
|
+
function before(code) {
|
|
1870
|
+
effects.enter("atxHeadingSequence");
|
|
1871
|
+
return sequenceOpen(code);
|
|
1872
|
+
}
|
|
1873
|
+
__name(before, "before");
|
|
1874
|
+
function sequenceOpen(code) {
|
|
1875
|
+
if (code === 35 && size++ < 6) {
|
|
1876
|
+
effects.consume(code);
|
|
1877
|
+
return sequenceOpen;
|
|
1878
|
+
}
|
|
1879
|
+
if (code === null || markdownLineEndingOrSpace(code)) {
|
|
1880
|
+
effects.exit("atxHeadingSequence");
|
|
1881
|
+
return atBreak(code);
|
|
1882
|
+
}
|
|
1883
|
+
return nok(code);
|
|
1884
|
+
}
|
|
1885
|
+
__name(sequenceOpen, "sequenceOpen");
|
|
1886
|
+
function atBreak(code) {
|
|
1887
|
+
if (code === 35) {
|
|
1888
|
+
effects.enter("atxHeadingSequence");
|
|
1889
|
+
return sequenceFurther(code);
|
|
1890
|
+
}
|
|
1891
|
+
if (code === null || markdownLineEnding(code)) {
|
|
1892
|
+
effects.exit("atxHeading");
|
|
1893
|
+
return ok(code);
|
|
1894
|
+
}
|
|
1895
|
+
if (markdownSpace(code)) {
|
|
1896
|
+
return factorySpace(effects, atBreak, "whitespace")(code);
|
|
1897
|
+
}
|
|
1898
|
+
effects.enter("atxHeadingText");
|
|
1899
|
+
return data(code);
|
|
1900
|
+
}
|
|
1901
|
+
__name(atBreak, "atBreak");
|
|
1902
|
+
function sequenceFurther(code) {
|
|
1903
|
+
if (code === 35) {
|
|
1904
|
+
effects.consume(code);
|
|
1905
|
+
return sequenceFurther;
|
|
1906
|
+
}
|
|
1907
|
+
effects.exit("atxHeadingSequence");
|
|
1908
|
+
return atBreak(code);
|
|
1909
|
+
}
|
|
1910
|
+
__name(sequenceFurther, "sequenceFurther");
|
|
1911
|
+
function data(code) {
|
|
1912
|
+
if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {
|
|
1913
|
+
effects.exit("atxHeadingText");
|
|
1914
|
+
return atBreak(code);
|
|
1915
|
+
}
|
|
1916
|
+
effects.consume(code);
|
|
1917
|
+
return data;
|
|
1918
|
+
}
|
|
1919
|
+
__name(data, "data");
|
|
1920
|
+
}
|
|
1921
|
+
__name(tokenizeHeadingAtx, "tokenizeHeadingAtx");
|
|
1922
|
+
|
|
1923
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/html-flow.js
|
|
1924
|
+
var htmlFlow = {
|
|
1925
|
+
concrete: true,
|
|
1926
|
+
name: "htmlFlow",
|
|
1927
|
+
resolveTo: resolveToHtmlFlow,
|
|
1928
|
+
tokenize: tokenizeHtmlFlow
|
|
1929
|
+
};
|
|
1930
|
+
var blankLineBefore = {
|
|
1931
|
+
partial: true,
|
|
1932
|
+
tokenize: tokenizeBlankLineBefore
|
|
1933
|
+
};
|
|
1934
|
+
function resolveToHtmlFlow(events) {
|
|
1935
|
+
let index = events.length;
|
|
1936
|
+
while (index--) {
|
|
1937
|
+
if (events[index][0] === "enter" && events[index][1].type === "htmlFlow") {
|
|
1938
|
+
break;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
if (index > 1 && events[index - 2][1].type === "linePrefix") {
|
|
1942
|
+
events[index][1].start = events[index - 2][1].start;
|
|
1943
|
+
events[index + 1][1].start = events[index - 2][1].start;
|
|
1944
|
+
events.splice(index - 2, 2);
|
|
1945
|
+
}
|
|
1946
|
+
return events;
|
|
1947
|
+
}
|
|
1948
|
+
__name(resolveToHtmlFlow, "resolveToHtmlFlow");
|
|
1949
|
+
function tokenizeHtmlFlow(effects, ok, nok) {
|
|
1950
|
+
const self = this;
|
|
1951
|
+
let marker;
|
|
1952
|
+
let closingTag;
|
|
1953
|
+
let buffer;
|
|
1954
|
+
let index;
|
|
1955
|
+
let markerB;
|
|
1956
|
+
return start;
|
|
1957
|
+
function start(code) {
|
|
1958
|
+
return before(code);
|
|
1959
|
+
}
|
|
1960
|
+
__name(start, "start");
|
|
1961
|
+
function before(code) {
|
|
1962
|
+
effects.enter("htmlFlow");
|
|
1963
|
+
effects.enter("htmlFlowData");
|
|
1964
|
+
effects.consume(code);
|
|
1965
|
+
return open;
|
|
1966
|
+
}
|
|
1967
|
+
__name(before, "before");
|
|
1968
|
+
function open(code) {
|
|
1969
|
+
if (code === 33) {
|
|
1970
|
+
effects.consume(code);
|
|
1971
|
+
return declarationOpen;
|
|
1972
|
+
}
|
|
1973
|
+
if (code === 47) {
|
|
1974
|
+
effects.consume(code);
|
|
1975
|
+
closingTag = true;
|
|
1976
|
+
return tagCloseStart;
|
|
1977
|
+
}
|
|
1978
|
+
if (code === 63) {
|
|
1979
|
+
effects.consume(code);
|
|
1980
|
+
marker = 3;
|
|
1981
|
+
return self.interrupt ? ok : continuationDeclarationInside;
|
|
1982
|
+
}
|
|
1983
|
+
if (asciiAlpha(code)) {
|
|
1984
|
+
effects.consume(code);
|
|
1985
|
+
buffer = String.fromCharCode(code);
|
|
1986
|
+
return tagName;
|
|
1987
|
+
}
|
|
1988
|
+
return nok(code);
|
|
1989
|
+
}
|
|
1990
|
+
__name(open, "open");
|
|
1991
|
+
function declarationOpen(code) {
|
|
1992
|
+
if (code === 45) {
|
|
1993
|
+
effects.consume(code);
|
|
1994
|
+
marker = 2;
|
|
1995
|
+
return commentOpenInside;
|
|
1996
|
+
}
|
|
1997
|
+
if (code === 91) {
|
|
1998
|
+
effects.consume(code);
|
|
1999
|
+
marker = 5;
|
|
2000
|
+
index = 0;
|
|
2001
|
+
return cdataOpenInside;
|
|
2002
|
+
}
|
|
2003
|
+
if (asciiAlpha(code)) {
|
|
2004
|
+
effects.consume(code);
|
|
2005
|
+
marker = 4;
|
|
2006
|
+
return self.interrupt ? ok : continuationDeclarationInside;
|
|
2007
|
+
}
|
|
2008
|
+
return nok(code);
|
|
2009
|
+
}
|
|
2010
|
+
__name(declarationOpen, "declarationOpen");
|
|
2011
|
+
function commentOpenInside(code) {
|
|
2012
|
+
if (code === 45) {
|
|
2013
|
+
effects.consume(code);
|
|
2014
|
+
return self.interrupt ? ok : continuationDeclarationInside;
|
|
2015
|
+
}
|
|
2016
|
+
return nok(code);
|
|
2017
|
+
}
|
|
2018
|
+
__name(commentOpenInside, "commentOpenInside");
|
|
2019
|
+
function cdataOpenInside(code) {
|
|
2020
|
+
const value = "CDATA[";
|
|
2021
|
+
if (code === value.charCodeAt(index++)) {
|
|
2022
|
+
effects.consume(code);
|
|
2023
|
+
if (index === value.length) {
|
|
2024
|
+
return self.interrupt ? ok : continuation;
|
|
2025
|
+
}
|
|
2026
|
+
return cdataOpenInside;
|
|
2027
|
+
}
|
|
2028
|
+
return nok(code);
|
|
2029
|
+
}
|
|
2030
|
+
__name(cdataOpenInside, "cdataOpenInside");
|
|
2031
|
+
function tagCloseStart(code) {
|
|
2032
|
+
if (asciiAlpha(code)) {
|
|
2033
|
+
effects.consume(code);
|
|
2034
|
+
buffer = String.fromCharCode(code);
|
|
2035
|
+
return tagName;
|
|
2036
|
+
}
|
|
2037
|
+
return nok(code);
|
|
2038
|
+
}
|
|
2039
|
+
__name(tagCloseStart, "tagCloseStart");
|
|
2040
|
+
function tagName(code) {
|
|
2041
|
+
if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
|
|
2042
|
+
const slash = code === 47;
|
|
2043
|
+
const name = buffer.toLowerCase();
|
|
2044
|
+
if (!slash && !closingTag && htmlRawNames.includes(name)) {
|
|
2045
|
+
marker = 1;
|
|
2046
|
+
return self.interrupt ? ok(code) : continuation(code);
|
|
2047
|
+
}
|
|
2048
|
+
if (htmlBlockNames.includes(buffer.toLowerCase())) {
|
|
2049
|
+
marker = 6;
|
|
2050
|
+
if (slash) {
|
|
2051
|
+
effects.consume(code);
|
|
2052
|
+
return basicSelfClosing;
|
|
2053
|
+
}
|
|
2054
|
+
return self.interrupt ? ok(code) : continuation(code);
|
|
2055
|
+
}
|
|
2056
|
+
marker = 7;
|
|
2057
|
+
return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code);
|
|
2058
|
+
}
|
|
2059
|
+
if (code === 45 || asciiAlphanumeric(code)) {
|
|
2060
|
+
effects.consume(code);
|
|
2061
|
+
buffer += String.fromCharCode(code);
|
|
2062
|
+
return tagName;
|
|
2063
|
+
}
|
|
2064
|
+
return nok(code);
|
|
2065
|
+
}
|
|
2066
|
+
__name(tagName, "tagName");
|
|
2067
|
+
function basicSelfClosing(code) {
|
|
2068
|
+
if (code === 62) {
|
|
2069
|
+
effects.consume(code);
|
|
2070
|
+
return self.interrupt ? ok : continuation;
|
|
2071
|
+
}
|
|
2072
|
+
return nok(code);
|
|
2073
|
+
}
|
|
2074
|
+
__name(basicSelfClosing, "basicSelfClosing");
|
|
2075
|
+
function completeClosingTagAfter(code) {
|
|
2076
|
+
if (markdownSpace(code)) {
|
|
2077
|
+
effects.consume(code);
|
|
2078
|
+
return completeClosingTagAfter;
|
|
2079
|
+
}
|
|
2080
|
+
return completeEnd(code);
|
|
2081
|
+
}
|
|
2082
|
+
__name(completeClosingTagAfter, "completeClosingTagAfter");
|
|
2083
|
+
function completeAttributeNameBefore(code) {
|
|
2084
|
+
if (code === 47) {
|
|
2085
|
+
effects.consume(code);
|
|
2086
|
+
return completeEnd;
|
|
2087
|
+
}
|
|
2088
|
+
if (code === 58 || code === 95 || asciiAlpha(code)) {
|
|
2089
|
+
effects.consume(code);
|
|
2090
|
+
return completeAttributeName;
|
|
2091
|
+
}
|
|
2092
|
+
if (markdownSpace(code)) {
|
|
2093
|
+
effects.consume(code);
|
|
2094
|
+
return completeAttributeNameBefore;
|
|
2095
|
+
}
|
|
2096
|
+
return completeEnd(code);
|
|
2097
|
+
}
|
|
2098
|
+
__name(completeAttributeNameBefore, "completeAttributeNameBefore");
|
|
2099
|
+
function completeAttributeName(code) {
|
|
2100
|
+
if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {
|
|
2101
|
+
effects.consume(code);
|
|
2102
|
+
return completeAttributeName;
|
|
2103
|
+
}
|
|
2104
|
+
return completeAttributeNameAfter(code);
|
|
2105
|
+
}
|
|
2106
|
+
__name(completeAttributeName, "completeAttributeName");
|
|
2107
|
+
function completeAttributeNameAfter(code) {
|
|
2108
|
+
if (code === 61) {
|
|
2109
|
+
effects.consume(code);
|
|
2110
|
+
return completeAttributeValueBefore;
|
|
2111
|
+
}
|
|
2112
|
+
if (markdownSpace(code)) {
|
|
2113
|
+
effects.consume(code);
|
|
2114
|
+
return completeAttributeNameAfter;
|
|
2115
|
+
}
|
|
2116
|
+
return completeAttributeNameBefore(code);
|
|
2117
|
+
}
|
|
2118
|
+
__name(completeAttributeNameAfter, "completeAttributeNameAfter");
|
|
2119
|
+
function completeAttributeValueBefore(code) {
|
|
2120
|
+
if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {
|
|
2121
|
+
return nok(code);
|
|
2122
|
+
}
|
|
2123
|
+
if (code === 34 || code === 39) {
|
|
2124
|
+
effects.consume(code);
|
|
2125
|
+
markerB = code;
|
|
2126
|
+
return completeAttributeValueQuoted;
|
|
2127
|
+
}
|
|
2128
|
+
if (markdownSpace(code)) {
|
|
2129
|
+
effects.consume(code);
|
|
2130
|
+
return completeAttributeValueBefore;
|
|
2131
|
+
}
|
|
2132
|
+
return completeAttributeValueUnquoted(code);
|
|
2133
|
+
}
|
|
2134
|
+
__name(completeAttributeValueBefore, "completeAttributeValueBefore");
|
|
2135
|
+
function completeAttributeValueQuoted(code) {
|
|
2136
|
+
if (code === markerB) {
|
|
2137
|
+
effects.consume(code);
|
|
2138
|
+
markerB = null;
|
|
2139
|
+
return completeAttributeValueQuotedAfter;
|
|
2140
|
+
}
|
|
2141
|
+
if (code === null || markdownLineEnding(code)) {
|
|
2142
|
+
return nok(code);
|
|
2143
|
+
}
|
|
2144
|
+
effects.consume(code);
|
|
2145
|
+
return completeAttributeValueQuoted;
|
|
2146
|
+
}
|
|
2147
|
+
__name(completeAttributeValueQuoted, "completeAttributeValueQuoted");
|
|
2148
|
+
function completeAttributeValueUnquoted(code) {
|
|
2149
|
+
if (code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) {
|
|
2150
|
+
return completeAttributeNameAfter(code);
|
|
2151
|
+
}
|
|
2152
|
+
effects.consume(code);
|
|
2153
|
+
return completeAttributeValueUnquoted;
|
|
2154
|
+
}
|
|
2155
|
+
__name(completeAttributeValueUnquoted, "completeAttributeValueUnquoted");
|
|
2156
|
+
function completeAttributeValueQuotedAfter(code) {
|
|
2157
|
+
if (code === 47 || code === 62 || markdownSpace(code)) {
|
|
2158
|
+
return completeAttributeNameBefore(code);
|
|
2159
|
+
}
|
|
2160
|
+
return nok(code);
|
|
2161
|
+
}
|
|
2162
|
+
__name(completeAttributeValueQuotedAfter, "completeAttributeValueQuotedAfter");
|
|
2163
|
+
function completeEnd(code) {
|
|
2164
|
+
if (code === 62) {
|
|
2165
|
+
effects.consume(code);
|
|
2166
|
+
return completeAfter;
|
|
2167
|
+
}
|
|
2168
|
+
return nok(code);
|
|
2169
|
+
}
|
|
2170
|
+
__name(completeEnd, "completeEnd");
|
|
2171
|
+
function completeAfter(code) {
|
|
2172
|
+
if (code === null || markdownLineEnding(code)) {
|
|
2173
|
+
return continuation(code);
|
|
2174
|
+
}
|
|
2175
|
+
if (markdownSpace(code)) {
|
|
2176
|
+
effects.consume(code);
|
|
2177
|
+
return completeAfter;
|
|
2178
|
+
}
|
|
2179
|
+
return nok(code);
|
|
2180
|
+
}
|
|
2181
|
+
__name(completeAfter, "completeAfter");
|
|
2182
|
+
function continuation(code) {
|
|
2183
|
+
if (code === 45 && marker === 2) {
|
|
2184
|
+
effects.consume(code);
|
|
2185
|
+
return continuationCommentInside;
|
|
2186
|
+
}
|
|
2187
|
+
if (code === 60 && marker === 1) {
|
|
2188
|
+
effects.consume(code);
|
|
2189
|
+
return continuationRawTagOpen;
|
|
2190
|
+
}
|
|
2191
|
+
if (code === 62 && marker === 4) {
|
|
2192
|
+
effects.consume(code);
|
|
2193
|
+
return continuationClose;
|
|
2194
|
+
}
|
|
2195
|
+
if (code === 63 && marker === 3) {
|
|
2196
|
+
effects.consume(code);
|
|
2197
|
+
return continuationDeclarationInside;
|
|
2198
|
+
}
|
|
2199
|
+
if (code === 93 && marker === 5) {
|
|
2200
|
+
effects.consume(code);
|
|
2201
|
+
return continuationCdataInside;
|
|
2202
|
+
}
|
|
2203
|
+
if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {
|
|
2204
|
+
effects.exit("htmlFlowData");
|
|
2205
|
+
return effects.check(blankLineBefore, continuationAfter, continuationStart)(code);
|
|
2206
|
+
}
|
|
2207
|
+
if (code === null || markdownLineEnding(code)) {
|
|
2208
|
+
effects.exit("htmlFlowData");
|
|
2209
|
+
return continuationStart(code);
|
|
2210
|
+
}
|
|
2211
|
+
effects.consume(code);
|
|
2212
|
+
return continuation;
|
|
2213
|
+
}
|
|
2214
|
+
__name(continuation, "continuation");
|
|
2215
|
+
function continuationStart(code) {
|
|
2216
|
+
return effects.check(nonLazyContinuation, continuationStartNonLazy, continuationAfter)(code);
|
|
2217
|
+
}
|
|
2218
|
+
__name(continuationStart, "continuationStart");
|
|
2219
|
+
function continuationStartNonLazy(code) {
|
|
2220
|
+
effects.enter("lineEnding");
|
|
2221
|
+
effects.consume(code);
|
|
2222
|
+
effects.exit("lineEnding");
|
|
2223
|
+
return continuationBefore;
|
|
2224
|
+
}
|
|
2225
|
+
__name(continuationStartNonLazy, "continuationStartNonLazy");
|
|
2226
|
+
function continuationBefore(code) {
|
|
2227
|
+
if (code === null || markdownLineEnding(code)) {
|
|
2228
|
+
return continuationStart(code);
|
|
2229
|
+
}
|
|
2230
|
+
effects.enter("htmlFlowData");
|
|
2231
|
+
return continuation(code);
|
|
2232
|
+
}
|
|
2233
|
+
__name(continuationBefore, "continuationBefore");
|
|
2234
|
+
function continuationCommentInside(code) {
|
|
2235
|
+
if (code === 45) {
|
|
2236
|
+
effects.consume(code);
|
|
2237
|
+
return continuationDeclarationInside;
|
|
2238
|
+
}
|
|
2239
|
+
return continuation(code);
|
|
2240
|
+
}
|
|
2241
|
+
__name(continuationCommentInside, "continuationCommentInside");
|
|
2242
|
+
function continuationRawTagOpen(code) {
|
|
2243
|
+
if (code === 47) {
|
|
2244
|
+
effects.consume(code);
|
|
2245
|
+
buffer = "";
|
|
2246
|
+
return continuationRawEndTag;
|
|
2247
|
+
}
|
|
2248
|
+
return continuation(code);
|
|
2249
|
+
}
|
|
2250
|
+
__name(continuationRawTagOpen, "continuationRawTagOpen");
|
|
2251
|
+
function continuationRawEndTag(code) {
|
|
2252
|
+
if (code === 62) {
|
|
2253
|
+
const name = buffer.toLowerCase();
|
|
2254
|
+
if (htmlRawNames.includes(name)) {
|
|
2255
|
+
effects.consume(code);
|
|
2256
|
+
return continuationClose;
|
|
2257
|
+
}
|
|
2258
|
+
return continuation(code);
|
|
2259
|
+
}
|
|
2260
|
+
if (asciiAlpha(code) && buffer.length < 8) {
|
|
2261
|
+
effects.consume(code);
|
|
2262
|
+
buffer += String.fromCharCode(code);
|
|
2263
|
+
return continuationRawEndTag;
|
|
2264
|
+
}
|
|
2265
|
+
return continuation(code);
|
|
2266
|
+
}
|
|
2267
|
+
__name(continuationRawEndTag, "continuationRawEndTag");
|
|
2268
|
+
function continuationCdataInside(code) {
|
|
2269
|
+
if (code === 93) {
|
|
2270
|
+
effects.consume(code);
|
|
2271
|
+
return continuationDeclarationInside;
|
|
2272
|
+
}
|
|
2273
|
+
return continuation(code);
|
|
2274
|
+
}
|
|
2275
|
+
__name(continuationCdataInside, "continuationCdataInside");
|
|
2276
|
+
function continuationDeclarationInside(code) {
|
|
2277
|
+
if (code === 62) {
|
|
2278
|
+
effects.consume(code);
|
|
2279
|
+
return continuationClose;
|
|
2280
|
+
}
|
|
2281
|
+
if (code === 45 && marker === 2) {
|
|
2282
|
+
effects.consume(code);
|
|
2283
|
+
return continuationDeclarationInside;
|
|
2284
|
+
}
|
|
2285
|
+
return continuation(code);
|
|
2286
|
+
}
|
|
2287
|
+
__name(continuationDeclarationInside, "continuationDeclarationInside");
|
|
2288
|
+
function continuationClose(code) {
|
|
2289
|
+
if (code === null || markdownLineEnding(code)) {
|
|
2290
|
+
effects.exit("htmlFlowData");
|
|
2291
|
+
return continuationAfter(code);
|
|
2292
|
+
}
|
|
2293
|
+
effects.consume(code);
|
|
2294
|
+
return continuationClose;
|
|
2295
|
+
}
|
|
2296
|
+
__name(continuationClose, "continuationClose");
|
|
2297
|
+
function continuationAfter(code) {
|
|
2298
|
+
effects.exit("htmlFlow");
|
|
2299
|
+
return ok(code);
|
|
2300
|
+
}
|
|
2301
|
+
__name(continuationAfter, "continuationAfter");
|
|
2302
|
+
}
|
|
2303
|
+
__name(tokenizeHtmlFlow, "tokenizeHtmlFlow");
|
|
2304
|
+
function tokenizeBlankLineBefore(effects, ok, nok) {
|
|
2305
|
+
return start;
|
|
2306
|
+
function start(code) {
|
|
2307
|
+
effects.enter("lineEnding");
|
|
2308
|
+
effects.consume(code);
|
|
2309
|
+
effects.exit("lineEnding");
|
|
2310
|
+
return effects.attempt(blankLine, ok, nok);
|
|
2311
|
+
}
|
|
2312
|
+
__name(start, "start");
|
|
2313
|
+
}
|
|
2314
|
+
__name(tokenizeBlankLineBefore, "tokenizeBlankLineBefore");
|
|
2315
|
+
|
|
2316
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/html-text.js
|
|
2317
|
+
var htmlText = {
|
|
2318
|
+
name: "htmlText",
|
|
2319
|
+
tokenize: tokenizeHtmlText
|
|
2320
|
+
};
|
|
2321
|
+
function tokenizeHtmlText(effects, ok, nok) {
|
|
2322
|
+
const self = this;
|
|
2323
|
+
let marker;
|
|
2324
|
+
let index;
|
|
2325
|
+
let returnState;
|
|
2326
|
+
return start;
|
|
2327
|
+
function start(code) {
|
|
2328
|
+
effects.enter("htmlText");
|
|
2329
|
+
effects.enter("htmlTextData");
|
|
2330
|
+
effects.consume(code);
|
|
2331
|
+
return open;
|
|
2332
|
+
}
|
|
2333
|
+
__name(start, "start");
|
|
2334
|
+
function open(code) {
|
|
2335
|
+
if (code === 33) {
|
|
2336
|
+
effects.consume(code);
|
|
2337
|
+
return declarationOpen;
|
|
2338
|
+
}
|
|
2339
|
+
if (code === 47) {
|
|
2340
|
+
effects.consume(code);
|
|
2341
|
+
return tagCloseStart;
|
|
2342
|
+
}
|
|
2343
|
+
if (code === 63) {
|
|
2344
|
+
effects.consume(code);
|
|
2345
|
+
return instruction;
|
|
2346
|
+
}
|
|
2347
|
+
if (asciiAlpha(code)) {
|
|
2348
|
+
effects.consume(code);
|
|
2349
|
+
return tagOpen;
|
|
2350
|
+
}
|
|
2351
|
+
return nok(code);
|
|
2352
|
+
}
|
|
2353
|
+
__name(open, "open");
|
|
2354
|
+
function declarationOpen(code) {
|
|
2355
|
+
if (code === 45) {
|
|
2356
|
+
effects.consume(code);
|
|
2357
|
+
return commentOpenInside;
|
|
2358
|
+
}
|
|
2359
|
+
if (code === 91) {
|
|
2360
|
+
effects.consume(code);
|
|
2361
|
+
index = 0;
|
|
2362
|
+
return cdataOpenInside;
|
|
2363
|
+
}
|
|
2364
|
+
if (asciiAlpha(code)) {
|
|
2365
|
+
effects.consume(code);
|
|
2366
|
+
return declaration;
|
|
2367
|
+
}
|
|
2368
|
+
return nok(code);
|
|
2369
|
+
}
|
|
2370
|
+
__name(declarationOpen, "declarationOpen");
|
|
2371
|
+
function commentOpenInside(code) {
|
|
2372
|
+
if (code === 45) {
|
|
2373
|
+
effects.consume(code);
|
|
2374
|
+
return commentEnd;
|
|
2375
|
+
}
|
|
2376
|
+
return nok(code);
|
|
2377
|
+
}
|
|
2378
|
+
__name(commentOpenInside, "commentOpenInside");
|
|
2379
|
+
function comment(code) {
|
|
2380
|
+
if (code === null) {
|
|
2381
|
+
return nok(code);
|
|
2382
|
+
}
|
|
2383
|
+
if (code === 45) {
|
|
2384
|
+
effects.consume(code);
|
|
2385
|
+
return commentClose;
|
|
2386
|
+
}
|
|
2387
|
+
if (markdownLineEnding(code)) {
|
|
2388
|
+
returnState = comment;
|
|
2389
|
+
return lineEndingBefore(code);
|
|
2390
|
+
}
|
|
2391
|
+
effects.consume(code);
|
|
2392
|
+
return comment;
|
|
2393
|
+
}
|
|
2394
|
+
__name(comment, "comment");
|
|
2395
|
+
function commentClose(code) {
|
|
2396
|
+
if (code === 45) {
|
|
2397
|
+
effects.consume(code);
|
|
2398
|
+
return commentEnd;
|
|
2399
|
+
}
|
|
2400
|
+
return comment(code);
|
|
2401
|
+
}
|
|
2402
|
+
__name(commentClose, "commentClose");
|
|
2403
|
+
function commentEnd(code) {
|
|
2404
|
+
return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);
|
|
2405
|
+
}
|
|
2406
|
+
__name(commentEnd, "commentEnd");
|
|
2407
|
+
function cdataOpenInside(code) {
|
|
2408
|
+
const value = "CDATA[";
|
|
2409
|
+
if (code === value.charCodeAt(index++)) {
|
|
2410
|
+
effects.consume(code);
|
|
2411
|
+
return index === value.length ? cdata : cdataOpenInside;
|
|
2412
|
+
}
|
|
2413
|
+
return nok(code);
|
|
2414
|
+
}
|
|
2415
|
+
__name(cdataOpenInside, "cdataOpenInside");
|
|
2416
|
+
function cdata(code) {
|
|
2417
|
+
if (code === null) {
|
|
2418
|
+
return nok(code);
|
|
2419
|
+
}
|
|
2420
|
+
if (code === 93) {
|
|
2421
|
+
effects.consume(code);
|
|
2422
|
+
return cdataClose;
|
|
2423
|
+
}
|
|
2424
|
+
if (markdownLineEnding(code)) {
|
|
2425
|
+
returnState = cdata;
|
|
2426
|
+
return lineEndingBefore(code);
|
|
2427
|
+
}
|
|
2428
|
+
effects.consume(code);
|
|
2429
|
+
return cdata;
|
|
2430
|
+
}
|
|
2431
|
+
__name(cdata, "cdata");
|
|
2432
|
+
function cdataClose(code) {
|
|
2433
|
+
if (code === 93) {
|
|
2434
|
+
effects.consume(code);
|
|
2435
|
+
return cdataEnd;
|
|
2436
|
+
}
|
|
2437
|
+
return cdata(code);
|
|
2438
|
+
}
|
|
2439
|
+
__name(cdataClose, "cdataClose");
|
|
2440
|
+
function cdataEnd(code) {
|
|
2441
|
+
if (code === 62) {
|
|
2442
|
+
return end(code);
|
|
2443
|
+
}
|
|
2444
|
+
if (code === 93) {
|
|
2445
|
+
effects.consume(code);
|
|
2446
|
+
return cdataEnd;
|
|
2447
|
+
}
|
|
2448
|
+
return cdata(code);
|
|
2449
|
+
}
|
|
2450
|
+
__name(cdataEnd, "cdataEnd");
|
|
2451
|
+
function declaration(code) {
|
|
2452
|
+
if (code === null || code === 62) {
|
|
2453
|
+
return end(code);
|
|
2454
|
+
}
|
|
2455
|
+
if (markdownLineEnding(code)) {
|
|
2456
|
+
returnState = declaration;
|
|
2457
|
+
return lineEndingBefore(code);
|
|
2458
|
+
}
|
|
2459
|
+
effects.consume(code);
|
|
2460
|
+
return declaration;
|
|
2461
|
+
}
|
|
2462
|
+
__name(declaration, "declaration");
|
|
2463
|
+
function instruction(code) {
|
|
2464
|
+
if (code === null) {
|
|
2465
|
+
return nok(code);
|
|
2466
|
+
}
|
|
2467
|
+
if (code === 63) {
|
|
2468
|
+
effects.consume(code);
|
|
2469
|
+
return instructionClose;
|
|
2470
|
+
}
|
|
2471
|
+
if (markdownLineEnding(code)) {
|
|
2472
|
+
returnState = instruction;
|
|
2473
|
+
return lineEndingBefore(code);
|
|
2474
|
+
}
|
|
2475
|
+
effects.consume(code);
|
|
2476
|
+
return instruction;
|
|
2477
|
+
}
|
|
2478
|
+
__name(instruction, "instruction");
|
|
2479
|
+
function instructionClose(code) {
|
|
2480
|
+
return code === 62 ? end(code) : instruction(code);
|
|
2481
|
+
}
|
|
2482
|
+
__name(instructionClose, "instructionClose");
|
|
2483
|
+
function tagCloseStart(code) {
|
|
2484
|
+
if (asciiAlpha(code)) {
|
|
2485
|
+
effects.consume(code);
|
|
2486
|
+
return tagClose;
|
|
2487
|
+
}
|
|
2488
|
+
return nok(code);
|
|
2489
|
+
}
|
|
2490
|
+
__name(tagCloseStart, "tagCloseStart");
|
|
2491
|
+
function tagClose(code) {
|
|
2492
|
+
if (code === 45 || asciiAlphanumeric(code)) {
|
|
2493
|
+
effects.consume(code);
|
|
2494
|
+
return tagClose;
|
|
2495
|
+
}
|
|
2496
|
+
return tagCloseBetween(code);
|
|
2497
|
+
}
|
|
2498
|
+
__name(tagClose, "tagClose");
|
|
2499
|
+
function tagCloseBetween(code) {
|
|
2500
|
+
if (markdownLineEnding(code)) {
|
|
2501
|
+
returnState = tagCloseBetween;
|
|
2502
|
+
return lineEndingBefore(code);
|
|
2503
|
+
}
|
|
2504
|
+
if (markdownSpace(code)) {
|
|
2505
|
+
effects.consume(code);
|
|
2506
|
+
return tagCloseBetween;
|
|
2507
|
+
}
|
|
2508
|
+
return end(code);
|
|
2509
|
+
}
|
|
2510
|
+
__name(tagCloseBetween, "tagCloseBetween");
|
|
2511
|
+
function tagOpen(code) {
|
|
2512
|
+
if (code === 45 || asciiAlphanumeric(code)) {
|
|
2513
|
+
effects.consume(code);
|
|
2514
|
+
return tagOpen;
|
|
2515
|
+
}
|
|
2516
|
+
if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
|
|
2517
|
+
return tagOpenBetween(code);
|
|
2518
|
+
}
|
|
2519
|
+
return nok(code);
|
|
2520
|
+
}
|
|
2521
|
+
__name(tagOpen, "tagOpen");
|
|
2522
|
+
function tagOpenBetween(code) {
|
|
2523
|
+
if (code === 47) {
|
|
2524
|
+
effects.consume(code);
|
|
2525
|
+
return end;
|
|
2526
|
+
}
|
|
2527
|
+
if (code === 58 || code === 95 || asciiAlpha(code)) {
|
|
2528
|
+
effects.consume(code);
|
|
2529
|
+
return tagOpenAttributeName;
|
|
2530
|
+
}
|
|
2531
|
+
if (markdownLineEnding(code)) {
|
|
2532
|
+
returnState = tagOpenBetween;
|
|
2533
|
+
return lineEndingBefore(code);
|
|
2534
|
+
}
|
|
2535
|
+
if (markdownSpace(code)) {
|
|
2536
|
+
effects.consume(code);
|
|
2537
|
+
return tagOpenBetween;
|
|
2538
|
+
}
|
|
2539
|
+
return end(code);
|
|
2540
|
+
}
|
|
2541
|
+
__name(tagOpenBetween, "tagOpenBetween");
|
|
2542
|
+
function tagOpenAttributeName(code) {
|
|
2543
|
+
if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {
|
|
2544
|
+
effects.consume(code);
|
|
2545
|
+
return tagOpenAttributeName;
|
|
2546
|
+
}
|
|
2547
|
+
return tagOpenAttributeNameAfter(code);
|
|
2548
|
+
}
|
|
2549
|
+
__name(tagOpenAttributeName, "tagOpenAttributeName");
|
|
2550
|
+
function tagOpenAttributeNameAfter(code) {
|
|
2551
|
+
if (code === 61) {
|
|
2552
|
+
effects.consume(code);
|
|
2553
|
+
return tagOpenAttributeValueBefore;
|
|
2554
|
+
}
|
|
2555
|
+
if (markdownLineEnding(code)) {
|
|
2556
|
+
returnState = tagOpenAttributeNameAfter;
|
|
2557
|
+
return lineEndingBefore(code);
|
|
2558
|
+
}
|
|
2559
|
+
if (markdownSpace(code)) {
|
|
2560
|
+
effects.consume(code);
|
|
2561
|
+
return tagOpenAttributeNameAfter;
|
|
2562
|
+
}
|
|
2563
|
+
return tagOpenBetween(code);
|
|
2564
|
+
}
|
|
2565
|
+
__name(tagOpenAttributeNameAfter, "tagOpenAttributeNameAfter");
|
|
2566
|
+
function tagOpenAttributeValueBefore(code) {
|
|
2567
|
+
if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {
|
|
2568
|
+
return nok(code);
|
|
2569
|
+
}
|
|
2570
|
+
if (code === 34 || code === 39) {
|
|
2571
|
+
effects.consume(code);
|
|
2572
|
+
marker = code;
|
|
2573
|
+
return tagOpenAttributeValueQuoted;
|
|
2574
|
+
}
|
|
2575
|
+
if (markdownLineEnding(code)) {
|
|
2576
|
+
returnState = tagOpenAttributeValueBefore;
|
|
2577
|
+
return lineEndingBefore(code);
|
|
2578
|
+
}
|
|
2579
|
+
if (markdownSpace(code)) {
|
|
2580
|
+
effects.consume(code);
|
|
2581
|
+
return tagOpenAttributeValueBefore;
|
|
2582
|
+
}
|
|
2583
|
+
effects.consume(code);
|
|
2584
|
+
return tagOpenAttributeValueUnquoted;
|
|
2585
|
+
}
|
|
2586
|
+
__name(tagOpenAttributeValueBefore, "tagOpenAttributeValueBefore");
|
|
2587
|
+
function tagOpenAttributeValueQuoted(code) {
|
|
2588
|
+
if (code === marker) {
|
|
2589
|
+
effects.consume(code);
|
|
2590
|
+
marker = void 0;
|
|
2591
|
+
return tagOpenAttributeValueQuotedAfter;
|
|
2592
|
+
}
|
|
2593
|
+
if (code === null) {
|
|
2594
|
+
return nok(code);
|
|
2595
|
+
}
|
|
2596
|
+
if (markdownLineEnding(code)) {
|
|
2597
|
+
returnState = tagOpenAttributeValueQuoted;
|
|
2598
|
+
return lineEndingBefore(code);
|
|
2599
|
+
}
|
|
2600
|
+
effects.consume(code);
|
|
2601
|
+
return tagOpenAttributeValueQuoted;
|
|
2602
|
+
}
|
|
2603
|
+
__name(tagOpenAttributeValueQuoted, "tagOpenAttributeValueQuoted");
|
|
2604
|
+
function tagOpenAttributeValueUnquoted(code) {
|
|
2605
|
+
if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) {
|
|
2606
|
+
return nok(code);
|
|
2607
|
+
}
|
|
2608
|
+
if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
|
|
2609
|
+
return tagOpenBetween(code);
|
|
2610
|
+
}
|
|
2611
|
+
effects.consume(code);
|
|
2612
|
+
return tagOpenAttributeValueUnquoted;
|
|
2613
|
+
}
|
|
2614
|
+
__name(tagOpenAttributeValueUnquoted, "tagOpenAttributeValueUnquoted");
|
|
2615
|
+
function tagOpenAttributeValueQuotedAfter(code) {
|
|
2616
|
+
if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
|
|
2617
|
+
return tagOpenBetween(code);
|
|
2618
|
+
}
|
|
2619
|
+
return nok(code);
|
|
2620
|
+
}
|
|
2621
|
+
__name(tagOpenAttributeValueQuotedAfter, "tagOpenAttributeValueQuotedAfter");
|
|
2622
|
+
function end(code) {
|
|
2623
|
+
if (code === 62) {
|
|
2624
|
+
effects.consume(code);
|
|
2625
|
+
effects.exit("htmlTextData");
|
|
2626
|
+
effects.exit("htmlText");
|
|
2627
|
+
return ok;
|
|
2628
|
+
}
|
|
2629
|
+
return nok(code);
|
|
2630
|
+
}
|
|
2631
|
+
__name(end, "end");
|
|
2632
|
+
function lineEndingBefore(code) {
|
|
2633
|
+
effects.exit("htmlTextData");
|
|
2634
|
+
effects.enter("lineEnding");
|
|
2635
|
+
effects.consume(code);
|
|
2636
|
+
effects.exit("lineEnding");
|
|
2637
|
+
return lineEndingAfter;
|
|
2638
|
+
}
|
|
2639
|
+
__name(lineEndingBefore, "lineEndingBefore");
|
|
2640
|
+
function lineEndingAfter(code) {
|
|
2641
|
+
return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code) : lineEndingAfterPrefix(code);
|
|
2642
|
+
}
|
|
2643
|
+
__name(lineEndingAfter, "lineEndingAfter");
|
|
2644
|
+
function lineEndingAfterPrefix(code) {
|
|
2645
|
+
effects.enter("htmlTextData");
|
|
2646
|
+
return returnState(code);
|
|
2647
|
+
}
|
|
2648
|
+
__name(lineEndingAfterPrefix, "lineEndingAfterPrefix");
|
|
2649
|
+
}
|
|
2650
|
+
__name(tokenizeHtmlText, "tokenizeHtmlText");
|
|
2651
|
+
|
|
2652
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/label-end.js
|
|
2653
|
+
var labelEnd = {
|
|
2654
|
+
name: "labelEnd",
|
|
2655
|
+
resolveAll: resolveAllLabelEnd,
|
|
2656
|
+
resolveTo: resolveToLabelEnd,
|
|
2657
|
+
tokenize: tokenizeLabelEnd
|
|
2658
|
+
};
|
|
2659
|
+
var resourceConstruct = {
|
|
2660
|
+
tokenize: tokenizeResource
|
|
2661
|
+
};
|
|
2662
|
+
var referenceFullConstruct = {
|
|
2663
|
+
tokenize: tokenizeReferenceFull
|
|
2664
|
+
};
|
|
2665
|
+
var referenceCollapsedConstruct = {
|
|
2666
|
+
tokenize: tokenizeReferenceCollapsed
|
|
2667
|
+
};
|
|
2668
|
+
function resolveAllLabelEnd(events) {
|
|
2669
|
+
let index = -1;
|
|
2670
|
+
const newEvents = [];
|
|
2671
|
+
while (++index < events.length) {
|
|
2672
|
+
const token = events[index][1];
|
|
2673
|
+
newEvents.push(events[index]);
|
|
2674
|
+
if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") {
|
|
2675
|
+
const offset = token.type === "labelImage" ? 4 : 2;
|
|
2676
|
+
token.type = "data";
|
|
2677
|
+
index += offset;
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
if (events.length !== newEvents.length) {
|
|
2681
|
+
splice(events, 0, events.length, newEvents);
|
|
2682
|
+
}
|
|
2683
|
+
return events;
|
|
2684
|
+
}
|
|
2685
|
+
__name(resolveAllLabelEnd, "resolveAllLabelEnd");
|
|
2686
|
+
function resolveToLabelEnd(events, context) {
|
|
2687
|
+
let index = events.length;
|
|
2688
|
+
let offset = 0;
|
|
2689
|
+
let open;
|
|
2690
|
+
let close;
|
|
2691
|
+
let media;
|
|
2692
|
+
while (index--) {
|
|
2693
|
+
const token = events[index][1];
|
|
2694
|
+
if (open) {
|
|
2695
|
+
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
2696
|
+
break;
|
|
2697
|
+
}
|
|
2698
|
+
if (events[index][0] === "enter" && token.type === "labelLink") {
|
|
2699
|
+
token._inactive = true;
|
|
2700
|
+
}
|
|
2701
|
+
} else if (close) {
|
|
2702
|
+
if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) {
|
|
2703
|
+
open = index;
|
|
2704
|
+
if (token.type !== "labelLink") {
|
|
2705
|
+
offset = 2;
|
|
2706
|
+
break;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
} else if (token.type === "labelEnd") {
|
|
2710
|
+
close = index;
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
const group = {
|
|
2714
|
+
type: events[open][1].type === "labelLink" ? "link" : "image",
|
|
2715
|
+
start: {
|
|
2716
|
+
...events[open][1].start
|
|
2717
|
+
},
|
|
2718
|
+
end: {
|
|
2719
|
+
...events[events.length - 1][1].end
|
|
2720
|
+
}
|
|
2721
|
+
};
|
|
2722
|
+
const label = {
|
|
2723
|
+
type: "label",
|
|
2724
|
+
start: {
|
|
2725
|
+
...events[open][1].start
|
|
2726
|
+
},
|
|
2727
|
+
end: {
|
|
2728
|
+
...events[close][1].end
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
const text = {
|
|
2732
|
+
type: "labelText",
|
|
2733
|
+
start: {
|
|
2734
|
+
...events[open + offset + 2][1].end
|
|
2735
|
+
},
|
|
2736
|
+
end: {
|
|
2737
|
+
...events[close - 2][1].start
|
|
2738
|
+
}
|
|
2739
|
+
};
|
|
2740
|
+
media = [["enter", group, context], ["enter", label, context]];
|
|
2741
|
+
media = push(media, events.slice(open + 1, open + offset + 3));
|
|
2742
|
+
media = push(media, [["enter", text, context]]);
|
|
2743
|
+
media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));
|
|
2744
|
+
media = push(media, [["exit", text, context], events[close - 2], events[close - 1], ["exit", label, context]]);
|
|
2745
|
+
media = push(media, events.slice(close + 1));
|
|
2746
|
+
media = push(media, [["exit", group, context]]);
|
|
2747
|
+
splice(events, open, events.length, media);
|
|
2748
|
+
return events;
|
|
2749
|
+
}
|
|
2750
|
+
__name(resolveToLabelEnd, "resolveToLabelEnd");
|
|
2751
|
+
function tokenizeLabelEnd(effects, ok, nok) {
|
|
2752
|
+
const self = this;
|
|
2753
|
+
const labelStarts = self._labelStarts;
|
|
2754
|
+
let labelStart;
|
|
2755
|
+
let defined;
|
|
2756
|
+
if (labelStarts) {
|
|
2757
|
+
while (labelStarts.length > 0 && labelStarts[labelStarts.length - 1]._balanced) {
|
|
2758
|
+
labelStarts.pop();
|
|
2759
|
+
}
|
|
2760
|
+
labelStart = labelStarts[labelStarts.length - 1];
|
|
2761
|
+
}
|
|
2762
|
+
return start;
|
|
2763
|
+
function start(code) {
|
|
2764
|
+
if (!labelStart) {
|
|
2765
|
+
return nok(code);
|
|
2766
|
+
}
|
|
2767
|
+
if (labelStart._inactive) {
|
|
2768
|
+
return labelEndNok(code);
|
|
2769
|
+
}
|
|
2770
|
+
defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({
|
|
2771
|
+
start: labelStart.end,
|
|
2772
|
+
end: self.now()
|
|
2773
|
+
})));
|
|
2774
|
+
effects.enter("labelEnd");
|
|
2775
|
+
effects.enter("labelMarker");
|
|
2776
|
+
effects.consume(code);
|
|
2777
|
+
effects.exit("labelMarker");
|
|
2778
|
+
effects.exit("labelEnd");
|
|
2779
|
+
return after;
|
|
2780
|
+
}
|
|
2781
|
+
__name(start, "start");
|
|
2782
|
+
function after(code) {
|
|
2783
|
+
if (code === 40) {
|
|
2784
|
+
return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);
|
|
2785
|
+
}
|
|
2786
|
+
if (code === 91) {
|
|
2787
|
+
return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);
|
|
2788
|
+
}
|
|
2789
|
+
return defined ? labelEndOk(code) : labelEndNok(code);
|
|
2790
|
+
}
|
|
2791
|
+
__name(after, "after");
|
|
2792
|
+
function referenceNotFull(code) {
|
|
2793
|
+
return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);
|
|
2794
|
+
}
|
|
2795
|
+
__name(referenceNotFull, "referenceNotFull");
|
|
2796
|
+
function labelEndOk(code) {
|
|
2797
|
+
labelStarts.pop();
|
|
2798
|
+
return ok(code);
|
|
2799
|
+
}
|
|
2800
|
+
__name(labelEndOk, "labelEndOk");
|
|
2801
|
+
function labelEndNok(code) {
|
|
2802
|
+
labelStart._balanced = true;
|
|
2803
|
+
return nok(code);
|
|
2804
|
+
}
|
|
2805
|
+
__name(labelEndNok, "labelEndNok");
|
|
2806
|
+
}
|
|
2807
|
+
__name(tokenizeLabelEnd, "tokenizeLabelEnd");
|
|
2808
|
+
function tokenizeResource(effects, ok, nok) {
|
|
2809
|
+
return resourceStart;
|
|
2810
|
+
function resourceStart(code) {
|
|
2811
|
+
effects.enter("resource");
|
|
2812
|
+
effects.enter("resourceMarker");
|
|
2813
|
+
effects.consume(code);
|
|
2814
|
+
effects.exit("resourceMarker");
|
|
2815
|
+
return resourceBefore;
|
|
2816
|
+
}
|
|
2817
|
+
__name(resourceStart, "resourceStart");
|
|
2818
|
+
function resourceBefore(code) {
|
|
2819
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);
|
|
2820
|
+
}
|
|
2821
|
+
__name(resourceBefore, "resourceBefore");
|
|
2822
|
+
function resourceOpen(code) {
|
|
2823
|
+
if (code === 41) {
|
|
2824
|
+
return resourceEnd(code);
|
|
2825
|
+
}
|
|
2826
|
+
return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(code);
|
|
2827
|
+
}
|
|
2828
|
+
__name(resourceOpen, "resourceOpen");
|
|
2829
|
+
function resourceDestinationAfter(code) {
|
|
2830
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);
|
|
2831
|
+
}
|
|
2832
|
+
__name(resourceDestinationAfter, "resourceDestinationAfter");
|
|
2833
|
+
function resourceDestinationMissing(code) {
|
|
2834
|
+
return nok(code);
|
|
2835
|
+
}
|
|
2836
|
+
__name(resourceDestinationMissing, "resourceDestinationMissing");
|
|
2837
|
+
function resourceBetween(code) {
|
|
2838
|
+
if (code === 34 || code === 39 || code === 40) {
|
|
2839
|
+
return factoryTitle(effects, resourceTitleAfter, nok, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(code);
|
|
2840
|
+
}
|
|
2841
|
+
return resourceEnd(code);
|
|
2842
|
+
}
|
|
2843
|
+
__name(resourceBetween, "resourceBetween");
|
|
2844
|
+
function resourceTitleAfter(code) {
|
|
2845
|
+
return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);
|
|
2846
|
+
}
|
|
2847
|
+
__name(resourceTitleAfter, "resourceTitleAfter");
|
|
2848
|
+
function resourceEnd(code) {
|
|
2849
|
+
if (code === 41) {
|
|
2850
|
+
effects.enter("resourceMarker");
|
|
2851
|
+
effects.consume(code);
|
|
2852
|
+
effects.exit("resourceMarker");
|
|
2853
|
+
effects.exit("resource");
|
|
2854
|
+
return ok;
|
|
2855
|
+
}
|
|
2856
|
+
return nok(code);
|
|
2857
|
+
}
|
|
2858
|
+
__name(resourceEnd, "resourceEnd");
|
|
2859
|
+
}
|
|
2860
|
+
__name(tokenizeResource, "tokenizeResource");
|
|
2861
|
+
function tokenizeReferenceFull(effects, ok, nok) {
|
|
2862
|
+
const self = this;
|
|
2863
|
+
return referenceFull;
|
|
2864
|
+
function referenceFull(code) {
|
|
2865
|
+
return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, "reference", "referenceMarker", "referenceString")(code);
|
|
2866
|
+
}
|
|
2867
|
+
__name(referenceFull, "referenceFull");
|
|
2868
|
+
function referenceFullAfter(code) {
|
|
2869
|
+
return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);
|
|
2870
|
+
}
|
|
2871
|
+
__name(referenceFullAfter, "referenceFullAfter");
|
|
2872
|
+
function referenceFullMissing(code) {
|
|
2873
|
+
return nok(code);
|
|
2874
|
+
}
|
|
2875
|
+
__name(referenceFullMissing, "referenceFullMissing");
|
|
2876
|
+
}
|
|
2877
|
+
__name(tokenizeReferenceFull, "tokenizeReferenceFull");
|
|
2878
|
+
function tokenizeReferenceCollapsed(effects, ok, nok) {
|
|
2879
|
+
return referenceCollapsedStart;
|
|
2880
|
+
function referenceCollapsedStart(code) {
|
|
2881
|
+
effects.enter("reference");
|
|
2882
|
+
effects.enter("referenceMarker");
|
|
2883
|
+
effects.consume(code);
|
|
2884
|
+
effects.exit("referenceMarker");
|
|
2885
|
+
return referenceCollapsedOpen;
|
|
2886
|
+
}
|
|
2887
|
+
__name(referenceCollapsedStart, "referenceCollapsedStart");
|
|
2888
|
+
function referenceCollapsedOpen(code) {
|
|
2889
|
+
if (code === 93) {
|
|
2890
|
+
effects.enter("referenceMarker");
|
|
2891
|
+
effects.consume(code);
|
|
2892
|
+
effects.exit("referenceMarker");
|
|
2893
|
+
effects.exit("reference");
|
|
2894
|
+
return ok;
|
|
2895
|
+
}
|
|
2896
|
+
return nok(code);
|
|
2897
|
+
}
|
|
2898
|
+
__name(referenceCollapsedOpen, "referenceCollapsedOpen");
|
|
2899
|
+
}
|
|
2900
|
+
__name(tokenizeReferenceCollapsed, "tokenizeReferenceCollapsed");
|
|
2901
|
+
|
|
2902
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/label-start-image.js
|
|
2903
|
+
var labelStartImage = {
|
|
2904
|
+
name: "labelStartImage",
|
|
2905
|
+
resolveAll: labelEnd.resolveAll,
|
|
2906
|
+
tokenize: tokenizeLabelStartImage
|
|
2907
|
+
};
|
|
2908
|
+
function tokenizeLabelStartImage(effects, ok, nok) {
|
|
2909
|
+
const self = this;
|
|
2910
|
+
let labelImage;
|
|
2911
|
+
return start;
|
|
2912
|
+
function start(code) {
|
|
2913
|
+
effects.enter("labelImage");
|
|
2914
|
+
effects.enter("labelImageMarker");
|
|
2915
|
+
effects.consume(code);
|
|
2916
|
+
effects.exit("labelImageMarker");
|
|
2917
|
+
return open;
|
|
2918
|
+
}
|
|
2919
|
+
__name(start, "start");
|
|
2920
|
+
function open(code) {
|
|
2921
|
+
if (code === 91) {
|
|
2922
|
+
effects.enter("labelMarker");
|
|
2923
|
+
effects.consume(code);
|
|
2924
|
+
effects.exit("labelMarker");
|
|
2925
|
+
labelImage = effects.exit("labelImage");
|
|
2926
|
+
return after;
|
|
2927
|
+
}
|
|
2928
|
+
return nok(code);
|
|
2929
|
+
}
|
|
2930
|
+
__name(open, "open");
|
|
2931
|
+
function after(code) {
|
|
2932
|
+
if (code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs) {
|
|
2933
|
+
return nok(code);
|
|
2934
|
+
}
|
|
2935
|
+
self._labelStarts = self._labelStarts || [];
|
|
2936
|
+
self._labelStarts.push(labelImage);
|
|
2937
|
+
return ok(code);
|
|
2938
|
+
}
|
|
2939
|
+
__name(after, "after");
|
|
2940
|
+
}
|
|
2941
|
+
__name(tokenizeLabelStartImage, "tokenizeLabelStartImage");
|
|
2942
|
+
|
|
2943
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/label-start-link.js
|
|
2944
|
+
var labelStartLink = {
|
|
2945
|
+
name: "labelStartLink",
|
|
2946
|
+
resolveAll: labelEnd.resolveAll,
|
|
2947
|
+
tokenize: tokenizeLabelStartLink
|
|
2948
|
+
};
|
|
2949
|
+
function tokenizeLabelStartLink(effects, ok, nok) {
|
|
2950
|
+
const self = this;
|
|
2951
|
+
let labelLink;
|
|
2952
|
+
return start;
|
|
2953
|
+
function start(code) {
|
|
2954
|
+
effects.enter("labelLink");
|
|
2955
|
+
effects.enter("labelMarker");
|
|
2956
|
+
effects.consume(code);
|
|
2957
|
+
effects.exit("labelMarker");
|
|
2958
|
+
labelLink = effects.exit("labelLink");
|
|
2959
|
+
return after;
|
|
2960
|
+
}
|
|
2961
|
+
__name(start, "start");
|
|
2962
|
+
function after(code) {
|
|
2963
|
+
if (code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs) {
|
|
2964
|
+
return nok(code);
|
|
2965
|
+
}
|
|
2966
|
+
self._labelStarts = self._labelStarts || [];
|
|
2967
|
+
self._labelStarts.push(labelLink);
|
|
2968
|
+
return ok(code);
|
|
2969
|
+
}
|
|
2970
|
+
__name(after, "after");
|
|
2971
|
+
}
|
|
2972
|
+
__name(tokenizeLabelStartLink, "tokenizeLabelStartLink");
|
|
2973
|
+
|
|
2974
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/line-ending.js
|
|
2975
|
+
var lineEnding = {
|
|
2976
|
+
name: "lineEnding",
|
|
2977
|
+
tokenize: tokenizeLineEnding
|
|
2978
|
+
};
|
|
2979
|
+
function tokenizeLineEnding(effects, ok) {
|
|
2980
|
+
return start;
|
|
2981
|
+
function start(code) {
|
|
2982
|
+
effects.enter("lineEnding");
|
|
2983
|
+
effects.consume(code);
|
|
2984
|
+
effects.exit("lineEnding");
|
|
2985
|
+
return factorySpace(effects, ok, "linePrefix");
|
|
2986
|
+
}
|
|
2987
|
+
__name(start, "start");
|
|
2988
|
+
}
|
|
2989
|
+
__name(tokenizeLineEnding, "tokenizeLineEnding");
|
|
2990
|
+
|
|
2991
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/thematic-break.js
|
|
2992
|
+
var thematicBreak = {
|
|
2993
|
+
name: "thematicBreak",
|
|
2994
|
+
tokenize: tokenizeThematicBreak
|
|
2995
|
+
};
|
|
2996
|
+
function tokenizeThematicBreak(effects, ok, nok) {
|
|
2997
|
+
let size = 0;
|
|
2998
|
+
let marker;
|
|
2999
|
+
return start;
|
|
3000
|
+
function start(code) {
|
|
3001
|
+
effects.enter("thematicBreak");
|
|
3002
|
+
return before(code);
|
|
3003
|
+
}
|
|
3004
|
+
__name(start, "start");
|
|
3005
|
+
function before(code) {
|
|
3006
|
+
marker = code;
|
|
3007
|
+
return atBreak(code);
|
|
3008
|
+
}
|
|
3009
|
+
__name(before, "before");
|
|
3010
|
+
function atBreak(code) {
|
|
3011
|
+
if (code === marker) {
|
|
3012
|
+
effects.enter("thematicBreakSequence");
|
|
3013
|
+
return sequence(code);
|
|
3014
|
+
}
|
|
3015
|
+
if (size >= 3 && (code === null || markdownLineEnding(code))) {
|
|
3016
|
+
effects.exit("thematicBreak");
|
|
3017
|
+
return ok(code);
|
|
3018
|
+
}
|
|
3019
|
+
return nok(code);
|
|
3020
|
+
}
|
|
3021
|
+
__name(atBreak, "atBreak");
|
|
3022
|
+
function sequence(code) {
|
|
3023
|
+
if (code === marker) {
|
|
3024
|
+
effects.consume(code);
|
|
3025
|
+
size++;
|
|
3026
|
+
return sequence;
|
|
3027
|
+
}
|
|
3028
|
+
effects.exit("thematicBreakSequence");
|
|
3029
|
+
return markdownSpace(code) ? factorySpace(effects, atBreak, "whitespace")(code) : atBreak(code);
|
|
3030
|
+
}
|
|
3031
|
+
__name(sequence, "sequence");
|
|
3032
|
+
}
|
|
3033
|
+
__name(tokenizeThematicBreak, "tokenizeThematicBreak");
|
|
3034
|
+
|
|
3035
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/list.js
|
|
3036
|
+
var list = {
|
|
3037
|
+
continuation: {
|
|
3038
|
+
tokenize: tokenizeListContinuation
|
|
3039
|
+
},
|
|
3040
|
+
exit: tokenizeListEnd,
|
|
3041
|
+
name: "list",
|
|
3042
|
+
tokenize: tokenizeListStart
|
|
3043
|
+
};
|
|
3044
|
+
var listItemPrefixWhitespaceConstruct = {
|
|
3045
|
+
partial: true,
|
|
3046
|
+
tokenize: tokenizeListItemPrefixWhitespace
|
|
3047
|
+
};
|
|
3048
|
+
var indentConstruct = {
|
|
3049
|
+
partial: true,
|
|
3050
|
+
tokenize: tokenizeIndent
|
|
3051
|
+
};
|
|
3052
|
+
function tokenizeListStart(effects, ok, nok) {
|
|
3053
|
+
const self = this;
|
|
3054
|
+
const tail = self.events[self.events.length - 1];
|
|
3055
|
+
let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
|
|
3056
|
+
let size = 0;
|
|
3057
|
+
return start;
|
|
3058
|
+
function start(code) {
|
|
3059
|
+
const kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered");
|
|
3060
|
+
if (kind === "listUnordered" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) {
|
|
3061
|
+
if (!self.containerState.type) {
|
|
3062
|
+
self.containerState.type = kind;
|
|
3063
|
+
effects.enter(kind, {
|
|
3064
|
+
_container: true
|
|
3065
|
+
});
|
|
3066
|
+
}
|
|
3067
|
+
if (kind === "listUnordered") {
|
|
3068
|
+
effects.enter("listItemPrefix");
|
|
3069
|
+
return code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code);
|
|
3070
|
+
}
|
|
3071
|
+
if (!self.interrupt || code === 49) {
|
|
3072
|
+
effects.enter("listItemPrefix");
|
|
3073
|
+
effects.enter("listItemValue");
|
|
3074
|
+
return inside(code);
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
return nok(code);
|
|
3078
|
+
}
|
|
3079
|
+
__name(start, "start");
|
|
3080
|
+
function inside(code) {
|
|
3081
|
+
if (asciiDigit(code) && ++size < 10) {
|
|
3082
|
+
effects.consume(code);
|
|
3083
|
+
return inside;
|
|
3084
|
+
}
|
|
3085
|
+
if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) {
|
|
3086
|
+
effects.exit("listItemValue");
|
|
3087
|
+
return atMarker(code);
|
|
3088
|
+
}
|
|
3089
|
+
return nok(code);
|
|
3090
|
+
}
|
|
3091
|
+
__name(inside, "inside");
|
|
3092
|
+
function atMarker(code) {
|
|
3093
|
+
effects.enter("listItemMarker");
|
|
3094
|
+
effects.consume(code);
|
|
3095
|
+
effects.exit("listItemMarker");
|
|
3096
|
+
self.containerState.marker = self.containerState.marker || code;
|
|
3097
|
+
return effects.check(
|
|
3098
|
+
blankLine,
|
|
3099
|
+
// Can’t be empty when interrupting.
|
|
3100
|
+
self.interrupt ? nok : onBlank,
|
|
3101
|
+
effects.attempt(listItemPrefixWhitespaceConstruct, endOfPrefix, otherPrefix)
|
|
3102
|
+
);
|
|
3103
|
+
}
|
|
3104
|
+
__name(atMarker, "atMarker");
|
|
3105
|
+
function onBlank(code) {
|
|
3106
|
+
self.containerState.initialBlankLine = true;
|
|
3107
|
+
initialSize++;
|
|
3108
|
+
return endOfPrefix(code);
|
|
3109
|
+
}
|
|
3110
|
+
__name(onBlank, "onBlank");
|
|
3111
|
+
function otherPrefix(code) {
|
|
3112
|
+
if (markdownSpace(code)) {
|
|
3113
|
+
effects.enter("listItemPrefixWhitespace");
|
|
3114
|
+
effects.consume(code);
|
|
3115
|
+
effects.exit("listItemPrefixWhitespace");
|
|
3116
|
+
return endOfPrefix;
|
|
3117
|
+
}
|
|
3118
|
+
return nok(code);
|
|
3119
|
+
}
|
|
3120
|
+
__name(otherPrefix, "otherPrefix");
|
|
3121
|
+
function endOfPrefix(code) {
|
|
3122
|
+
self.containerState.size = initialSize + self.sliceSerialize(effects.exit("listItemPrefix"), true).length;
|
|
3123
|
+
return ok(code);
|
|
3124
|
+
}
|
|
3125
|
+
__name(endOfPrefix, "endOfPrefix");
|
|
3126
|
+
}
|
|
3127
|
+
__name(tokenizeListStart, "tokenizeListStart");
|
|
3128
|
+
function tokenizeListContinuation(effects, ok, nok) {
|
|
3129
|
+
const self = this;
|
|
3130
|
+
self.containerState._closeFlow = void 0;
|
|
3131
|
+
return effects.check(blankLine, onBlank, notBlank);
|
|
3132
|
+
function onBlank(code) {
|
|
3133
|
+
self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine;
|
|
3134
|
+
return factorySpace(effects, ok, "listItemIndent", self.containerState.size + 1)(code);
|
|
3135
|
+
}
|
|
3136
|
+
__name(onBlank, "onBlank");
|
|
3137
|
+
function notBlank(code) {
|
|
3138
|
+
if (self.containerState.furtherBlankLines || !markdownSpace(code)) {
|
|
3139
|
+
self.containerState.furtherBlankLines = void 0;
|
|
3140
|
+
self.containerState.initialBlankLine = void 0;
|
|
3141
|
+
return notInCurrentItem(code);
|
|
3142
|
+
}
|
|
3143
|
+
self.containerState.furtherBlankLines = void 0;
|
|
3144
|
+
self.containerState.initialBlankLine = void 0;
|
|
3145
|
+
return effects.attempt(indentConstruct, ok, notInCurrentItem)(code);
|
|
3146
|
+
}
|
|
3147
|
+
__name(notBlank, "notBlank");
|
|
3148
|
+
function notInCurrentItem(code) {
|
|
3149
|
+
self.containerState._closeFlow = true;
|
|
3150
|
+
self.interrupt = void 0;
|
|
3151
|
+
return factorySpace(effects, effects.attempt(list, ok, nok), "linePrefix", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code);
|
|
3152
|
+
}
|
|
3153
|
+
__name(notInCurrentItem, "notInCurrentItem");
|
|
3154
|
+
}
|
|
3155
|
+
__name(tokenizeListContinuation, "tokenizeListContinuation");
|
|
3156
|
+
function tokenizeIndent(effects, ok, nok) {
|
|
3157
|
+
const self = this;
|
|
3158
|
+
return factorySpace(effects, afterPrefix, "listItemIndent", self.containerState.size + 1);
|
|
3159
|
+
function afterPrefix(code) {
|
|
3160
|
+
const tail = self.events[self.events.length - 1];
|
|
3161
|
+
return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok(code) : nok(code);
|
|
3162
|
+
}
|
|
3163
|
+
__name(afterPrefix, "afterPrefix");
|
|
3164
|
+
}
|
|
3165
|
+
__name(tokenizeIndent, "tokenizeIndent");
|
|
3166
|
+
function tokenizeListEnd(effects) {
|
|
3167
|
+
effects.exit(this.containerState.type);
|
|
3168
|
+
}
|
|
3169
|
+
__name(tokenizeListEnd, "tokenizeListEnd");
|
|
3170
|
+
function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
|
|
3171
|
+
const self = this;
|
|
3172
|
+
return factorySpace(effects, afterPrefix, "listItemPrefixWhitespace", self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1);
|
|
3173
|
+
function afterPrefix(code) {
|
|
3174
|
+
const tail = self.events[self.events.length - 1];
|
|
3175
|
+
return !markdownSpace(code) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code) : nok(code);
|
|
3176
|
+
}
|
|
3177
|
+
__name(afterPrefix, "afterPrefix");
|
|
3178
|
+
}
|
|
3179
|
+
__name(tokenizeListItemPrefixWhitespace, "tokenizeListItemPrefixWhitespace");
|
|
3180
|
+
|
|
3181
|
+
// node_modules/.pnpm/micromark-util-edit-map@1.0.0/node_modules/micromark-util-edit-map/index.js
|
|
3182
|
+
var EditMap = class {
|
|
3183
|
+
static {
|
|
3184
|
+
__name(this, "EditMap");
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3187
|
+
* Create a new edit map.
|
|
3188
|
+
*
|
|
3189
|
+
* @returns
|
|
3190
|
+
* New instance.
|
|
3191
|
+
*/
|
|
3192
|
+
constructor() {
|
|
3193
|
+
this.index = /* @__PURE__ */ new Map();
|
|
3194
|
+
this.map = [];
|
|
3195
|
+
}
|
|
3196
|
+
/**
|
|
3197
|
+
* Create an edit: a remove and/or add at a certain place.
|
|
3198
|
+
*
|
|
3199
|
+
* @param {number} index
|
|
3200
|
+
* Index at which to apply the edit.
|
|
3201
|
+
* @param {number} remove
|
|
3202
|
+
* Count of items to remove at the index.
|
|
3203
|
+
* @param {Array<Event>} add
|
|
3204
|
+
* Items to add at the index.
|
|
3205
|
+
* @returns {undefined}
|
|
3206
|
+
* Nothing.
|
|
3207
|
+
*/
|
|
3208
|
+
add(index, remove, add) {
|
|
3209
|
+
addImplementation(this, index, remove, add, false);
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* Create an edit: but insert `add` before existing additions, instead of
|
|
3213
|
+
* after them.
|
|
3214
|
+
*
|
|
3215
|
+
* @param {number} index
|
|
3216
|
+
* Index at which to apply the edit.
|
|
3217
|
+
* @param {number} remove
|
|
3218
|
+
* Count of items to remove at the index.
|
|
3219
|
+
* @param {Array<Event>} add
|
|
3220
|
+
* Items to add at the index.
|
|
3221
|
+
* @returns {undefined}
|
|
3222
|
+
* Nothing.
|
|
3223
|
+
*/
|
|
3224
|
+
addBefore(index, remove, add) {
|
|
3225
|
+
addImplementation(this, index, remove, add, true);
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* Done, change the events.
|
|
3229
|
+
*
|
|
3230
|
+
* @param {Array<Event>} events
|
|
3231
|
+
* List of events to apply the edits to.
|
|
3232
|
+
* @returns {undefined}
|
|
3233
|
+
* Nothing.
|
|
3234
|
+
*/
|
|
3235
|
+
consume(events) {
|
|
3236
|
+
this.map.sort(function(a, b) {
|
|
3237
|
+
return a[0] - b[0];
|
|
3238
|
+
});
|
|
3239
|
+
if (this.map.length === 0) {
|
|
3240
|
+
return;
|
|
3241
|
+
}
|
|
3242
|
+
let index = this.map.length;
|
|
3243
|
+
const vecs = [];
|
|
3244
|
+
while (index > 0) {
|
|
3245
|
+
index -= 1;
|
|
3246
|
+
vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);
|
|
3247
|
+
events.length = this.map[index][0];
|
|
3248
|
+
}
|
|
3249
|
+
vecs.push(events.slice());
|
|
3250
|
+
events.length = 0;
|
|
3251
|
+
let slice = vecs.pop();
|
|
3252
|
+
while (slice) {
|
|
3253
|
+
for (const element of slice) {
|
|
3254
|
+
events.push(element);
|
|
3255
|
+
}
|
|
3256
|
+
slice = vecs.pop();
|
|
3257
|
+
}
|
|
3258
|
+
this.map.length = 0;
|
|
3259
|
+
this.index.clear();
|
|
3260
|
+
}
|
|
3261
|
+
};
|
|
3262
|
+
function addImplementation(editMap, at, remove, add, before) {
|
|
3263
|
+
if (remove === 0 && add.length === 0) {
|
|
3264
|
+
return;
|
|
3265
|
+
}
|
|
3266
|
+
const existing = editMap.index.get(at);
|
|
3267
|
+
if (existing) {
|
|
3268
|
+
existing[1] += remove;
|
|
3269
|
+
if (before) {
|
|
3270
|
+
add.push(...existing[2]);
|
|
3271
|
+
existing[2] = add;
|
|
3272
|
+
} else {
|
|
3273
|
+
existing[2].push(...add);
|
|
3274
|
+
}
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3277
|
+
const change = [at, remove, add];
|
|
3278
|
+
editMap.map.push(change);
|
|
3279
|
+
editMap.index.set(at, change);
|
|
3280
|
+
}
|
|
3281
|
+
__name(addImplementation, "addImplementation");
|
|
3282
|
+
|
|
3283
|
+
// node_modules/.pnpm/micromark-core-commonmark@2.0.4/node_modules/micromark-core-commonmark/lib/setext-underline.js
|
|
3284
|
+
var setextUnderline = {
|
|
3285
|
+
name: "setextUnderline",
|
|
3286
|
+
resolveTo: resolveToSetextUnderline,
|
|
3287
|
+
tokenize: tokenizeSetextUnderline
|
|
3288
|
+
};
|
|
3289
|
+
function resolveToSetextUnderline(events, context) {
|
|
3290
|
+
const editMap = new EditMap();
|
|
3291
|
+
let index = events.length;
|
|
3292
|
+
let content2;
|
|
3293
|
+
let text;
|
|
3294
|
+
let definition2;
|
|
3295
|
+
while (index--) {
|
|
3296
|
+
if (events[index][0] === "enter") {
|
|
3297
|
+
if (events[index][1].type === "content") {
|
|
3298
|
+
content2 = index;
|
|
3299
|
+
break;
|
|
3300
|
+
}
|
|
3301
|
+
if (events[index][1].type === "paragraph") {
|
|
3302
|
+
text = index;
|
|
3303
|
+
}
|
|
3304
|
+
} else {
|
|
3305
|
+
if (events[index][1].type === "content") {
|
|
3306
|
+
editMap.add(index, 1, []);
|
|
3307
|
+
}
|
|
3308
|
+
if (!definition2 && events[index][1].type === "definition") {
|
|
3309
|
+
definition2 = index;
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
const heading = {
|
|
3314
|
+
type: "setextHeading",
|
|
3315
|
+
start: {
|
|
3316
|
+
...events[content2][1].start
|
|
3317
|
+
},
|
|
3318
|
+
end: {
|
|
3319
|
+
...events[events.length - 1][1].end
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
events[text][1].type = "setextHeadingText";
|
|
3323
|
+
if (definition2) {
|
|
3324
|
+
editMap.add(text, 0, [["enter", heading, context]]);
|
|
3325
|
+
editMap.add(definition2 + 1, 0, [["exit", events[content2][1], context]]);
|
|
3326
|
+
events[content2][1].end = {
|
|
3327
|
+
...events[definition2][1].end
|
|
3328
|
+
};
|
|
3329
|
+
} else {
|
|
3330
|
+
events[content2][1] = heading;
|
|
3331
|
+
}
|
|
3332
|
+
editMap.add(events.length, 0, [["exit", heading, context]]);
|
|
3333
|
+
editMap.consume(events);
|
|
3334
|
+
return events;
|
|
3335
|
+
}
|
|
3336
|
+
__name(resolveToSetextUnderline, "resolveToSetextUnderline");
|
|
3337
|
+
function tokenizeSetextUnderline(effects, ok, nok) {
|
|
3338
|
+
const self = this;
|
|
3339
|
+
let marker;
|
|
3340
|
+
return start;
|
|
3341
|
+
function start(code) {
|
|
3342
|
+
let index = self.events.length;
|
|
3343
|
+
let paragraph;
|
|
3344
|
+
while (index--) {
|
|
3345
|
+
if (self.events[index][1].type !== "lineEnding" && self.events[index][1].type !== "linePrefix" && self.events[index][1].type !== "content") {
|
|
3346
|
+
paragraph = self.events[index][1].type === "paragraph";
|
|
3347
|
+
break;
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
|
|
3351
|
+
effects.enter("setextHeadingLine");
|
|
3352
|
+
marker = code;
|
|
3353
|
+
return before(code);
|
|
3354
|
+
}
|
|
3355
|
+
return nok(code);
|
|
3356
|
+
}
|
|
3357
|
+
__name(start, "start");
|
|
3358
|
+
function before(code) {
|
|
3359
|
+
effects.enter("setextHeadingLineSequence");
|
|
3360
|
+
return inside(code);
|
|
3361
|
+
}
|
|
3362
|
+
__name(before, "before");
|
|
3363
|
+
function inside(code) {
|
|
3364
|
+
if (code === marker) {
|
|
3365
|
+
effects.consume(code);
|
|
3366
|
+
return inside;
|
|
3367
|
+
}
|
|
3368
|
+
effects.exit("setextHeadingLineSequence");
|
|
3369
|
+
return markdownSpace(code) ? factorySpace(effects, after, "lineSuffix")(code) : after(code);
|
|
3370
|
+
}
|
|
3371
|
+
__name(inside, "inside");
|
|
3372
|
+
function after(code) {
|
|
3373
|
+
if (code === null || markdownLineEnding(code)) {
|
|
3374
|
+
effects.exit("setextHeadingLine");
|
|
3375
|
+
return ok(code);
|
|
3376
|
+
}
|
|
3377
|
+
return nok(code);
|
|
3378
|
+
}
|
|
3379
|
+
__name(after, "after");
|
|
3380
|
+
}
|
|
3381
|
+
__name(tokenizeSetextUnderline, "tokenizeSetextUnderline");
|
|
3382
|
+
|
|
3383
|
+
export {
|
|
3384
|
+
splice,
|
|
3385
|
+
push,
|
|
3386
|
+
combineExtensions,
|
|
3387
|
+
combineHtmlExtensions,
|
|
3388
|
+
factorySpace,
|
|
3389
|
+
EditMap,
|
|
3390
|
+
resolveAll,
|
|
3391
|
+
attention,
|
|
3392
|
+
autolink,
|
|
3393
|
+
blankLine,
|
|
3394
|
+
blockQuote,
|
|
3395
|
+
characterEscape,
|
|
3396
|
+
characterReference,
|
|
3397
|
+
codeFenced,
|
|
3398
|
+
codeIndented,
|
|
3399
|
+
codeText,
|
|
3400
|
+
subtokenize,
|
|
3401
|
+
content,
|
|
3402
|
+
definition,
|
|
3403
|
+
hardBreakEscape,
|
|
3404
|
+
headingAtx,
|
|
3405
|
+
htmlFlow,
|
|
3406
|
+
htmlText,
|
|
3407
|
+
labelEnd,
|
|
3408
|
+
labelStartImage,
|
|
3409
|
+
labelStartLink,
|
|
3410
|
+
lineEnding,
|
|
3411
|
+
thematicBreak,
|
|
3412
|
+
list,
|
|
3413
|
+
setextUnderline
|
|
3414
|
+
};
|