@shell-shock/preset-cli 0.9.11 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +16 -0
- package/dist/_virtual/_rolldown/runtime.mjs +42 -0
- package/dist/components/banner-builtin.cjs +3 -3
- package/dist/components/banner-builtin.mjs +3 -3
- package/dist/components/banner-builtin.mjs.map +1 -1
- package/dist/components/command-entry.cjs +1 -0
- package/dist/components/command-entry.mjs +1 -0
- package/dist/components/command-entry.mjs.map +1 -1
- package/dist/components/upgrade-builtin.cjs +1 -1
- package/dist/components/upgrade-builtin.mjs +1 -1
- package/dist/components/upgrade-builtin.mjs.map +1 -1
- package/dist/components/virtual-command-entry.cjs +1 -0
- package/dist/components/virtual-command-entry.mjs +1 -0
- package/dist/components/virtual-command-entry.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.cjs +94 -0
- package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.mjs +94 -0
- package/dist/node_modules/.pnpm/@mdit_plugin-alert@0.23.2_markdown-it@14.1.1/node_modules/@mdit/plugin-alert/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.cjs +167 -0
- package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs +167 -0
- package/dist/node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.cjs +373 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs +374 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.cjs +60 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs +59 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.cjs +6 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs +6 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.cjs +6 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs +6 -0
- package/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.cjs +59 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +59 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.cjs +338 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs +333 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.cjs +6 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +6 -0
- package/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs.map +1 -0
- package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.cjs +4095 -0
- package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs +4093 -0
- package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.mjs.map +1 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.cjs +449 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs +450 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.cjs +47 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs +48 -0
- package/dist/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.cjs +94 -0
- package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs +94 -0
- package/dist/node_modules/.pnpm/markdown-it-abbr@2.0.0/node_modules/markdown-it-abbr/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.cjs +78 -0
- package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs +78 -0
- package/dist/node_modules/.pnpm/markdown-it-container@4.0.0/node_modules/markdown-it-container/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.cjs +123 -0
- package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs +123 -0
- package/dist/node_modules/.pnpm/markdown-it-deflist@3.0.0/node_modules/markdown-it-deflist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.cjs +246 -0
- package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs +244 -0
- package/dist/node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.cjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it-ins@4.0.0/node_modules/markdown-it-ins/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.cjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it-mark@4.0.0/node_modules/markdown-it-mark/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.cjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it-sub@2.0.0/node_modules/markdown-it-sub/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.cjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it-sup@2.0.0/node_modules/markdown-it-sup/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.cjs +94 -0
- package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs +92 -0
- package/dist/node_modules/.pnpm/markdown-it-task-lists@2.1.1/node_modules/markdown-it-task-lists/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.cjs +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/index.mjs +3 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.cjs +69 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs +69 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_blocks.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.cjs +9 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs +8 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/html_re.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.cjs +205 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs +189 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/common/utils.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.cjs +19 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs +15 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.cjs +61 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +62 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.cjs +35 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +35 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.cjs +43 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +44 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.cjs +488 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs +489 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.cjs +148 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs +149 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_block.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.cjs +51 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs +52 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_core.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.cjs +126 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs +127 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/parser_inline.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.cjs +57 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs +57 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/commonmark.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.cjs +23 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs +23 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/default.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.cjs +31 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs +31 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/presets/zero.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.cjs +217 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs +218 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/renderer.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.cjs +274 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs +274 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/ruler.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.cjs +107 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs +108 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.cjs +27 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs +27 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/code.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.cjs +48 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs +48 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/fence.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.cjs +35 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs +36 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/heading.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.cjs +26 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs +27 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/hr.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.cjs +72 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs +73 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.cjs +53 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs +53 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.cjs +157 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs +158 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/list.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.cjs +32 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs +32 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.cjs +140 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs +141 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.cjs +112 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs +113 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.cjs +139 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs +140 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.cjs +15 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs +15 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/block.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.cjs +12 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs +12 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/inline.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.cjs +81 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs +82 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.cjs +13 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs +13 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.cjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.cjs +112 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +113 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.cjs +14 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs +15 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.cjs +22 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs +22 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_core/text_join.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.cjs +55 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs +55 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.cjs +41 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs +41 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.cjs +62 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +62 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.cjs +64 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +64 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.cjs +45 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs +46 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.cjs +48 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs +49 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.cjs +22 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +22 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.cjs +34 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +35 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.cjs +82 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs +83 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/image.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.cjs +84 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs +85 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/link.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.cjs +42 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs +42 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/linkify.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.cjs +26 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs +27 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.cjs +74 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +75 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.cjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +80 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.cjs +41 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs +41 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_inline/text.mjs.map +1 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.cjs +157 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs +157 -0
- package/dist/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.cjs +21 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs +17 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.cjs +74 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs +74 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.cjs +57 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs +57 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.cjs +18 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs +18 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs.map +1 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.cjs +175 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs +175 -0
- package/dist/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs.map +1 -0
- package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.cjs +19 -0
- package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs +15 -0
- package/dist/node_modules/.pnpm/normalize-html-whitespace@1.0.0/node_modules/normalize-html-whitespace/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.cjs +104 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs +104 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/doctype.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.cjs +73 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs +68 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/error-codes.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.cjs +266 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs +262 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/foreign-content.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.cjs +575 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs +543 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/html.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.cjs +27 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs +21 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/token.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.cjs +105 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs +94 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/common/unicode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.cjs +33 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs +34 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.cjs +99 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs +93 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/formatting-element-list.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.cjs +2544 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs +2545 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.cjs +296 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs +297 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/parser/open-element-stack.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.cjs +26 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs +28 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/serializer/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.cjs +2069 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs +2069 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.cjs +156 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs +157 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs.map +1 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.cjs +166 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs +167 -0
- package/dist/node_modules/.pnpm/parse5@8.0.0/node_modules/parse5/dist/tree-adapters/default.mjs.map +1 -0
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.cjs +299 -0
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs +295 -0
- package/dist/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.cjs +25 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs +21 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.cjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs +6 -0
- package/dist/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.cjs +15 -0
- package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs +17 -0
- package/dist/node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.mjs.map +1 -0
- package/dist/{plugin-changelog → packages/plugin-changelog}/dist/components/changelog-command.cjs +5 -4
- package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs +4 -3
- package/dist/packages/plugin-changelog/dist/components/changelog-command.mjs.map +1 -1
- package/dist/{plugin-changelog → packages/plugin-changelog}/dist/index.cjs +1 -1
- package/dist/packages/unified/dist/html-DzncQodH.cjs +156 -0
- package/dist/packages/unified/dist/html-DzncQodH.mjs +157 -0
- package/dist/packages/unified/dist/html-DzncQodH.mjs.map +1 -0
- package/dist/packages/unified/dist/markdown/index.cjs +1 -0
- package/dist/packages/unified/dist/markdown/index.mjs +3 -0
- package/dist/packages/unified/dist/markdown-BiaU4FQg.cjs +82 -0
- package/dist/packages/unified/dist/markdown-BiaU4FQg.mjs +83 -0
- package/dist/packages/unified/dist/markdown-BiaU4FQg.mjs.map +1 -0
- package/package.json +35 -12
- package/dist/packages/unified/dist/markdown-Bs-BRrSC.mjs +0 -10
- package/dist/packages/unified/dist/markdown-Bs-BRrSC.mjs.map +0 -1
- package/dist/unified/dist/markdown-Bs-BRrSC.cjs +0 -10
- /package/dist/{plugin-changelog → packages/plugin-changelog}/dist/components/index.cjs +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { isSpace, normalizeReference } from "../common/utils.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs
|
|
4
|
+
function reference(state, startLine, _endLine, silent) {
|
|
5
|
+
let pos = state.bMarks[startLine] + state.tShift[startLine];
|
|
6
|
+
let max = state.eMarks[startLine];
|
|
7
|
+
let nextLine = startLine + 1;
|
|
8
|
+
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
9
|
+
if (state.src.charCodeAt(pos) !== 91) return false;
|
|
10
|
+
function getNextLine(nextLine) {
|
|
11
|
+
const endLine = state.lineMax;
|
|
12
|
+
if (nextLine >= endLine || state.isEmpty(nextLine)) return null;
|
|
13
|
+
let isContinuation = false;
|
|
14
|
+
if (state.sCount[nextLine] - state.blkIndent > 3) isContinuation = true;
|
|
15
|
+
if (state.sCount[nextLine] < 0) isContinuation = true;
|
|
16
|
+
if (!isContinuation) {
|
|
17
|
+
const terminatorRules = state.md.block.ruler.getRules("reference");
|
|
18
|
+
const oldParentType = state.parentType;
|
|
19
|
+
state.parentType = "reference";
|
|
20
|
+
let terminate = false;
|
|
21
|
+
for (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {
|
|
22
|
+
terminate = true;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
state.parentType = oldParentType;
|
|
26
|
+
if (terminate) return null;
|
|
27
|
+
}
|
|
28
|
+
const pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
29
|
+
const max = state.eMarks[nextLine];
|
|
30
|
+
return state.src.slice(pos, max + 1);
|
|
31
|
+
}
|
|
32
|
+
let str = state.src.slice(pos, max + 1);
|
|
33
|
+
max = str.length;
|
|
34
|
+
let labelEnd = -1;
|
|
35
|
+
for (pos = 1; pos < max; pos++) {
|
|
36
|
+
const ch = str.charCodeAt(pos);
|
|
37
|
+
if (ch === 91) return false;
|
|
38
|
+
else if (ch === 93) {
|
|
39
|
+
labelEnd = pos;
|
|
40
|
+
break;
|
|
41
|
+
} else if (ch === 10) {
|
|
42
|
+
const lineContent = getNextLine(nextLine);
|
|
43
|
+
if (lineContent !== null) {
|
|
44
|
+
str += lineContent;
|
|
45
|
+
max = str.length;
|
|
46
|
+
nextLine++;
|
|
47
|
+
}
|
|
48
|
+
} else if (ch === 92) {
|
|
49
|
+
pos++;
|
|
50
|
+
if (pos < max && str.charCodeAt(pos) === 10) {
|
|
51
|
+
const lineContent = getNextLine(nextLine);
|
|
52
|
+
if (lineContent !== null) {
|
|
53
|
+
str += lineContent;
|
|
54
|
+
max = str.length;
|
|
55
|
+
nextLine++;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) return false;
|
|
61
|
+
for (pos = labelEnd + 2; pos < max; pos++) {
|
|
62
|
+
const ch = str.charCodeAt(pos);
|
|
63
|
+
if (ch === 10) {
|
|
64
|
+
const lineContent = getNextLine(nextLine);
|
|
65
|
+
if (lineContent !== null) {
|
|
66
|
+
str += lineContent;
|
|
67
|
+
max = str.length;
|
|
68
|
+
nextLine++;
|
|
69
|
+
}
|
|
70
|
+
} else if (isSpace(ch)) {} else break;
|
|
71
|
+
}
|
|
72
|
+
const destRes = state.md.helpers.parseLinkDestination(str, pos, max);
|
|
73
|
+
if (!destRes.ok) return false;
|
|
74
|
+
const href = state.md.normalizeLink(destRes.str);
|
|
75
|
+
if (!state.md.validateLink(href)) return false;
|
|
76
|
+
pos = destRes.pos;
|
|
77
|
+
const destEndPos = pos;
|
|
78
|
+
const destEndLineNo = nextLine;
|
|
79
|
+
const start = pos;
|
|
80
|
+
for (; pos < max; pos++) {
|
|
81
|
+
const ch = str.charCodeAt(pos);
|
|
82
|
+
if (ch === 10) {
|
|
83
|
+
const lineContent = getNextLine(nextLine);
|
|
84
|
+
if (lineContent !== null) {
|
|
85
|
+
str += lineContent;
|
|
86
|
+
max = str.length;
|
|
87
|
+
nextLine++;
|
|
88
|
+
}
|
|
89
|
+
} else if (isSpace(ch)) {} else break;
|
|
90
|
+
}
|
|
91
|
+
let titleRes = state.md.helpers.parseLinkTitle(str, pos, max);
|
|
92
|
+
while (titleRes.can_continue) {
|
|
93
|
+
const lineContent = getNextLine(nextLine);
|
|
94
|
+
if (lineContent === null) break;
|
|
95
|
+
str += lineContent;
|
|
96
|
+
pos = max;
|
|
97
|
+
max = str.length;
|
|
98
|
+
nextLine++;
|
|
99
|
+
titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes);
|
|
100
|
+
}
|
|
101
|
+
let title;
|
|
102
|
+
if (pos < max && start !== pos && titleRes.ok) {
|
|
103
|
+
title = titleRes.str;
|
|
104
|
+
pos = titleRes.pos;
|
|
105
|
+
} else {
|
|
106
|
+
title = "";
|
|
107
|
+
pos = destEndPos;
|
|
108
|
+
nextLine = destEndLineNo;
|
|
109
|
+
}
|
|
110
|
+
while (pos < max) {
|
|
111
|
+
if (!isSpace(str.charCodeAt(pos))) break;
|
|
112
|
+
pos++;
|
|
113
|
+
}
|
|
114
|
+
if (pos < max && str.charCodeAt(pos) !== 10) {
|
|
115
|
+
if (title) {
|
|
116
|
+
title = "";
|
|
117
|
+
pos = destEndPos;
|
|
118
|
+
nextLine = destEndLineNo;
|
|
119
|
+
while (pos < max) {
|
|
120
|
+
if (!isSpace(str.charCodeAt(pos))) break;
|
|
121
|
+
pos++;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (pos < max && str.charCodeAt(pos) !== 10) return false;
|
|
126
|
+
const label = normalizeReference(str.slice(1, labelEnd));
|
|
127
|
+
if (!label) return false;
|
|
128
|
+
/* istanbul ignore if */
|
|
129
|
+
if (silent) return true;
|
|
130
|
+
if (typeof state.env.references === "undefined") state.env.references = {};
|
|
131
|
+
if (typeof state.env.references[label] === "undefined") state.env.references[label] = {
|
|
132
|
+
title,
|
|
133
|
+
href
|
|
134
|
+
};
|
|
135
|
+
state.line = nextLine;
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
export { reference as default };
|
|
141
|
+
//# sourceMappingURL=reference.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/reference.mjs"],"sourcesContent":["import { isSpace, normalizeReference } from '../common/utils.mjs'\n\nexport default function reference (state, startLine, _endLine, silent) {\n let pos = state.bMarks[startLine] + state.tShift[startLine]\n let max = state.eMarks[startLine]\n let nextLine = startLine + 1\n\n // if it's indented more than 3 spaces, it should be a code block\n if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false }\n\n function getNextLine (nextLine) {\n const endLine = state.lineMax\n\n if (nextLine >= endLine || state.isEmpty(nextLine)) {\n // empty line or end of input\n return null\n }\n\n let isContinuation = false\n\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) { isContinuation = true }\n\n // quirk for blockquotes, this line should already be checked by that rule\n if (state.sCount[nextLine] < 0) { isContinuation = true }\n\n if (!isContinuation) {\n const terminatorRules = state.md.block.ruler.getRules('reference')\n const oldParentType = state.parentType\n state.parentType = 'reference'\n\n // Some tags can terminate paragraph without empty line.\n let terminate = false\n for (let i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true\n break\n }\n }\n\n state.parentType = oldParentType\n if (terminate) {\n // terminated by another block\n return null\n }\n }\n\n const pos = state.bMarks[nextLine] + state.tShift[nextLine]\n const max = state.eMarks[nextLine]\n\n // max + 1 explicitly includes the newline\n return state.src.slice(pos, max + 1)\n }\n\n let str = state.src.slice(pos, max + 1)\n\n max = str.length\n let labelEnd = -1\n\n for (pos = 1; pos < max; pos++) {\n const ch = str.charCodeAt(pos)\n if (ch === 0x5B /* [ */) {\n return false\n } else if (ch === 0x5D /* ] */) {\n labelEnd = pos\n break\n } else if (ch === 0x0A /* \\n */) {\n const lineContent = getNextLine(nextLine)\n if (lineContent !== null) {\n str += lineContent\n max = str.length\n nextLine++\n }\n } else if (ch === 0x5C /* \\ */) {\n pos++\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n const lineContent = getNextLine(nextLine)\n if (lineContent !== null) {\n str += lineContent\n max = str.length\n nextLine++\n }\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false }\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n const ch = str.charCodeAt(pos)\n if (ch === 0x0A) {\n const lineContent = getNextLine(nextLine)\n if (lineContent !== null) {\n str += lineContent\n max = str.length\n nextLine++\n }\n } else if (isSpace(ch)) {\n /* eslint no-empty:0 */\n } else {\n break\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n const destRes = state.md.helpers.parseLinkDestination(str, pos, max)\n if (!destRes.ok) { return false }\n\n const href = state.md.normalizeLink(destRes.str)\n if (!state.md.validateLink(href)) { return false }\n\n pos = destRes.pos\n\n // save cursor state, we could require to rollback later\n const destEndPos = pos\n const destEndLineNo = nextLine\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n const start = pos\n for (; pos < max; pos++) {\n const ch = str.charCodeAt(pos)\n if (ch === 0x0A) {\n const lineContent = getNextLine(nextLine)\n if (lineContent !== null) {\n str += lineContent\n max = str.length\n nextLine++\n }\n } else if (isSpace(ch)) {\n /* eslint no-empty:0 */\n } else {\n break\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n let titleRes = state.md.helpers.parseLinkTitle(str, pos, max)\n while (titleRes.can_continue) {\n const lineContent = getNextLine(nextLine)\n if (lineContent === null) break\n str += lineContent\n pos = max\n max = str.length\n nextLine++\n titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes)\n }\n let title\n\n if (pos < max && start !== pos && titleRes.ok) {\n title = titleRes.str\n pos = titleRes.pos\n } else {\n title = ''\n pos = destEndPos\n nextLine = destEndLineNo\n }\n\n // skip trailing spaces until the rest of the line\n while (pos < max) {\n const ch = str.charCodeAt(pos)\n if (!isSpace(ch)) { break }\n pos++\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = ''\n pos = destEndPos\n nextLine = destEndLineNo\n while (pos < max) {\n const ch = str.charCodeAt(pos)\n if (!isSpace(ch)) { break }\n pos++\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false\n }\n\n const label = normalizeReference(str.slice(1, labelEnd))\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false\n }\n\n // Reference can not terminate anything. This check is for safety only.\n /* istanbul ignore if */\n if (silent) { return true }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {}\n }\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = { title, href }\n }\n\n state.line = nextLine\n return true\n}\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const require_utils = require('../common/utils.cjs');
|
|
2
|
+
const require_token = require('../token.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs
|
|
5
|
+
function StateBlock(src, md, env, tokens) {
|
|
6
|
+
this.src = src;
|
|
7
|
+
this.md = md;
|
|
8
|
+
this.env = env;
|
|
9
|
+
this.tokens = tokens;
|
|
10
|
+
this.bMarks = [];
|
|
11
|
+
this.eMarks = [];
|
|
12
|
+
this.tShift = [];
|
|
13
|
+
this.sCount = [];
|
|
14
|
+
this.bsCount = [];
|
|
15
|
+
this.blkIndent = 0;
|
|
16
|
+
this.line = 0;
|
|
17
|
+
this.lineMax = 0;
|
|
18
|
+
this.tight = false;
|
|
19
|
+
this.ddIndent = -1;
|
|
20
|
+
this.listIndent = -1;
|
|
21
|
+
this.parentType = "root";
|
|
22
|
+
this.level = 0;
|
|
23
|
+
const s = this.src;
|
|
24
|
+
for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {
|
|
25
|
+
const ch = s.charCodeAt(pos);
|
|
26
|
+
if (!indent_found) if (require_utils.isSpace(ch)) {
|
|
27
|
+
indent++;
|
|
28
|
+
if (ch === 9) offset += 4 - offset % 4;
|
|
29
|
+
else offset++;
|
|
30
|
+
continue;
|
|
31
|
+
} else indent_found = true;
|
|
32
|
+
if (ch === 10 || pos === len - 1) {
|
|
33
|
+
if (ch !== 10) pos++;
|
|
34
|
+
this.bMarks.push(start);
|
|
35
|
+
this.eMarks.push(pos);
|
|
36
|
+
this.tShift.push(indent);
|
|
37
|
+
this.sCount.push(offset);
|
|
38
|
+
this.bsCount.push(0);
|
|
39
|
+
indent_found = false;
|
|
40
|
+
indent = 0;
|
|
41
|
+
offset = 0;
|
|
42
|
+
start = pos + 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
this.bMarks.push(s.length);
|
|
46
|
+
this.eMarks.push(s.length);
|
|
47
|
+
this.tShift.push(0);
|
|
48
|
+
this.sCount.push(0);
|
|
49
|
+
this.bsCount.push(0);
|
|
50
|
+
this.lineMax = this.bMarks.length - 1;
|
|
51
|
+
}
|
|
52
|
+
StateBlock.prototype.push = function(type, tag, nesting) {
|
|
53
|
+
const token = new require_token.default(type, tag, nesting);
|
|
54
|
+
token.block = true;
|
|
55
|
+
if (nesting < 0) this.level--;
|
|
56
|
+
token.level = this.level;
|
|
57
|
+
if (nesting > 0) this.level++;
|
|
58
|
+
this.tokens.push(token);
|
|
59
|
+
return token;
|
|
60
|
+
};
|
|
61
|
+
StateBlock.prototype.isEmpty = function isEmpty(line) {
|
|
62
|
+
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
|
|
63
|
+
};
|
|
64
|
+
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
|
|
65
|
+
for (let max = this.lineMax; from < max; from++) if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) break;
|
|
66
|
+
return from;
|
|
67
|
+
};
|
|
68
|
+
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
|
|
69
|
+
for (let max = this.src.length; pos < max; pos++) if (!require_utils.isSpace(this.src.charCodeAt(pos))) break;
|
|
70
|
+
return pos;
|
|
71
|
+
};
|
|
72
|
+
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
|
|
73
|
+
if (pos <= min) return pos;
|
|
74
|
+
while (pos > min) if (!require_utils.isSpace(this.src.charCodeAt(--pos))) return pos + 1;
|
|
75
|
+
return pos;
|
|
76
|
+
};
|
|
77
|
+
StateBlock.prototype.skipChars = function skipChars(pos, code) {
|
|
78
|
+
for (let max = this.src.length; pos < max; pos++) if (this.src.charCodeAt(pos) !== code) break;
|
|
79
|
+
return pos;
|
|
80
|
+
};
|
|
81
|
+
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
|
|
82
|
+
if (pos <= min) return pos;
|
|
83
|
+
while (pos > min) if (code !== this.src.charCodeAt(--pos)) return pos + 1;
|
|
84
|
+
return pos;
|
|
85
|
+
};
|
|
86
|
+
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
|
|
87
|
+
if (begin >= end) return "";
|
|
88
|
+
const queue = new Array(end - begin);
|
|
89
|
+
for (let i = 0, line = begin; line < end; line++, i++) {
|
|
90
|
+
let lineIndent = 0;
|
|
91
|
+
const lineStart = this.bMarks[line];
|
|
92
|
+
let first = lineStart;
|
|
93
|
+
let last;
|
|
94
|
+
if (line + 1 < end || keepLastLF) last = this.eMarks[line] + 1;
|
|
95
|
+
else last = this.eMarks[line];
|
|
96
|
+
while (first < last && lineIndent < indent) {
|
|
97
|
+
const ch = this.src.charCodeAt(first);
|
|
98
|
+
if (require_utils.isSpace(ch)) if (ch === 9) lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
|
|
99
|
+
else lineIndent++;
|
|
100
|
+
else if (first - lineStart < this.tShift[line]) lineIndent++;
|
|
101
|
+
else break;
|
|
102
|
+
first++;
|
|
103
|
+
}
|
|
104
|
+
if (lineIndent > indent) queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first, last);
|
|
105
|
+
else queue[i] = this.src.slice(first, last);
|
|
106
|
+
}
|
|
107
|
+
return queue.join("");
|
|
108
|
+
};
|
|
109
|
+
StateBlock.prototype.Token = require_token.default;
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
exports.default = StateBlock;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { isSpace } from "../common/utils.mjs";
|
|
2
|
+
import Token from "../token.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs
|
|
5
|
+
function StateBlock(src, md, env, tokens) {
|
|
6
|
+
this.src = src;
|
|
7
|
+
this.md = md;
|
|
8
|
+
this.env = env;
|
|
9
|
+
this.tokens = tokens;
|
|
10
|
+
this.bMarks = [];
|
|
11
|
+
this.eMarks = [];
|
|
12
|
+
this.tShift = [];
|
|
13
|
+
this.sCount = [];
|
|
14
|
+
this.bsCount = [];
|
|
15
|
+
this.blkIndent = 0;
|
|
16
|
+
this.line = 0;
|
|
17
|
+
this.lineMax = 0;
|
|
18
|
+
this.tight = false;
|
|
19
|
+
this.ddIndent = -1;
|
|
20
|
+
this.listIndent = -1;
|
|
21
|
+
this.parentType = "root";
|
|
22
|
+
this.level = 0;
|
|
23
|
+
const s = this.src;
|
|
24
|
+
for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {
|
|
25
|
+
const ch = s.charCodeAt(pos);
|
|
26
|
+
if (!indent_found) if (isSpace(ch)) {
|
|
27
|
+
indent++;
|
|
28
|
+
if (ch === 9) offset += 4 - offset % 4;
|
|
29
|
+
else offset++;
|
|
30
|
+
continue;
|
|
31
|
+
} else indent_found = true;
|
|
32
|
+
if (ch === 10 || pos === len - 1) {
|
|
33
|
+
if (ch !== 10) pos++;
|
|
34
|
+
this.bMarks.push(start);
|
|
35
|
+
this.eMarks.push(pos);
|
|
36
|
+
this.tShift.push(indent);
|
|
37
|
+
this.sCount.push(offset);
|
|
38
|
+
this.bsCount.push(0);
|
|
39
|
+
indent_found = false;
|
|
40
|
+
indent = 0;
|
|
41
|
+
offset = 0;
|
|
42
|
+
start = pos + 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
this.bMarks.push(s.length);
|
|
46
|
+
this.eMarks.push(s.length);
|
|
47
|
+
this.tShift.push(0);
|
|
48
|
+
this.sCount.push(0);
|
|
49
|
+
this.bsCount.push(0);
|
|
50
|
+
this.lineMax = this.bMarks.length - 1;
|
|
51
|
+
}
|
|
52
|
+
StateBlock.prototype.push = function(type, tag, nesting) {
|
|
53
|
+
const token = new Token(type, tag, nesting);
|
|
54
|
+
token.block = true;
|
|
55
|
+
if (nesting < 0) this.level--;
|
|
56
|
+
token.level = this.level;
|
|
57
|
+
if (nesting > 0) this.level++;
|
|
58
|
+
this.tokens.push(token);
|
|
59
|
+
return token;
|
|
60
|
+
};
|
|
61
|
+
StateBlock.prototype.isEmpty = function isEmpty(line) {
|
|
62
|
+
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
|
|
63
|
+
};
|
|
64
|
+
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
|
|
65
|
+
for (let max = this.lineMax; from < max; from++) if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) break;
|
|
66
|
+
return from;
|
|
67
|
+
};
|
|
68
|
+
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
|
|
69
|
+
for (let max = this.src.length; pos < max; pos++) if (!isSpace(this.src.charCodeAt(pos))) break;
|
|
70
|
+
return pos;
|
|
71
|
+
};
|
|
72
|
+
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
|
|
73
|
+
if (pos <= min) return pos;
|
|
74
|
+
while (pos > min) if (!isSpace(this.src.charCodeAt(--pos))) return pos + 1;
|
|
75
|
+
return pos;
|
|
76
|
+
};
|
|
77
|
+
StateBlock.prototype.skipChars = function skipChars(pos, code) {
|
|
78
|
+
for (let max = this.src.length; pos < max; pos++) if (this.src.charCodeAt(pos) !== code) break;
|
|
79
|
+
return pos;
|
|
80
|
+
};
|
|
81
|
+
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
|
|
82
|
+
if (pos <= min) return pos;
|
|
83
|
+
while (pos > min) if (code !== this.src.charCodeAt(--pos)) return pos + 1;
|
|
84
|
+
return pos;
|
|
85
|
+
};
|
|
86
|
+
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
|
|
87
|
+
if (begin >= end) return "";
|
|
88
|
+
const queue = new Array(end - begin);
|
|
89
|
+
for (let i = 0, line = begin; line < end; line++, i++) {
|
|
90
|
+
let lineIndent = 0;
|
|
91
|
+
const lineStart = this.bMarks[line];
|
|
92
|
+
let first = lineStart;
|
|
93
|
+
let last;
|
|
94
|
+
if (line + 1 < end || keepLastLF) last = this.eMarks[line] + 1;
|
|
95
|
+
else last = this.eMarks[line];
|
|
96
|
+
while (first < last && lineIndent < indent) {
|
|
97
|
+
const ch = this.src.charCodeAt(first);
|
|
98
|
+
if (isSpace(ch)) if (ch === 9) lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
|
|
99
|
+
else lineIndent++;
|
|
100
|
+
else if (first - lineStart < this.tShift[line]) lineIndent++;
|
|
101
|
+
else break;
|
|
102
|
+
first++;
|
|
103
|
+
}
|
|
104
|
+
if (lineIndent > indent) queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first, last);
|
|
105
|
+
else queue[i] = this.src.slice(first, last);
|
|
106
|
+
}
|
|
107
|
+
return queue.join("");
|
|
108
|
+
};
|
|
109
|
+
StateBlock.prototype.Token = Token;
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { StateBlock as default };
|
|
113
|
+
//# sourceMappingURL=state_block.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state_block.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/state_block.mjs"],"sourcesContent":["// Parser state class\n\nimport Token from '../token.mjs'\nimport { isSpace } from '../common/utils.mjs'\n\nfunction StateBlock (src, md, env, tokens) {\n this.src = src\n\n // link to parser instance\n this.md = md\n\n this.env = env\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens\n\n this.bMarks = [] // line begin offsets for fast jumps\n this.eMarks = [] // line end offsets for fast jumps\n this.tShift = [] // offsets of the first non-space characters (tabs not expanded)\n this.sCount = [] // indents for each line (tabs expanded)\n\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n this.bsCount = []\n\n // block parser variables\n\n // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n this.blkIndent = 0\n this.line = 0 // line index in src\n this.lineMax = 0 // lines count\n this.tight = false // loose/tight mode for lists\n this.ddIndent = -1 // indent of the current dd block (-1 if there isn't any)\n this.listIndent = -1 // indent of the current list block (-1 if there isn't any)\n\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n this.parentType = 'root'\n\n this.level = 0\n\n // Create caches\n // Generate markers.\n const s = this.src\n\n for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {\n const ch = s.charCodeAt(pos)\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++\n\n if (ch === 0x09) {\n offset += 4 - offset % 4\n } else {\n offset++\n }\n continue\n } else {\n indent_found = true\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++ }\n this.bMarks.push(start)\n this.eMarks.push(pos)\n this.tShift.push(indent)\n this.sCount.push(offset)\n this.bsCount.push(0)\n\n indent_found = false\n indent = 0\n offset = 0\n start = pos + 1\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length)\n this.eMarks.push(s.length)\n this.tShift.push(0)\n this.sCount.push(0)\n this.bsCount.push(0)\n\n this.lineMax = this.bMarks.length - 1 // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n const token = new Token(type, tag, nesting)\n token.block = true\n\n if (nesting < 0) this.level-- // closing tag\n token.level = this.level\n if (nesting > 0) this.level++ // opening tag\n\n this.tokens.push(token)\n return token\n}\n\nStateBlock.prototype.isEmpty = function isEmpty (line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]\n}\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines (from) {\n for (let max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break\n }\n }\n return from\n}\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces (pos) {\n for (let max = this.src.length; pos < max; pos++) {\n const ch = this.src.charCodeAt(pos)\n if (!isSpace(ch)) { break }\n }\n return pos\n}\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack (pos, min) {\n if (pos <= min) { return pos }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1 }\n }\n return pos\n}\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars (pos, code) {\n for (let max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break }\n }\n return pos\n}\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack (pos, code, min) {\n if (pos <= min) { return pos }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1 }\n }\n return pos\n}\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines (begin, end, indent, keepLastLF) {\n if (begin >= end) {\n return ''\n }\n\n const queue = new Array(end - begin)\n\n for (let i = 0, line = begin; line < end; line++, i++) {\n let lineIndent = 0\n const lineStart = this.bMarks[line]\n let first = lineStart\n let last\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1\n } else {\n last = this.eMarks[line]\n }\n\n while (first < last && lineIndent < indent) {\n const ch = this.src.charCodeAt(first)\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4\n } else {\n lineIndent++\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++\n } else {\n break\n }\n\n first++\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last)\n } else {\n queue[i] = this.src.slice(first, last)\n }\n }\n\n return queue.join('')\n}\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token\n\nexport default StateBlock\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
const require_utils = require('../common/utils.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/rules_block/table.mjs
|
|
4
|
+
const MAX_AUTOCOMPLETED_CELLS = 65536;
|
|
5
|
+
function getLine(state, line) {
|
|
6
|
+
const pos = state.bMarks[line] + state.tShift[line];
|
|
7
|
+
const max = state.eMarks[line];
|
|
8
|
+
return state.src.slice(pos, max);
|
|
9
|
+
}
|
|
10
|
+
function escapedSplit(str) {
|
|
11
|
+
const result = [];
|
|
12
|
+
const max = str.length;
|
|
13
|
+
let pos = 0;
|
|
14
|
+
let ch = str.charCodeAt(pos);
|
|
15
|
+
let isEscaped = false;
|
|
16
|
+
let lastPos = 0;
|
|
17
|
+
let current = "";
|
|
18
|
+
while (pos < max) {
|
|
19
|
+
if (ch === 124) if (!isEscaped) {
|
|
20
|
+
result.push(current + str.substring(lastPos, pos));
|
|
21
|
+
current = "";
|
|
22
|
+
lastPos = pos + 1;
|
|
23
|
+
} else {
|
|
24
|
+
current += str.substring(lastPos, pos - 1);
|
|
25
|
+
lastPos = pos;
|
|
26
|
+
}
|
|
27
|
+
isEscaped = ch === 92;
|
|
28
|
+
pos++;
|
|
29
|
+
ch = str.charCodeAt(pos);
|
|
30
|
+
}
|
|
31
|
+
result.push(current + str.substring(lastPos));
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function table(state, startLine, endLine, silent) {
|
|
35
|
+
if (startLine + 2 > endLine) return false;
|
|
36
|
+
let nextLine = startLine + 1;
|
|
37
|
+
if (state.sCount[nextLine] < state.blkIndent) return false;
|
|
38
|
+
if (state.sCount[nextLine] - state.blkIndent >= 4) return false;
|
|
39
|
+
let pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
40
|
+
if (pos >= state.eMarks[nextLine]) return false;
|
|
41
|
+
const firstCh = state.src.charCodeAt(pos++);
|
|
42
|
+
if (firstCh !== 124 && firstCh !== 45 && firstCh !== 58) return false;
|
|
43
|
+
if (pos >= state.eMarks[nextLine]) return false;
|
|
44
|
+
const secondCh = state.src.charCodeAt(pos++);
|
|
45
|
+
if (secondCh !== 124 && secondCh !== 45 && secondCh !== 58 && !require_utils.isSpace(secondCh)) return false;
|
|
46
|
+
if (firstCh === 45 && require_utils.isSpace(secondCh)) return false;
|
|
47
|
+
while (pos < state.eMarks[nextLine]) {
|
|
48
|
+
const ch = state.src.charCodeAt(pos);
|
|
49
|
+
if (ch !== 124 && ch !== 45 && ch !== 58 && !require_utils.isSpace(ch)) return false;
|
|
50
|
+
pos++;
|
|
51
|
+
}
|
|
52
|
+
let lineText = getLine(state, startLine + 1);
|
|
53
|
+
let columns = lineText.split("|");
|
|
54
|
+
const aligns = [];
|
|
55
|
+
for (let i = 0; i < columns.length; i++) {
|
|
56
|
+
const t = columns[i].trim();
|
|
57
|
+
if (!t) if (i === 0 || i === columns.length - 1) continue;
|
|
58
|
+
else return false;
|
|
59
|
+
if (!/^:?-+:?$/.test(t)) return false;
|
|
60
|
+
if (t.charCodeAt(t.length - 1) === 58) aligns.push(t.charCodeAt(0) === 58 ? "center" : "right");
|
|
61
|
+
else if (t.charCodeAt(0) === 58) aligns.push("left");
|
|
62
|
+
else aligns.push("");
|
|
63
|
+
}
|
|
64
|
+
lineText = getLine(state, startLine).trim();
|
|
65
|
+
if (lineText.indexOf("|") === -1) return false;
|
|
66
|
+
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
67
|
+
columns = escapedSplit(lineText);
|
|
68
|
+
if (columns.length && columns[0] === "") columns.shift();
|
|
69
|
+
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
70
|
+
const columnCount = columns.length;
|
|
71
|
+
if (columnCount === 0 || columnCount !== aligns.length) return false;
|
|
72
|
+
if (silent) return true;
|
|
73
|
+
const oldParentType = state.parentType;
|
|
74
|
+
state.parentType = "table";
|
|
75
|
+
const terminatorRules = state.md.block.ruler.getRules("blockquote");
|
|
76
|
+
const token_to = state.push("table_open", "table", 1);
|
|
77
|
+
const tableLines = [startLine, 0];
|
|
78
|
+
token_to.map = tableLines;
|
|
79
|
+
const token_tho = state.push("thead_open", "thead", 1);
|
|
80
|
+
token_tho.map = [startLine, startLine + 1];
|
|
81
|
+
const token_htro = state.push("tr_open", "tr", 1);
|
|
82
|
+
token_htro.map = [startLine, startLine + 1];
|
|
83
|
+
for (let i = 0; i < columns.length; i++) {
|
|
84
|
+
const token_ho = state.push("th_open", "th", 1);
|
|
85
|
+
if (aligns[i]) token_ho.attrs = [["style", "text-align:" + aligns[i]]];
|
|
86
|
+
const token_il = state.push("inline", "", 0);
|
|
87
|
+
token_il.content = columns[i].trim();
|
|
88
|
+
token_il.children = [];
|
|
89
|
+
state.push("th_close", "th", -1);
|
|
90
|
+
}
|
|
91
|
+
state.push("tr_close", "tr", -1);
|
|
92
|
+
state.push("thead_close", "thead", -1);
|
|
93
|
+
let tbodyLines;
|
|
94
|
+
let autocompletedCells = 0;
|
|
95
|
+
for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
|
|
96
|
+
if (state.sCount[nextLine] < state.blkIndent) break;
|
|
97
|
+
let terminate = false;
|
|
98
|
+
for (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {
|
|
99
|
+
terminate = true;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
if (terminate) break;
|
|
103
|
+
lineText = getLine(state, nextLine).trim();
|
|
104
|
+
if (!lineText) break;
|
|
105
|
+
if (state.sCount[nextLine] - state.blkIndent >= 4) break;
|
|
106
|
+
columns = escapedSplit(lineText);
|
|
107
|
+
if (columns.length && columns[0] === "") columns.shift();
|
|
108
|
+
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
109
|
+
autocompletedCells += columnCount - columns.length;
|
|
110
|
+
if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) break;
|
|
111
|
+
if (nextLine === startLine + 2) {
|
|
112
|
+
const token_tbo = state.push("tbody_open", "tbody", 1);
|
|
113
|
+
token_tbo.map = tbodyLines = [startLine + 2, 0];
|
|
114
|
+
}
|
|
115
|
+
const token_tro = state.push("tr_open", "tr", 1);
|
|
116
|
+
token_tro.map = [nextLine, nextLine + 1];
|
|
117
|
+
for (let i = 0; i < columnCount; i++) {
|
|
118
|
+
const token_tdo = state.push("td_open", "td", 1);
|
|
119
|
+
if (aligns[i]) token_tdo.attrs = [["style", "text-align:" + aligns[i]]];
|
|
120
|
+
const token_il = state.push("inline", "", 0);
|
|
121
|
+
token_il.content = columns[i] ? columns[i].trim() : "";
|
|
122
|
+
token_il.children = [];
|
|
123
|
+
state.push("td_close", "td", -1);
|
|
124
|
+
}
|
|
125
|
+
state.push("tr_close", "tr", -1);
|
|
126
|
+
}
|
|
127
|
+
if (tbodyLines) {
|
|
128
|
+
state.push("tbody_close", "tbody", -1);
|
|
129
|
+
tbodyLines[1] = nextLine;
|
|
130
|
+
}
|
|
131
|
+
state.push("table_close", "table", -1);
|
|
132
|
+
tableLines[1] = nextLine;
|
|
133
|
+
state.parentType = oldParentType;
|
|
134
|
+
state.line = nextLine;
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.default = table;
|