@mdsvex/parse 0.0.0 → 1.0.0-next.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 +21 -0
- package/LICENSE +21 -0
- package/PLUGINS.md +296 -0
- package/WIRE_FORMAT.md +686 -0
- package/dist/buf-utils.js +38 -0
- package/dist/buf_utils.d.ts +13 -0
- package/dist/constants.d.ts +68 -0
- package/dist/cursor.d.ts +79 -0
- package/dist/cursor.js +98 -0
- package/dist/main.d.ts +472 -0
- package/dist/main.js +4699 -0
- package/dist/node_view-BEh2-H86.js +373 -0
- package/dist/node_view.d.ts +116 -0
- package/dist/opcodes.d.ts +75 -0
- package/dist/opcodes.js +1 -0
- package/dist/plugin_dispatch.d.ts +68 -0
- package/dist/plugin_types.d.ts +31 -0
- package/dist/tree-builder.js +100 -0
- package/dist/tree_builder.d.ts +31 -0
- package/dist/types.d.ts +25 -0
- package/dist/undo_log.d.ts +103 -0
- package/dist/utils.d.ts +242 -0
- package/dist/utils.js +453 -0
- package/dist/utils.spec.d.ts +1 -0
- package/dist/wire-tree-builder.js +170 -0
- package/dist/wire_emitter.d.ts +66 -0
- package/dist/wire_tree_builder.d.ts +58 -0
- package/package.json +57 -8
- package/src/buf_utils.ts +58 -0
- package/src/constants.ts +101 -0
- package/src/cursor.ts +195 -0
- package/src/main.ts +7686 -0
- package/src/node_view.ts +441 -0
- package/src/opcodes.ts +91 -0
- package/src/plugin_dispatch.ts +635 -0
- package/src/plugin_types.ts +36 -0
- package/src/tree_builder.ts +214 -0
- package/src/types.ts +30 -0
- package/src/undo_log.ts +302 -0
- package/src/utils.spec.ts +347 -0
- package/src/utils.ts +992 -0
- package/src/wire_emitter.ts +469 -0
- package/src/wire_tree_builder.ts +337 -0
- package/test/ast_snapshots.spec.ts +155 -0
- package/test/atx_headings.spec.ts +260 -0
- package/test/autolinks.spec.ts +306 -0
- package/test/backslash_escapes.spec.ts +266 -0
- package/test/blank_lines.spec.ts +113 -0
- package/test/block_quotes.spec.ts +462 -0
- package/test/code_spans.spec.ts +710 -0
- package/test/crlf.spec.ts +125 -0
- package/test/directives.spec.ts +776 -0
- package/test/emphasis.spec.ts +1886 -0
- package/test/fenced_code_blocks.spec.ts +375 -0
- package/test/fixtures/hybrid/code-escaping.svx +10 -0
- package/test/fixtures/hybrid/code-highlight-nesting.svx +6 -0
- package/test/fixtures/hybrid/component-children.svx +24 -0
- package/test/fixtures/hybrid/component-simple-00.svx +9 -0
- package/test/fixtures/hybrid/component-simple-01.svx +7 -0
- package/test/fixtures/hybrid/component-simple-02.svx +1 -0
- package/test/fixtures/hybrid/component-simple-03.svx +7 -0
- package/test/fixtures/hybrid/component-simple-04.svx +9 -0
- package/test/fixtures/hybrid/dollar-one-in-frontmatter.svx +5 -0
- package/test/fixtures/hybrid/error.svx +37 -0
- package/test/fixtures/hybrid/link-curlies.svx +22 -0
- package/test/fixtures/hybrid/tags-in-frontmatter.svx +3 -0
- package/test/fixtures/markdown/anchors-by-reference.md +11 -0
- package/test/fixtures/markdown/anchors-followed-by-brakets.md +7 -0
- package/test/fixtures/markdown/automatic-anchors.md +2 -0
- package/test/fixtures/markdown/blockquote-followed-by-code.md +10 -0
- package/test/fixtures/markdown/blockquote-inside-code.md +11 -0
- package/test/fixtures/markdown/blockquote-nested-markdown.md +10 -0
- package/test/fixtures/markdown/blockquote.md +4 -0
- package/test/fixtures/markdown/code-block-html-escape.md +6 -0
- package/test/fixtures/markdown/code-block-with-special-chars.md +8 -0
- package/test/fixtures/markdown/code-block.md +6 -0
- package/test/fixtures/markdown/double-emphasis.md +7 -0
- package/test/fixtures/markdown/doubline-list.md +4 -0
- package/test/fixtures/markdown/ellipsis.md +24 -0
- package/test/fixtures/markdown/emphasis-inside-inline-code.md +1 -0
- package/test/fixtures/markdown/emphasis.md +88 -0
- package/test/fixtures/markdown/encodeHTMLCodeTags.md +5 -0
- package/test/fixtures/markdown/escaped-html-taglikes.md +7 -0
- package/test/fixtures/markdown/escaped-number-period.md +1 -0
- package/test/fixtures/markdown/escaping.md +32 -0
- package/test/fixtures/markdown/github-style-at-start.md +7 -0
- package/test/fixtures/markdown/github-style-codeblock-inside-quote.md +13 -0
- package/test/fixtures/markdown/github-style-codeblock.md +34 -0
- package/test/fixtures/markdown/github-style-linebreaks.md +4 -0
- package/test/fixtures/markdown/h1-with-double-hash.md +1 -0
- package/test/fixtures/markdown/h1-with-equals.md +2 -0
- package/test/fixtures/markdown/h1-with-single-hash.md +1 -0
- package/test/fixtures/markdown/h2-with-dashes.md +2 -0
- package/test/fixtures/markdown/h2-with-double-hash.md +1 -0
- package/test/fixtures/markdown/h2-with-single-hash.md +1 -0
- package/test/fixtures/markdown/h3-with-double-hash.md +1 -0
- package/test/fixtures/markdown/h3-with-single-hash.md +1 -0
- package/test/fixtures/markdown/h4-with-single-hash.md +1 -0
- package/test/fixtures/markdown/h5-with-single-hash.md +1 -0
- package/test/fixtures/markdown/h6-with-single-hash.md +1 -0
- package/test/fixtures/markdown/horizontal-rules.md +10 -0
- package/test/fixtures/markdown/html-comments.md +8 -0
- package/test/fixtures/markdown/html-inside-listed-code.md +8 -0
- package/test/fixtures/markdown/html5-strutural-tags.md +68 -0
- package/test/fixtures/markdown/images-followed-by-brackets.md +3 -0
- package/test/fixtures/markdown/images.md +14 -0
- package/test/fixtures/markdown/implicit-anchors.md +7 -0
- package/test/fixtures/markdown/inline-anchors.md +3 -0
- package/test/fixtures/markdown/inline-code.md +13 -0
- package/test/fixtures/markdown/inline-escaped-chars.md +2 -0
- package/test/fixtures/markdown/inline-style-tag.md +5 -0
- package/test/fixtures/markdown/lazy-blockquote.md +3 -0
- package/test/fixtures/markdown/line-starts-with-html.md +3 -0
- package/test/fixtures/markdown/list-followed-by-blockquote.md +9 -0
- package/test/fixtures/markdown/list-followed-by-ghcode.md +13 -0
- package/test/fixtures/markdown/list-with-blockquote.md +4 -0
- package/test/fixtures/markdown/literal-html-tags.md +9 -0
- package/test/fixtures/markdown/multi-paragraph-list.md +5 -0
- package/test/fixtures/markdown/multiline-unordered-list.md +3 -0
- package/test/fixtures/markdown/nested-blockquote.md +5 -0
- package/test/fixtures/markdown/nested-gh-codeblocks.md +9 -0
- package/test/fixtures/markdown/obfuscated-emails.md +0 -0
- package/test/fixtures/markdown/ordered-list-same-number.md +3 -0
- package/test/fixtures/markdown/ordered-list-starting-number.md +10 -0
- package/test/fixtures/markdown/ordered-list-wrong-numbers.md +3 -0
- package/test/fixtures/markdown/ordered-list.md +3 -0
- package/test/fixtures/markdown/paragraphed-list-with-sublists.md +13 -0
- package/test/fixtures/markdown/pre-code-tags-inside-code-block.md +7 -0
- package/test/fixtures/markdown/pre-code-tags.md +19 -0
- package/test/fixtures/markdown/relative-anchors.md +1 -0
- package/test/fixtures/markdown/repeated-headers.md +5 -0
- package/test/fixtures/markdown/simple-paragraph.md +1 -0
- package/test/fixtures/markdown/strip-references.md +13 -0
- package/test/fixtures/markdown/strong.md +5 -0
- package/test/fixtures/markdown/unordered-list-asterisk.md +3 -0
- package/test/fixtures/markdown/unordered-list-minus.md +3 -0
- package/test/fixtures/markdown/unordered-list-plus.md +3 -0
- package/test/fixtures/markdown/url-with-parenthesis.md +1 -0
- package/test/fixtures/pfm/atx_headings/62.md +6 -0
- package/test/fixtures/pfm/atx_headings/63.md +1 -0
- package/test/fixtures/pfm/atx_headings/64.md +3 -0
- package/test/fixtures/pfm/atx_headings/65.md +1 -0
- package/test/fixtures/pfm/atx_headings/66.md +1 -0
- package/test/fixtures/pfm/atx_headings/67.md +1 -0
- package/test/fixtures/pfm/atx_headings/68.md +3 -0
- package/test/fixtures/pfm/atx_headings/69.md +1 -0
- package/test/fixtures/pfm/atx_headings/70.md +2 -0
- package/test/fixtures/pfm/atx_headings/71.md +2 -0
- package/test/fixtures/pfm/atx_headings/72.md +2 -0
- package/test/fixtures/pfm/atx_headings/73.md +1 -0
- package/test/fixtures/pfm/atx_headings/74.md +1 -0
- package/test/fixtures/pfm/atx_headings/75.md +1 -0
- package/test/fixtures/pfm/atx_headings/76.md +3 -0
- package/test/fixtures/pfm/atx_headings/77.md +3 -0
- package/test/fixtures/pfm/atx_headings/78.md +3 -0
- package/test/fixtures/pfm/atx_headings/79.md +3 -0
- package/test/fixtures/pfm/autolinks/594.md +1 -0
- package/test/fixtures/pfm/autolinks/595.md +1 -0
- package/test/fixtures/pfm/autolinks/596.md +1 -0
- package/test/fixtures/pfm/autolinks/597.md +1 -0
- package/test/fixtures/pfm/autolinks/598.md +1 -0
- package/test/fixtures/pfm/autolinks/599.md +1 -0
- package/test/fixtures/pfm/autolinks/600.md +1 -0
- package/test/fixtures/pfm/autolinks/601.md +1 -0
- package/test/fixtures/pfm/autolinks/602.md +1 -0
- package/test/fixtures/pfm/autolinks/603.md +1 -0
- package/test/fixtures/pfm/autolinks/604.md +1 -0
- package/test/fixtures/pfm/autolinks/605.md +1 -0
- package/test/fixtures/pfm/autolinks/606.md +1 -0
- package/test/fixtures/pfm/autolinks/607.md +1 -0
- package/test/fixtures/pfm/autolinks/608.md +1 -0
- package/test/fixtures/pfm/autolinks/609.md +1 -0
- package/test/fixtures/pfm/autolinks/610.md +1 -0
- package/test/fixtures/pfm/autolinks/611.md +1 -0
- package/test/fixtures/pfm/autolinks/612.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/12.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/13.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/14.md +9 -0
- package/test/fixtures/pfm/backslash_escapes/15.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/16.md +2 -0
- package/test/fixtures/pfm/backslash_escapes/17.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/18.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/19.md +3 -0
- package/test/fixtures/pfm/backslash_escapes/20.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/21.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/22.md +1 -0
- package/test/fixtures/pfm/backslash_escapes/23.md +3 -0
- package/test/fixtures/pfm/backslash_escapes/24.md +3 -0
- package/test/fixtures/pfm/blank_lines/227.md +8 -0
- package/test/fixtures/pfm/block_quotes/228.md +3 -0
- package/test/fixtures/pfm/block_quotes/229.md +3 -0
- package/test/fixtures/pfm/block_quotes/230.md +3 -0
- package/test/fixtures/pfm/block_quotes/231.md +3 -0
- package/test/fixtures/pfm/block_quotes/232.md +3 -0
- package/test/fixtures/pfm/block_quotes/233.md +3 -0
- package/test/fixtures/pfm/block_quotes/234.md +2 -0
- package/test/fixtures/pfm/block_quotes/235.md +2 -0
- package/test/fixtures/pfm/block_quotes/236.md +2 -0
- package/test/fixtures/pfm/block_quotes/237.md +3 -0
- package/test/fixtures/pfm/block_quotes/238.md +2 -0
- package/test/fixtures/pfm/block_quotes/239.md +1 -0
- package/test/fixtures/pfm/block_quotes/240.md +3 -0
- package/test/fixtures/pfm/block_quotes/241.md +3 -0
- package/test/fixtures/pfm/block_quotes/242.md +3 -0
- package/test/fixtures/pfm/block_quotes/243.md +2 -0
- package/test/fixtures/pfm/block_quotes/244.md +3 -0
- package/test/fixtures/pfm/block_quotes/245.md +2 -0
- package/test/fixtures/pfm/block_quotes/246.md +3 -0
- package/test/fixtures/pfm/block_quotes/247.md +2 -0
- package/test/fixtures/pfm/block_quotes/248.md +3 -0
- package/test/fixtures/pfm/block_quotes/249.md +3 -0
- package/test/fixtures/pfm/block_quotes/250.md +2 -0
- package/test/fixtures/pfm/block_quotes/251.md +3 -0
- package/test/fixtures/pfm/block_quotes/252.md +3 -0
- package/test/fixtures/pfm/code_spans/328.md +1 -0
- package/test/fixtures/pfm/code_spans/329.md +1 -0
- package/test/fixtures/pfm/code_spans/330.md +1 -0
- package/test/fixtures/pfm/code_spans/331.md +1 -0
- package/test/fixtures/pfm/code_spans/332.md +1 -0
- package/test/fixtures/pfm/code_spans/333.md +1 -0
- package/test/fixtures/pfm/code_spans/334.md +2 -0
- package/test/fixtures/pfm/code_spans/335.md +5 -0
- package/test/fixtures/pfm/code_spans/336.md +3 -0
- package/test/fixtures/pfm/code_spans/337.md +2 -0
- package/test/fixtures/pfm/code_spans/338.md +1 -0
- package/test/fixtures/pfm/code_spans/339.md +1 -0
- package/test/fixtures/pfm/code_spans/340.md +1 -0
- package/test/fixtures/pfm/code_spans/341.md +1 -0
- package/test/fixtures/pfm/code_spans/342.md +1 -0
- package/test/fixtures/pfm/code_spans/343.md +1 -0
- package/test/fixtures/pfm/code_spans/344.md +1 -0
- package/test/fixtures/pfm/code_spans/345.md +1 -0
- package/test/fixtures/pfm/code_spans/346.md +1 -0
- package/test/fixtures/pfm/code_spans/347.md +1 -0
- package/test/fixtures/pfm/code_spans/348.md +1 -0
- package/test/fixtures/pfm/code_spans/349.md +1 -0
- package/test/fixtures/pfm/code_spans/pfm_328_1.md +1 -0
- package/test/fixtures/pfm/code_spans/pfm_328_2.md +1 -0
- package/test/fixtures/pfm/code_spans/pfm_328_3.md +1 -0
- package/test/fixtures/pfm/code_spans/pfm_328_4.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/350.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/351.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/352.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/353.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/354.md +5 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/355.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/356.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/357.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/358.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/359.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/360.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/361.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/362.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/363.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/364.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/365.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/366.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/367.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/368.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/369.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/370.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/371.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/372.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/373.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/374.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/375.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/376.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/377.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/378.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/379.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/380.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/381.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/382.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/383.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/384.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/385.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/386.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/387.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/388.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/389.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/390.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/391.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/392.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/393.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/394.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/395.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/396.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/397.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/398.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/399.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/400.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/401.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/402.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/403.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/404.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/405.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/406.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/407.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/408.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/409.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/410.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/411.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/412.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/413.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/414.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/415.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/416.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/417.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/418.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/419.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/420.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/421.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/422.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/423.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/424.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/425.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/426.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/427.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/428.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/429.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/430.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/431.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/432.md +2 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/433.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/434.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/435.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/436.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/437.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/438.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/439.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/440.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/441.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/442.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/443.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/444.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/445.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/446.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/447.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/448.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/449.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/450.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/451.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/452.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/453.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/454.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/455.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/456.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/457.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/458.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/459.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/460.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/461.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/462.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/463.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/464.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/465.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/466.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/467.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/468.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/469.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/470.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/471.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/472.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/473.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/474.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/475.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/476.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/477.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/478.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/479.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/480.md +1 -0
- package/test/fixtures/pfm/emphasis_and_strong_emphasis/481.md +1 -0
- package/test/fixtures/pfm/fenced_code_blocks/119.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/121.md +3 -0
- package/test/fixtures/pfm/fenced_code_blocks/122.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/124.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/126.md +1 -0
- package/test/fixtures/pfm/fenced_code_blocks/127.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/128.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/130.md +2 -0
- package/test/fixtures/pfm/fenced_code_blocks/131.md +4 -0
- package/test/fixtures/pfm/fenced_code_blocks/132.md +5 -0
- package/test/fixtures/pfm/fenced_code_blocks/133.md +5 -0
- package/test/fixtures/pfm/fenced_code_blocks/134.md +3 -0
- package/test/fixtures/pfm/fenced_code_blocks/135.md +3 -0
- package/test/fixtures/pfm/fenced_code_blocks/136.md +3 -0
- package/test/fixtures/pfm/fenced_code_blocks/137.md +3 -0
- package/test/fixtures/pfm/fenced_code_blocks/138.md +2 -0
- package/test/fixtures/pfm/fenced_code_blocks/140.md +5 -0
- package/test/fixtures/pfm/fenced_code_blocks/142.md +5 -0
- package/test/fixtures/pfm/fenced_code_blocks/144.md +2 -0
- package/test/fixtures/pfm/fenced_code_blocks/145.md +2 -0
- package/test/fixtures/pfm/fenced_code_blocks/pfm_119_2.md +8 -0
- package/test/fixtures/pfm/fenced_code_blocks/pfm_119_3.md +5 -0
- package/test/fixtures/pfm/frontmatter/1.md +5 -0
- package/test/fixtures/pfm/frontmatter/10.md +1 -0
- package/test/fixtures/pfm/frontmatter/2.md +2 -0
- package/test/fixtures/pfm/frontmatter/3.md +4 -0
- package/test/fixtures/pfm/frontmatter/4.md +5 -0
- package/test/fixtures/pfm/frontmatter/5.md +6 -0
- package/test/fixtures/pfm/frontmatter/6.md +8 -0
- package/test/fixtures/pfm/frontmatter/7.md +4 -0
- package/test/fixtures/pfm/frontmatter/8.md +5 -0
- package/test/fixtures/pfm/frontmatter/9.md +4 -0
- package/test/fixtures/pfm/generic_directives/001.md +1 -0
- package/test/fixtures/pfm/generic_directives/002.md +1 -0
- package/test/fixtures/pfm/generic_directives/003.md +1 -0
- package/test/fixtures/pfm/generic_directives/004.md +1 -0
- package/test/fixtures/pfm/generic_directives/005.md +1 -0
- package/test/fixtures/pfm/generic_directives/006.md +1 -0
- package/test/fixtures/pfm/generic_directives/007.md +1 -0
- package/test/fixtures/pfm/generic_directives/008.md +1 -0
- package/test/fixtures/pfm/generic_directives/009.md +1 -0
- package/test/fixtures/pfm/generic_directives/010.md +1 -0
- package/test/fixtures/pfm/generic_directives/011.md +1 -0
- package/test/fixtures/pfm/generic_directives/012.md +1 -0
- package/test/fixtures/pfm/generic_directives/013.md +1 -0
- package/test/fixtures/pfm/generic_directives/014.md +1 -0
- package/test/fixtures/pfm/generic_directives/015.md +3 -0
- package/test/fixtures/pfm/generic_directives/016.md +1 -0
- package/test/fixtures/pfm/generic_directives/017.md +1 -0
- package/test/fixtures/pfm/generic_directives/018.md +1 -0
- package/test/fixtures/pfm/generic_directives/019.md +2 -0
- package/test/fixtures/pfm/generic_directives/020.md +3 -0
- package/test/fixtures/pfm/generic_directives/021.md +3 -0
- package/test/fixtures/pfm/generic_directives/022.md +5 -0
- package/test/fixtures/pfm/generic_directives/023.md +2 -0
- package/test/fixtures/pfm/generic_directives/024.md +5 -0
- package/test/fixtures/pfm/generic_directives/025.md +2 -0
- package/test/fixtures/pfm/generic_directives/026.md +3 -0
- package/test/fixtures/pfm/generic_directives/027.md +5 -0
- package/test/fixtures/pfm/generic_directives/028.md +5 -0
- package/test/fixtures/pfm/generic_directives/029.md +7 -0
- package/test/fixtures/pfm/generic_directives/030.md +3 -0
- package/test/fixtures/pfm/generic_directives/031.md +4 -0
- package/test/fixtures/pfm/generic_directives/032.md +3 -0
- package/test/fixtures/pfm/generic_directives/033.md +3 -0
- package/test/fixtures/pfm/generic_directives/034.md +5 -0
- package/test/fixtures/pfm/generic_directives/035.md +3 -0
- package/test/fixtures/pfm/generic_directives/036.md +1 -0
- package/test/fixtures/pfm/generic_directives/037.md +1 -0
- package/test/fixtures/pfm/generic_directives/038.md +3 -0
- package/test/fixtures/pfm/generic_directives/039.md +5 -0
- package/test/fixtures/pfm/generic_directives/040.md +9 -0
- package/test/fixtures/pfm/generic_directives/041.md +1 -0
- package/test/fixtures/pfm/generic_directives/042.md +1 -0
- package/test/fixtures/pfm/generic_directives/043.md +1 -0
- package/test/fixtures/pfm/generic_directives/044.md +1 -0
- package/test/fixtures/pfm/generic_directives/045.md +1 -0
- package/test/fixtures/pfm/generic_directives/046.md +3 -0
- package/test/fixtures/pfm/generic_directives/047.md +5 -0
- package/test/fixtures/pfm/generic_directives/048.md +1 -0
- package/test/fixtures/pfm/generic_directives/049.md +1 -0
- package/test/fixtures/pfm/generic_directives/050.md +1 -0
- package/test/fixtures/pfm/generic_directives/051.md +1 -0
- package/test/fixtures/pfm/generic_directives/052.md +1 -0
- package/test/fixtures/pfm/generic_directives/053.md +1 -0
- package/test/fixtures/pfm/generic_directives/054.md +1 -0
- package/test/fixtures/pfm/generic_directives/055.md +1 -0
- package/test/fixtures/pfm/generic_directives/056.md +1 -0
- package/test/fixtures/pfm/generic_directives/057.md +1 -0
- package/test/fixtures/pfm/generic_directives/058.md +1 -0
- package/test/fixtures/pfm/generic_directives/059.md +1 -0
- package/test/fixtures/pfm/generic_directives/060.md +1 -0
- package/test/fixtures/pfm/generic_directives/061.md +1 -0
- package/test/fixtures/pfm/generic_directives/062.md +1 -0
- package/test/fixtures/pfm/generic_directives/063.md +1 -0
- package/test/fixtures/pfm/generic_directives/064.md +1 -0
- package/test/fixtures/pfm/generic_directives/065.md +2 -0
- package/test/fixtures/pfm/generic_directives/066.md +1 -0
- package/test/fixtures/pfm/generic_directives/067.md +1 -0
- package/test/fixtures/pfm/generic_directives/068.md +1 -0
- package/test/fixtures/pfm/generic_directives/069.md +1 -0
- package/test/fixtures/pfm/generic_directives/070.md +1 -0
- package/test/fixtures/pfm/generic_directives/071.md +1 -0
- package/test/fixtures/pfm/generic_directives/072.md +1 -0
- package/test/fixtures/pfm/generic_directives/073.md +1 -0
- package/test/fixtures/pfm/generic_directives/074.md +3 -0
- package/test/fixtures/pfm/generic_directives/075.md +1 -0
- package/test/fixtures/pfm/generic_directives/076.md +1 -0
- package/test/fixtures/pfm/generic_directives/077.md +1 -0
- package/test/fixtures/pfm/generic_directives/078.md +1 -0
- package/test/fixtures/pfm/generic_directives/079.md +1 -0
- package/test/fixtures/pfm/generic_directives/080.md +1 -0
- package/test/fixtures/pfm/generic_directives/081.md +1 -0
- package/test/fixtures/pfm/generic_directives/082.md +1 -0
- package/test/fixtures/pfm/generic_directives/083.md +1 -0
- package/test/fixtures/pfm/generic_directives/084.md +1 -0
- package/test/fixtures/pfm/generic_directives/085.md +1 -0
- package/test/fixtures/pfm/generic_directives/086.md +1 -0
- package/test/fixtures/pfm/generic_directives/087.md +1 -0
- package/test/fixtures/pfm/generic_directives/088.md +3 -0
- package/test/fixtures/pfm/generic_directives/089.md +1 -0
- package/test/fixtures/pfm/generic_directives/090.md +1 -0
- package/test/fixtures/pfm/generic_directives/091.md +1 -0
- package/test/fixtures/pfm/generic_directives/092.md +3 -0
- package/test/fixtures/pfm/generic_directives/093.md +1 -0
- package/test/fixtures/pfm/generic_directives/094.md +1 -0
- package/test/fixtures/pfm/generic_directives/095.md +2 -0
- package/test/fixtures/pfm/generic_directives/096.md +1 -0
- package/test/fixtures/pfm/generic_directives/097.md +1 -0
- package/test/fixtures/pfm/generic_directives/098.md +1 -0
- package/test/fixtures/pfm/generic_directives/099.md +1 -0
- package/test/fixtures/pfm/generic_directives/100.md +1 -0
- package/test/fixtures/pfm/generic_directives/101.md +1 -0
- package/test/fixtures/pfm/generic_directives/102.md +1 -0
- package/test/fixtures/pfm/generic_directives/103.md +5 -0
- package/test/fixtures/pfm/generic_directives/104.md +1 -0
- package/test/fixtures/pfm/generic_directives/105.md +1 -0
- package/test/fixtures/pfm/hard_line_breaks/633.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/634.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/635.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/636.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/637.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/638.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/639.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/640.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/641.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/642.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/643.md +2 -0
- package/test/fixtures/pfm/hard_line_breaks/644.md +1 -0
- package/test/fixtures/pfm/hard_line_breaks/645.md +1 -0
- package/test/fixtures/pfm/hard_line_breaks/646.md +1 -0
- package/test/fixtures/pfm/hard_line_breaks/647.md +1 -0
- package/test/fixtures/pfm/html/148.md +7 -0
- package/test/fixtures/pfm/html/149.md +9 -0
- package/test/fixtures/pfm/html/150.md +3 -0
- package/test/fixtures/pfm/html/151.md +2 -0
- package/test/fixtures/pfm/html/152.md +5 -0
- package/test/fixtures/pfm/html/153.md +3 -0
- package/test/fixtures/pfm/html/154.md +3 -0
- package/test/fixtures/pfm/html/155.md +4 -0
- package/test/fixtures/pfm/html/156.md +2 -0
- package/test/fixtures/pfm/html/157.md +2 -0
- package/test/fixtures/pfm/html/158.md +2 -0
- package/test/fixtures/pfm/html/159.md +1 -0
- package/test/fixtures/pfm/html/160.md +3 -0
- package/test/fixtures/pfm/html/161.md +4 -0
- package/test/fixtures/pfm/html/162.md +3 -0
- package/test/fixtures/pfm/html/163.md +3 -0
- package/test/fixtures/pfm/html/164.md +3 -0
- package/test/fixtures/pfm/html/165.md +2 -0
- package/test/fixtures/pfm/html/166.md +3 -0
- package/test/fixtures/pfm/html/167.md +5 -0
- package/test/fixtures/pfm/html/168.md +1 -0
- package/test/fixtures/pfm/html/169.md +7 -0
- package/test/fixtures/pfm/html/170.md +6 -0
- package/test/fixtures/pfm/html/171.md +7 -0
- package/test/fixtures/pfm/html/172.md +7 -0
- package/test/fixtures/pfm/html/173.md +4 -0
- package/test/fixtures/pfm/html/174.md +4 -0
- package/test/fixtures/pfm/html/175.md +2 -0
- package/test/fixtures/pfm/html/176.md +2 -0
- package/test/fixtures/pfm/html/177.md +2 -0
- package/test/fixtures/pfm/html/178.md +3 -0
- package/test/fixtures/pfm/html/179.md +5 -0
- package/test/fixtures/pfm/html/180.md +6 -0
- package/test/fixtures/pfm/html/181.md +1 -0
- package/test/fixtures/pfm/html/182.md +13 -0
- package/test/fixtures/pfm/html/183.md +3 -0
- package/test/fixtures/pfm/html/184.md +3 -0
- package/test/fixtures/pfm/html/185.md +4 -0
- package/test/fixtures/pfm/html/186.md +4 -0
- package/test/fixtures/pfm/html/187.md +3 -0
- package/test/fixtures/pfm/html/188.md +5 -0
- package/test/fixtures/pfm/html/189.md +3 -0
- package/test/fixtures/pfm/html/190.md +11 -0
- package/test/fixtures/pfm/html/191.md +11 -0
- package/test/fixtures/pfm/html/613.md +1 -0
- package/test/fixtures/pfm/html/614.md +1 -0
- package/test/fixtures/pfm/html/615.md +2 -0
- package/test/fixtures/pfm/html/616.md +2 -0
- package/test/fixtures/pfm/html/617.md +1 -0
- package/test/fixtures/pfm/html/618.md +1 -0
- package/test/fixtures/pfm/html/619.md +1 -0
- package/test/fixtures/pfm/html/620.md +1 -0
- package/test/fixtures/pfm/html/621.md +4 -0
- package/test/fixtures/pfm/html/622.md +1 -0
- package/test/fixtures/pfm/html/623.md +1 -0
- package/test/fixtures/pfm/html/624.md +1 -0
- package/test/fixtures/pfm/html/625.md +2 -0
- package/test/fixtures/pfm/html/626.md +3 -0
- package/test/fixtures/pfm/html/627.md +1 -0
- package/test/fixtures/pfm/html/628.md +1 -0
- package/test/fixtures/pfm/html/629.md +1 -0
- package/test/fixtures/pfm/html/630.md +1 -0
- package/test/fixtures/pfm/html/631.md +1 -0
- package/test/fixtures/pfm/html/632.md +1 -0
- package/test/fixtures/pfm/images/572.md +1 -0
- package/test/fixtures/pfm/images/573.md +3 -0
- package/test/fixtures/pfm/images/574.md +1 -0
- package/test/fixtures/pfm/images/575.md +1 -0
- package/test/fixtures/pfm/images/576.md +3 -0
- package/test/fixtures/pfm/images/577.md +3 -0
- package/test/fixtures/pfm/images/578.md +1 -0
- package/test/fixtures/pfm/images/579.md +1 -0
- package/test/fixtures/pfm/images/580.md +1 -0
- package/test/fixtures/pfm/images/581.md +1 -0
- package/test/fixtures/pfm/images/582.md +3 -0
- package/test/fixtures/pfm/images/583.md +3 -0
- package/test/fixtures/pfm/images/584.md +3 -0
- package/test/fixtures/pfm/images/585.md +3 -0
- package/test/fixtures/pfm/images/586.md +3 -0
- package/test/fixtures/pfm/images/587.md +4 -0
- package/test/fixtures/pfm/images/588.md +3 -0
- package/test/fixtures/pfm/images/589.md +3 -0
- package/test/fixtures/pfm/images/590.md +3 -0
- package/test/fixtures/pfm/images/591.md +3 -0
- package/test/fixtures/pfm/images/592.md +3 -0
- package/test/fixtures/pfm/images/593.md +3 -0
- package/test/fixtures/pfm/imports/1.md +3 -0
- package/test/fixtures/pfm/imports/10.md +1 -0
- package/test/fixtures/pfm/imports/11.md +3 -0
- package/test/fixtures/pfm/imports/2.md +4 -0
- package/test/fixtures/pfm/imports/3.md +4 -0
- package/test/fixtures/pfm/imports/4.md +3 -0
- package/test/fixtures/pfm/imports/5.md +3 -0
- package/test/fixtures/pfm/imports/6.md +5 -0
- package/test/fixtures/pfm/imports/7.md +3 -0
- package/test/fixtures/pfm/imports/8.md +3 -0
- package/test/fixtures/pfm/imports/9.md +1 -0
- package/test/fixtures/pfm/inlines/327.md +1 -0
- package/test/fixtures/pfm/link_reference_definitions/192.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/193.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/194.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/195.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/196.md +7 -0
- package/test/fixtures/pfm/link_reference_definitions/197.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/198.md +4 -0
- package/test/fixtures/pfm/link_reference_definitions/199.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/200.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/201.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/202.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/203.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/204.md +4 -0
- package/test/fixtures/pfm/link_reference_definitions/205.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/206.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/207.md +1 -0
- package/test/fixtures/pfm/link_reference_definitions/208.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/209.md +1 -0
- package/test/fixtures/pfm/link_reference_definitions/210.md +2 -0
- package/test/fixtures/pfm/link_reference_definitions/211.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/212.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/213.md +4 -0
- package/test/fixtures/pfm/link_reference_definitions/214.md +5 -0
- package/test/fixtures/pfm/link_reference_definitions/215.md +4 -0
- package/test/fixtures/pfm/link_reference_definitions/216.md +3 -0
- package/test/fixtures/pfm/link_reference_definitions/217.md +8 -0
- package/test/fixtures/pfm/link_reference_definitions/218.md +3 -0
- package/test/fixtures/pfm/links/482.md +1 -0
- package/test/fixtures/pfm/links/483.md +1 -0
- package/test/fixtures/pfm/links/484.md +1 -0
- package/test/fixtures/pfm/links/485.md +1 -0
- package/test/fixtures/pfm/links/486.md +1 -0
- package/test/fixtures/pfm/links/487.md +1 -0
- package/test/fixtures/pfm/links/488.md +1 -0
- package/test/fixtures/pfm/links/489.md +1 -0
- package/test/fixtures/pfm/links/490.md +2 -0
- package/test/fixtures/pfm/links/491.md +2 -0
- package/test/fixtures/pfm/links/492.md +1 -0
- package/test/fixtures/pfm/links/493.md +1 -0
- package/test/fixtures/pfm/links/494.md +3 -0
- package/test/fixtures/pfm/links/495.md +1 -0
- package/test/fixtures/pfm/links/496.md +1 -0
- package/test/fixtures/pfm/links/497.md +1 -0
- package/test/fixtures/pfm/links/498.md +1 -0
- package/test/fixtures/pfm/links/499.md +1 -0
- package/test/fixtures/pfm/links/500.md +1 -0
- package/test/fixtures/pfm/links/501.md +5 -0
- package/test/fixtures/pfm/links/502.md +1 -0
- package/test/fixtures/pfm/links/503.md +1 -0
- package/test/fixtures/pfm/links/504.md +1 -0
- package/test/fixtures/pfm/links/505.md +3 -0
- package/test/fixtures/pfm/links/506.md +1 -0
- package/test/fixtures/pfm/links/507.md +1 -0
- package/test/fixtures/pfm/links/508.md +1 -0
- package/test/fixtures/pfm/links/509.md +1 -0
- package/test/fixtures/pfm/links/510.md +2 -0
- package/test/fixtures/pfm/links/511.md +1 -0
- package/test/fixtures/pfm/links/512.md +1 -0
- package/test/fixtures/pfm/links/513.md +1 -0
- package/test/fixtures/pfm/links/514.md +1 -0
- package/test/fixtures/pfm/links/515.md +1 -0
- package/test/fixtures/pfm/links/516.md +1 -0
- package/test/fixtures/pfm/links/517.md +1 -0
- package/test/fixtures/pfm/links/518.md +1 -0
- package/test/fixtures/pfm/links/519.md +1 -0
- package/test/fixtures/pfm/links/520.md +1 -0
- package/test/fixtures/pfm/links/521.md +1 -0
- package/test/fixtures/pfm/links/522.md +1 -0
- package/test/fixtures/pfm/links/523.md +1 -0
- package/test/fixtures/pfm/links/524.md +1 -0
- package/test/fixtures/pfm/links/525.md +1 -0
- package/test/fixtures/pfm/links/526.md +1 -0
- package/test/fixtures/pfm/links/527.md +3 -0
- package/test/fixtures/pfm/links/528.md +3 -0
- package/test/fixtures/pfm/links/529.md +3 -0
- package/test/fixtures/pfm/links/530.md +3 -0
- package/test/fixtures/pfm/links/531.md +3 -0
- package/test/fixtures/pfm/links/532.md +3 -0
- package/test/fixtures/pfm/links/533.md +3 -0
- package/test/fixtures/pfm/links/534.md +3 -0
- package/test/fixtures/pfm/links/535.md +3 -0
- package/test/fixtures/pfm/links/536.md +3 -0
- package/test/fixtures/pfm/links/537.md +3 -0
- package/test/fixtures/pfm/links/538.md +3 -0
- package/test/fixtures/pfm/links/539.md +3 -0
- package/test/fixtures/pfm/links/540.md +3 -0
- package/test/fixtures/pfm/links/541.md +4 -0
- package/test/fixtures/pfm/links/542.md +3 -0
- package/test/fixtures/pfm/links/543.md +4 -0
- package/test/fixtures/pfm/links/544.md +5 -0
- package/test/fixtures/pfm/links/545.md +3 -0
- package/test/fixtures/pfm/links/546.md +3 -0
- package/test/fixtures/pfm/links/547.md +3 -0
- package/test/fixtures/pfm/links/548.md +3 -0
- package/test/fixtures/pfm/links/549.md +3 -0
- package/test/fixtures/pfm/links/550.md +3 -0
- package/test/fixtures/pfm/links/551.md +3 -0
- package/test/fixtures/pfm/links/552.md +5 -0
- package/test/fixtures/pfm/links/553.md +3 -0
- package/test/fixtures/pfm/links/554.md +3 -0
- package/test/fixtures/pfm/links/555.md +3 -0
- package/test/fixtures/pfm/links/556.md +4 -0
- package/test/fixtures/pfm/links/557.md +3 -0
- package/test/fixtures/pfm/links/558.md +3 -0
- package/test/fixtures/pfm/links/559.md +3 -0
- package/test/fixtures/pfm/links/560.md +3 -0
- package/test/fixtures/pfm/links/561.md +3 -0
- package/test/fixtures/pfm/links/562.md +3 -0
- package/test/fixtures/pfm/links/563.md +3 -0
- package/test/fixtures/pfm/links/564.md +3 -0
- package/test/fixtures/pfm/links/565.md +4 -0
- package/test/fixtures/pfm/links/566.md +3 -0
- package/test/fixtures/pfm/links/567.md +3 -0
- package/test/fixtures/pfm/links/568.md +3 -0
- package/test/fixtures/pfm/links/569.md +3 -0
- package/test/fixtures/pfm/links/570.md +4 -0
- package/test/fixtures/pfm/links/571.md +4 -0
- package/test/fixtures/pfm/list_items/253.md +6 -0
- package/test/fixtures/pfm/list_items/254.md +6 -0
- package/test/fixtures/pfm/list_items/255.md +3 -0
- package/test/fixtures/pfm/list_items/256.md +3 -0
- package/test/fixtures/pfm/list_items/257.md +3 -0
- package/test/fixtures/pfm/list_items/258.md +3 -0
- package/test/fixtures/pfm/list_items/259.md +3 -0
- package/test/fixtures/pfm/list_items/260.md +3 -0
- package/test/fixtures/pfm/list_items/261.md +3 -0
- package/test/fixtures/pfm/list_items/262.md +4 -0
- package/test/fixtures/pfm/list_items/263.md +9 -0
- package/test/fixtures/pfm/list_items/264.md +6 -0
- package/test/fixtures/pfm/list_items/265.md +1 -0
- package/test/fixtures/pfm/list_items/266.md +1 -0
- package/test/fixtures/pfm/list_items/267.md +1 -0
- package/test/fixtures/pfm/list_items/268.md +1 -0
- package/test/fixtures/pfm/list_items/269.md +1 -0
- package/test/fixtures/pfm/list_items/270.md +3 -0
- package/test/fixtures/pfm/list_items/271.md +3 -0
- package/test/fixtures/pfm/list_items/272.md +5 -0
- package/test/fixtures/pfm/list_items/273.md +5 -0
- package/test/fixtures/pfm/list_items/274.md +5 -0
- package/test/fixtures/pfm/list_items/275.md +3 -0
- package/test/fixtures/pfm/list_items/276.md +3 -0
- package/test/fixtures/pfm/list_items/277.md +3 -0
- package/test/fixtures/pfm/list_items/278.md +8 -0
- package/test/fixtures/pfm/list_items/279.md +2 -0
- package/test/fixtures/pfm/list_items/280.md +3 -0
- package/test/fixtures/pfm/list_items/281.md +3 -0
- package/test/fixtures/pfm/list_items/282.md +3 -0
- package/test/fixtures/pfm/list_items/283.md +3 -0
- package/test/fixtures/pfm/list_items/284.md +1 -0
- package/test/fixtures/pfm/list_items/285.md +5 -0
- package/test/fixtures/pfm/list_items/286.md +6 -0
- package/test/fixtures/pfm/list_items/287.md +6 -0
- package/test/fixtures/pfm/list_items/288.md +6 -0
- package/test/fixtures/pfm/list_items/289.md +6 -0
- package/test/fixtures/pfm/list_items/290.md +6 -0
- package/test/fixtures/pfm/list_items/291.md +2 -0
- package/test/fixtures/pfm/list_items/292.md +2 -0
- package/test/fixtures/pfm/list_items/293.md +2 -0
- package/test/fixtures/pfm/list_items/294.md +4 -0
- package/test/fixtures/pfm/list_items/295.md +4 -0
- package/test/fixtures/pfm/list_items/296.md +2 -0
- package/test/fixtures/pfm/list_items/297.md +2 -0
- package/test/fixtures/pfm/list_items/298.md +1 -0
- package/test/fixtures/pfm/list_items/299.md +1 -0
- package/test/fixtures/pfm/list_items/300.md +4 -0
- package/test/fixtures/pfm/lists/301.md +3 -0
- package/test/fixtures/pfm/lists/302.md +3 -0
- package/test/fixtures/pfm/lists/303.md +3 -0
- package/test/fixtures/pfm/lists/304.md +2 -0
- package/test/fixtures/pfm/lists/305.md +2 -0
- package/test/fixtures/pfm/lists/306.md +6 -0
- package/test/fixtures/pfm/lists/307.md +6 -0
- package/test/fixtures/pfm/lists/308.md +7 -0
- package/test/fixtures/pfm/lists/309.md +9 -0
- package/test/fixtures/pfm/lists/310.md +7 -0
- package/test/fixtures/pfm/lists/311.md +5 -0
- package/test/fixtures/pfm/lists/312.md +5 -0
- package/test/fixtures/pfm/lists/313.md +5 -0
- package/test/fixtures/pfm/lists/314.md +4 -0
- package/test/fixtures/pfm/lists/315.md +4 -0
- package/test/fixtures/pfm/lists/316.md +5 -0
- package/test/fixtures/pfm/lists/317.md +5 -0
- package/test/fixtures/pfm/lists/318.md +7 -0
- package/test/fixtures/pfm/lists/319.md +5 -0
- package/test/fixtures/pfm/lists/320.md +4 -0
- package/test/fixtures/pfm/lists/321.md +6 -0
- package/test/fixtures/pfm/lists/322.md +1 -0
- package/test/fixtures/pfm/lists/323.md +2 -0
- package/test/fixtures/pfm/lists/324.md +5 -0
- package/test/fixtures/pfm/lists/325.md +4 -0
- package/test/fixtures/pfm/lists/326.md +7 -0
- package/test/fixtures/pfm/paragraphs/219.md +3 -0
- package/test/fixtures/pfm/paragraphs/220.md +5 -0
- package/test/fixtures/pfm/paragraphs/221.md +4 -0
- package/test/fixtures/pfm/paragraphs/222.md +2 -0
- package/test/fixtures/pfm/paragraphs/223.md +3 -0
- package/test/fixtures/pfm/paragraphs/224.md +2 -0
- package/test/fixtures/pfm/paragraphs/225.md +2 -0
- package/test/fixtures/pfm/precedence/42.md +2 -0
- package/test/fixtures/pfm/setext_headings/100.md +2 -0
- package/test/fixtures/pfm/setext_headings/101.md +2 -0
- package/test/fixtures/pfm/setext_headings/102.md +2 -0
- package/test/fixtures/pfm/setext_headings/103.md +5 -0
- package/test/fixtures/pfm/setext_headings/104.md +6 -0
- package/test/fixtures/pfm/setext_headings/105.md +4 -0
- package/test/fixtures/pfm/setext_headings/106.md +4 -0
- package/test/fixtures/pfm/setext_headings/80.md +5 -0
- package/test/fixtures/pfm/setext_headings/81.md +3 -0
- package/test/fixtures/pfm/setext_headings/82.md +3 -0
- package/test/fixtures/pfm/setext_headings/83.md +5 -0
- package/test/fixtures/pfm/setext_headings/84.md +8 -0
- package/test/fixtures/pfm/setext_headings/85.md +5 -0
- package/test/fixtures/pfm/setext_headings/86.md +2 -0
- package/test/fixtures/pfm/setext_headings/87.md +2 -0
- package/test/fixtures/pfm/setext_headings/88.md +5 -0
- package/test/fixtures/pfm/setext_headings/89.md +2 -0
- package/test/fixtures/pfm/setext_headings/90.md +2 -0
- package/test/fixtures/pfm/setext_headings/91.md +7 -0
- package/test/fixtures/pfm/setext_headings/92.md +2 -0
- package/test/fixtures/pfm/setext_headings/93.md +3 -0
- package/test/fixtures/pfm/setext_headings/94.md +2 -0
- package/test/fixtures/pfm/setext_headings/95.md +3 -0
- package/test/fixtures/pfm/setext_headings/96.md +6 -0
- package/test/fixtures/pfm/setext_headings/97.md +2 -0
- package/test/fixtures/pfm/setext_headings/98.md +2 -0
- package/test/fixtures/pfm/setext_headings/99.md +2 -0
- package/test/fixtures/pfm/soft_line_breaks/648.md +2 -0
- package/test/fixtures/pfm/soft_line_breaks/649.md +2 -0
- package/test/fixtures/pfm/tabs/1.md +1 -0
- package/test/fixtures/pfm/tabs/10.md +1 -0
- package/test/fixtures/pfm/tabs/11.md +1 -0
- package/test/fixtures/pfm/tabs/12.md +2 -0
- package/test/fixtures/pfm/tabs/13.md +2 -0
- package/test/fixtures/pfm/tabs/14.md +3 -0
- package/test/fixtures/pfm/tabs/15.md +2 -0
- package/test/fixtures/pfm/tabs/16.md +2 -0
- package/test/fixtures/pfm/tabs/17.md +3 -0
- package/test/fixtures/pfm/tabs/2.md +1 -0
- package/test/fixtures/pfm/tabs/3.md +2 -0
- package/test/fixtures/pfm/tabs/4.md +3 -0
- package/test/fixtures/pfm/tabs/5.md +3 -0
- package/test/fixtures/pfm/tabs/6.md +1 -0
- package/test/fixtures/pfm/tabs/7.md +1 -0
- package/test/fixtures/pfm/tabs/8.md +2 -0
- package/test/fixtures/pfm/tabs/9.md +3 -0
- package/test/fixtures/pfm/textual_content/650.md +1 -0
- package/test/fixtures/pfm/textual_content/651.md +1 -0
- package/test/fixtures/pfm/textual_content/652.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/43.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/44.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/45.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/46.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/47.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/48.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/49.md +2 -0
- package/test/fixtures/pfm/thematic_breaks/50.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/51.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/52.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/53.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/54.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/55.md +5 -0
- package/test/fixtures/pfm/thematic_breaks/56.md +1 -0
- package/test/fixtures/pfm/thematic_breaks/57.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/58.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/59.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/60.md +3 -0
- package/test/fixtures/pfm/thematic_breaks/61.md +2 -0
- package/test/fixtures/svelte/00-introduction/00-hello-world/App.svelte +5 -0
- package/test/fixtures/svelte/00-introduction/01-dynamic-attributes/App.svelte +7 -0
- package/test/fixtures/svelte/00-introduction/02-styling/App.svelte +9 -0
- package/test/fixtures/svelte/00-introduction/03-nested-components/App.svelte +14 -0
- package/test/fixtures/svelte/00-introduction/03-nested-components/Nested.svelte +1 -0
- package/test/fixtures/svelte/00-introduction/04-html-tags/App.svelte +5 -0
- package/test/fixtures/svelte/01-reactivity/00-reactive-assignments/App.svelte +11 -0
- package/test/fixtures/svelte/01-reactivity/01-reactive-declarations/App.svelte +18 -0
- package/test/fixtures/svelte/01-reactivity/02-reactive-statements/App.svelte +16 -0
- package/test/fixtures/svelte/02-props/00-declaring-props/App.svelte +5 -0
- package/test/fixtures/svelte/02-props/00-declaring-props/Nested.svelte +5 -0
- package/test/fixtures/svelte/02-props/01-default-values/App.svelte +6 -0
- package/test/fixtures/svelte/02-props/01-default-values/Nested.svelte +5 -0
- package/test/fixtures/svelte/02-props/02-spread-props/App.svelte +12 -0
- package/test/fixtures/svelte/02-props/02-spread-props/Info.svelte +12 -0
- package/test/fixtures/svelte/03-logic/00-if-blocks/App.svelte +19 -0
- package/test/fixtures/svelte/03-logic/01-else-blocks/App.svelte +17 -0
- package/test/fixtures/svelte/03-logic/02-else-if-blocks/App.svelte +11 -0
- package/test/fixtures/svelte/03-logic/03-each-blocks/App.svelte +17 -0
- package/test/fixtures/svelte/03-logic/04-keyed-each-blocks/App.svelte +35 -0
- package/test/fixtures/svelte/03-logic/04-keyed-each-blocks/Thing.svelte +24 -0
- package/test/fixtures/svelte/04-events/00-dom-events/App.svelte +16 -0
- package/test/fixtures/svelte/04-events/01-inline-handlers/App.svelte +11 -0
- package/test/fixtures/svelte/04-events/02-event-modifiers/App.svelte +9 -0
- package/test/fixtures/svelte/04-events/03-component-events/App.svelte +9 -0
- package/test/fixtures/svelte/04-events/03-component-events/Inner.svelte +15 -0
- package/test/fixtures/svelte/04-events/04-event-forwarding/App.svelte +9 -0
- package/test/fixtures/svelte/04-events/04-event-forwarding/Inner.svelte +15 -0
- package/test/fixtures/svelte/04-events/04-event-forwarding/Outer.svelte +5 -0
- package/test/fixtures/svelte/04-events/05-dom-event-forwarding/App.svelte +9 -0
- package/test/fixtures/svelte/04-events/05-dom-event-forwarding/FancyButton.svelte +15 -0
- package/test/fixtures/svelte/05-bindings/00-text-inputs/App.svelte +6 -0
- package/test/fixtures/svelte/05-bindings/01-numeric-inputs/App.svelte +16 -0
- package/test/fixtures/svelte/05-bindings/02-checkbox-inputs/App.svelte +18 -0
- package/test/fixtures/svelte/05-bindings/03-group-inputs/App.svelte +48 -0
- package/test/fixtures/svelte/05-bindings/04-textarea-inputs/App.svelte +12 -0
- package/test/fixtures/svelte/05-bindings/05-select-bindings/App.svelte +42 -0
- package/test/fixtures/svelte/05-bindings/06-multiple-select-bindings/App.svelte +49 -0
- package/test/fixtures/svelte/05-bindings/07-each-block-bindings/App.svelte +49 -0
- package/test/fixtures/svelte/05-bindings/08-media-elements/App.svelte +136 -0
- package/test/fixtures/svelte/05-bindings/09-dimensions/App.svelte +20 -0
- package/test/fixtures/svelte/05-bindings/10-bind-this/App.svelte +55 -0
- package/test/fixtures/svelte/05-bindings/11-component-bindings/App.svelte +14 -0
- package/test/fixtures/svelte/05-bindings/11-component-bindings/Keypad.svelte +40 -0
- package/test/fixtures/svelte/06-lifecycle/00-onmount/App.svelte +40 -0
- package/test/fixtures/svelte/06-lifecycle/01-ondestroy/App.svelte +11 -0
- package/test/fixtures/svelte/06-lifecycle/02-update/App.svelte +112 -0
- package/test/fixtures/svelte/06-lifecycle/03-tick/App.svelte +34 -0
- package/test/fixtures/svelte/07-stores/00-writable-stores/App.svelte +18 -0
- package/test/fixtures/svelte/07-stores/00-writable-stores/Decrementer.svelte +11 -0
- package/test/fixtures/svelte/07-stores/00-writable-stores/Incrementer.svelte +11 -0
- package/test/fixtures/svelte/07-stores/00-writable-stores/Resetter.svelte +11 -0
- package/test/fixtures/svelte/07-stores/01-auto-subscriptions/App.svelte +12 -0
- package/test/fixtures/svelte/07-stores/01-auto-subscriptions/Decrementer.svelte +11 -0
- package/test/fixtures/svelte/07-stores/01-auto-subscriptions/Incrementer.svelte +11 -0
- package/test/fixtures/svelte/07-stores/01-auto-subscriptions/Resetter.svelte +11 -0
- package/test/fixtures/svelte/07-stores/02-readable-stores/App.svelte +12 -0
- package/test/fixtures/svelte/07-stores/03-derived-stores/App.svelte +17 -0
- package/test/fixtures/svelte/07-stores/04-custom-stores/App.svelte +9 -0
- package/test/fixtures/svelte/08-motion/00-tweened/App.svelte +38 -0
- package/test/fixtures/svelte/08-motion/01-spring/App.svelte +38 -0
- package/test/fixtures/svelte/09-transitions/00-transition/App.svelte +15 -0
- package/test/fixtures/svelte/09-transitions/01-adding-parameters-to-transitions/App.svelte +15 -0
- package/test/fixtures/svelte/09-transitions/02-in-and-out/App.svelte +15 -0
- package/test/fixtures/svelte/09-transitions/03-custom-css-transitions/App.svelte +49 -0
- package/test/fixtures/svelte/09-transitions/04-custom-js-transitions/App.svelte +36 -0
- package/test/fixtures/svelte/09-transitions/05-transition-events/App.svelte +25 -0
- package/test/fixtures/svelte/10-animations/00-animate/App.svelte +147 -0
- package/test/fixtures/svelte/11-easing/00-easing/App.svelte +106 -0
- package/test/fixtures/svelte/11-easing/00-easing/Controls.svelte +186 -0
- package/test/fixtures/svelte/11-easing/00-easing/Grid.svelte +62 -0
- package/test/fixtures/svelte/12-svg/01-clock/App.svelte +104 -0
- package/test/fixtures/svelte/12-svg/02-bar-chart/App.svelte +118 -0
- package/test/fixtures/svelte/12-svg/03-area-chart/App.svelte +111 -0
- package/test/fixtures/svelte/12-svg/04-scatterplot/App.svelte +24 -0
- package/test/fixtures/svelte/12-svg/04-scatterplot/Scatterplot.svelte +91 -0
- package/test/fixtures/svelte/12-svg/05-svg-transitions/App.svelte +74 -0
- package/test/fixtures/svelte/13-actions/00-actions/App.svelte +54 -0
- package/test/fixtures/svelte/13-actions/01-adding-parameters-to-actions/App.svelte +70 -0
- package/test/fixtures/svelte/14-classes/00-classes/App.svelte +29 -0
- package/test/fixtures/svelte/14-classes/01-class-shorthand/App.svelte +18 -0
- package/test/fixtures/svelte/15-composition/00-slots/App.svelte +8 -0
- package/test/fixtures/svelte/15-composition/00-slots/Box.svelte +14 -0
- package/test/fixtures/svelte/15-composition/01-slot-fallbacks/App.svelte +10 -0
- package/test/fixtures/svelte/15-composition/01-slot-fallbacks/Box.svelte +16 -0
- package/test/fixtures/svelte/15-composition/02-named-slots/App.svelte +14 -0
- package/test/fixtures/svelte/15-composition/02-named-slots/ContactCard.svelte +47 -0
- package/test/fixtures/svelte/15-composition/03-slot-props/App.svelte +46 -0
- package/test/fixtures/svelte/15-composition/03-slot-props/Hoverable.svelte +15 -0
- package/test/fixtures/svelte/15-composition/04-modal/App.svelte +35 -0
- package/test/fixtures/svelte/15-composition/04-modal/Modal.svelte +45 -0
- package/test/fixtures/svelte/16-context/00-context-api/App.svelte +13 -0
- package/test/fixtures/svelte/16-context/00-context-api/Map.svelte +50 -0
- package/test/fixtures/svelte/16-context/00-context-api/MapMarker.svelte +18 -0
- package/test/fixtures/svelte/17-special-elements/00-svelte-self/App.svelte +39 -0
- package/test/fixtures/svelte/17-special-elements/00-svelte-self/File.svelte +14 -0
- package/test/fixtures/svelte/17-special-elements/00-svelte-self/Folder.svelte +52 -0
- package/test/fixtures/svelte/17-special-elements/01-svelte-component/App.svelte +21 -0
- package/test/fixtures/svelte/17-special-elements/01-svelte-component/BlueThing.svelte +5 -0
- package/test/fixtures/svelte/17-special-elements/01-svelte-component/GreenThing.svelte +5 -0
- package/test/fixtures/svelte/17-special-elements/01-svelte-component/RedThing.svelte +5 -0
- package/test/fixtures/svelte/17-special-elements/02-svelte-window/App.svelte +42 -0
- package/test/fixtures/svelte/17-special-elements/03-svelte-window-bindings/App.svelte +88 -0
- package/test/fixtures/svelte/17-special-elements/04-svelte-body/App.svelte +34 -0
- package/test/fixtures/svelte/17-special-elements/05-svelte-head/App.svelte +5 -0
- package/test/fixtures/svelte/18-module-context/01-module-exports/App.svelte +47 -0
- package/test/fixtures/svelte/18-module-context/01-module-exports/AudioPlayer.svelte +52 -0
- package/test/fixtures/svelte/19-debugging/00-debug/App.svelte +18 -0
- package/test/fixtures/svelte/19-debugging/00-debug/Test.svelte +250 -0
- package/test/fixtures/svelte/20-7guis/01-7guis-counter/App.svelte +7 -0
- package/test/fixtures/svelte/20-7guis/02-7guis-temperature/App.svelte +24 -0
- package/test/fixtures/svelte/20-7guis/03-7guis-flight-booker/App.svelte +59 -0
- package/test/fixtures/svelte/20-7guis/04-7guis-timer/App.svelte +38 -0
- package/test/fixtures/svelte/20-7guis/05-7guis-crud/App.svelte +97 -0
- package/test/fixtures/svelte/20-7guis/06-7guis-circles/App.svelte +125 -0
- package/test/fixtures/svelte/21-miscellaneous/01-hacker-news/App.svelte +59 -0
- package/test/fixtures/svelte/21-miscellaneous/01-hacker-news/Comment.svelte +32 -0
- package/test/fixtures/svelte/21-miscellaneous/01-hacker-news/Item.svelte +39 -0
- package/test/fixtures/svelte/21-miscellaneous/01-hacker-news/List.svelte +46 -0
- package/test/fixtures/svelte/21-miscellaneous/01-hacker-news/Summary.svelte +38 -0
- package/test/fixtures/svelte/21-miscellaneous/02-immutable-data/App.svelte +38 -0
- package/test/fixtures/svelte/21-miscellaneous/02-immutable-data/ImmutableTodo.svelte +28 -0
- package/test/fixtures/svelte/21-miscellaneous/02-immutable-data/MutableTodo.svelte +26 -0
- package/test/fixtures/svelte/22-bugs/CSS/App.svelte +45 -0
- package/test/fixtures/svelte/99-embeds/20181225-blog-svelte-css-in-js/App.svelte +10 -0
- package/test/fixtures/svelte/99-embeds/20181225-blog-svelte-css-in-js/Hero.svelte +15 -0
- package/test/fixtures/svelte/99-embeds/20190420-blog-write-less-code/App.svelte +9 -0
- package/test/frontmatter.spec.ts +133 -0
- package/test/html.spec.ts +786 -0
- package/test/images.spec.ts +106 -0
- package/test/imports.spec.ts +166 -0
- package/test/incremental.spec.ts +479 -0
- package/test/line_breaks.spec.ts +166 -0
- package/test/link_reference_definitions.spec.ts +422 -0
- package/test/links.spec.ts +234 -0
- package/test/lists.spec.ts +588 -0
- package/test/opcodes.spec.ts +325 -0
- package/test/paragraphs.spec.ts +211 -0
- package/test/plugins.spec.ts +909 -0
- package/test/print.ts +109 -0
- package/test/snapshots/hybrid/code-escaping.snap.ast +13 -0
- package/test/snapshots/hybrid/code-highlight-nesting.snap.ast +2 -0
- package/test/snapshots/hybrid/component-children.snap.ast +44 -0
- package/test/snapshots/hybrid/component-simple-00.snap.ast +19 -0
- package/test/snapshots/hybrid/component-simple-01.snap.ast +16 -0
- package/test/snapshots/hybrid/component-simple-02.snap.ast +3 -0
- package/test/snapshots/hybrid/component-simple-03.snap.ast +16 -0
- package/test/snapshots/hybrid/component-simple-04.snap.ast +24 -0
- package/test/snapshots/hybrid/dollar-one-in-frontmatter.snap.ast +3 -0
- package/test/snapshots/hybrid/error.snap.ast +25 -0
- package/test/snapshots/hybrid/link-curlies.snap.ast +56 -0
- package/test/snapshots/hybrid/tags-in-frontmatter.snap.ast +2 -0
- package/test/snapshots/markdown/anchors-by-reference.snap.ast +28 -0
- package/test/snapshots/markdown/anchors-followed-by-brakets.snap.ast +28 -0
- package/test/snapshots/markdown/automatic-anchors.snap.ast +6 -0
- package/test/snapshots/markdown/blockquote-followed-by-code.snap.ast +19 -0
- package/test/snapshots/markdown/blockquote-inside-code.snap.ast +8 -0
- package/test/snapshots/markdown/blockquote-nested-markdown.snap.ast +15 -0
- package/test/snapshots/markdown/blockquote.snap.ast +9 -0
- package/test/snapshots/markdown/code-block-html-escape.snap.ast +7 -0
- package/test/snapshots/markdown/code-block-with-special-chars.snap.ast +2 -0
- package/test/snapshots/markdown/code-block.snap.ast +7 -0
- package/test/snapshots/markdown/double-emphasis.snap.ast +32 -0
- package/test/snapshots/markdown/doubline-list.snap.ast +10 -0
- package/test/snapshots/markdown/ellipsis.snap.ast +41 -0
- package/test/snapshots/markdown/emphasis-inside-inline-code.snap.ast +5 -0
- package/test/snapshots/markdown/emphasis.snap.ast +296 -0
- package/test/snapshots/markdown/encodeHTMLCodeTags.snap.ast +19 -0
- package/test/snapshots/markdown/escaped-html-taglikes.snap.ast +21 -0
- package/test/snapshots/markdown/escaped-number-period.snap.ast +5 -0
- package/test/snapshots/markdown/escaping.snap.ast +65 -0
- package/test/snapshots/markdown/github-style-at-start.snap.ast +7 -0
- package/test/snapshots/markdown/github-style-codeblock-inside-quote.snap.ast +6 -0
- package/test/snapshots/markdown/github-style-codeblock.snap.ast +38 -0
- package/test/snapshots/markdown/github-style-linebreaks.snap.ast +2 -0
- package/test/snapshots/markdown/h1-with-double-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h1-with-equals.snap.ast +6 -0
- package/test/snapshots/markdown/h1-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h2-with-dashes.snap.ast +5 -0
- package/test/snapshots/markdown/h2-with-double-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h2-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h3-with-double-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h3-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h4-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h5-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/h6-with-single-hash.snap.ast +4 -0
- package/test/snapshots/markdown/horizontal-rules.snap.ast +11 -0
- package/test/snapshots/markdown/html-comments.snap.ast +21 -0
- package/test/snapshots/markdown/html-inside-listed-code.snap.ast +6 -0
- package/test/snapshots/markdown/html5-strutural-tags.snap.ast +147 -0
- package/test/snapshots/markdown/images-followed-by-brackets.snap.ast +12 -0
- package/test/snapshots/markdown/images.snap.ast +35 -0
- package/test/snapshots/markdown/implicit-anchors.snap.ast +22 -0
- package/test/snapshots/markdown/inline-anchors.snap.ast +13 -0
- package/test/snapshots/markdown/inline-code.snap.ast +41 -0
- package/test/snapshots/markdown/inline-escaped-chars.snap.ast +10 -0
- package/test/snapshots/markdown/inline-style-tag.snap.ast +7 -0
- package/test/snapshots/markdown/lazy-blockquote.snap.ast +10 -0
- package/test/snapshots/markdown/line-starts-with-html.snap.ast +12 -0
- package/test/snapshots/markdown/list-followed-by-blockquote.snap.ast +23 -0
- package/test/snapshots/markdown/list-followed-by-ghcode.snap.ast +20 -0
- package/test/snapshots/markdown/list-with-blockquote.snap.ast +11 -0
- package/test/snapshots/markdown/literal-html-tags.snap.ast +47 -0
- package/test/snapshots/markdown/multi-paragraph-list.snap.ast +14 -0
- package/test/snapshots/markdown/multiline-unordered-list.snap.ast +9 -0
- package/test/snapshots/markdown/nested-blockquote.snap.ast +13 -0
- package/test/snapshots/markdown/nested-gh-codeblocks.snap.ast +6 -0
- package/test/snapshots/markdown/obfuscated-emails.snap.ast +1 -0
- package/test/snapshots/markdown/ordered-list-same-number.snap.ast +9 -0
- package/test/snapshots/markdown/ordered-list-starting-number.snap.ast +22 -0
- package/test/snapshots/markdown/ordered-list-wrong-numbers.snap.ast +9 -0
- package/test/snapshots/markdown/ordered-list.snap.ast +9 -0
- package/test/snapshots/markdown/paragraphed-list-with-sublists.snap.ast +26 -0
- package/test/snapshots/markdown/pre-code-tags-inside-code-block.snap.ast +6 -0
- package/test/snapshots/markdown/pre-code-tags.snap.ast +35 -0
- package/test/snapshots/markdown/relative-anchors.snap.ast +7 -0
- package/test/snapshots/markdown/repeated-headers.snap.ast +12 -0
- package/test/snapshots/markdown/simple-paragraph.snap.ast +5 -0
- package/test/snapshots/markdown/strip-references.snap.ast +9 -0
- package/test/snapshots/markdown/strong.snap.ast +17 -0
- package/test/snapshots/markdown/unordered-list-asterisk.snap.ast +9 -0
- package/test/snapshots/markdown/unordered-list-minus.snap.ast +9 -0
- package/test/snapshots/markdown/unordered-list-plus.snap.ast +9 -0
- package/test/snapshots/markdown/url-with-parenthesis.snap.ast +7 -0
- package/test/snapshots/pfm/atx_headings/62.snap.ast +19 -0
- package/test/snapshots/pfm/atx_headings/63.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/64.snap.ast +8 -0
- package/test/snapshots/pfm/atx_headings/65.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/66.snap.ast +9 -0
- package/test/snapshots/pfm/atx_headings/67.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/68.snap.ast +10 -0
- package/test/snapshots/pfm/atx_headings/69.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/70.snap.ast +7 -0
- package/test/snapshots/pfm/atx_headings/71.snap.ast +7 -0
- package/test/snapshots/pfm/atx_headings/72.snap.ast +7 -0
- package/test/snapshots/pfm/atx_headings/73.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/74.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/75.snap.ast +4 -0
- package/test/snapshots/pfm/atx_headings/76.snap.ast +13 -0
- package/test/snapshots/pfm/atx_headings/77.snap.ast +6 -0
- package/test/snapshots/pfm/atx_headings/78.snap.ast +10 -0
- package/test/snapshots/pfm/atx_headings/79.snap.ast +8 -0
- package/test/snapshots/pfm/autolinks/594.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/595.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/596.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/597.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/598.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/599.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/600.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/601.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/602.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/603.snap.ast +5 -0
- package/test/snapshots/pfm/autolinks/604.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/605.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/606.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/607.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/608.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/609.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/610.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/611.snap.ast +4 -0
- package/test/snapshots/pfm/autolinks/612.snap.ast +4 -0
- package/test/snapshots/pfm/backslash_escapes/12.snap.ast +35 -0
- package/test/snapshots/pfm/backslash_escapes/13.snap.ast +4 -0
- package/test/snapshots/pfm/backslash_escapes/14.snap.ast +25 -0
- package/test/snapshots/pfm/backslash_escapes/15.snap.ast +6 -0
- package/test/snapshots/pfm/backslash_escapes/16.snap.ast +6 -0
- package/test/snapshots/pfm/backslash_escapes/17.snap.ast +4 -0
- package/test/snapshots/pfm/backslash_escapes/18.snap.ast +5 -0
- package/test/snapshots/pfm/backslash_escapes/19.snap.ast +10 -0
- package/test/snapshots/pfm/backslash_escapes/20.snap.ast +5 -0
- package/test/snapshots/pfm/backslash_escapes/21.snap.ast +4 -0
- package/test/snapshots/pfm/backslash_escapes/22.snap.ast +5 -0
- package/test/snapshots/pfm/backslash_escapes/23.snap.ast +6 -0
- package/test/snapshots/pfm/backslash_escapes/24.snap.ast +2 -0
- package/test/snapshots/pfm/blank_lines/227.snap.ast +13 -0
- package/test/snapshots/pfm/block_quotes/228.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/229.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/230.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/231.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/232.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/233.snap.ast +12 -0
- package/test/snapshots/pfm/block_quotes/234.snap.ast +6 -0
- package/test/snapshots/pfm/block_quotes/235.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/236.snap.ast +8 -0
- package/test/snapshots/pfm/block_quotes/237.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/238.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/239.snap.ast +3 -0
- package/test/snapshots/pfm/block_quotes/240.snap.ast +5 -0
- package/test/snapshots/pfm/block_quotes/241.snap.ast +6 -0
- package/test/snapshots/pfm/block_quotes/242.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/243.snap.ast +7 -0
- package/test/snapshots/pfm/block_quotes/244.snap.ast +8 -0
- package/test/snapshots/pfm/block_quotes/245.snap.ast +8 -0
- package/test/snapshots/pfm/block_quotes/246.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/247.snap.ast +8 -0
- package/test/snapshots/pfm/block_quotes/248.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/249.snap.ast +9 -0
- package/test/snapshots/pfm/block_quotes/250.snap.ast +10 -0
- package/test/snapshots/pfm/block_quotes/251.snap.ast +12 -0
- package/test/snapshots/pfm/block_quotes/252.snap.ast +10 -0
- package/test/snapshots/pfm/code_spans/328.snap.ast +3 -0
- package/test/snapshots/pfm/code_spans/329.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/330.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/331.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/332.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/333.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/334.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/335.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/336.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/337.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/338.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/339.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/340.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/341.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/342.snap.ast +7 -0
- package/test/snapshots/pfm/code_spans/343.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/344.snap.ast +5 -0
- package/test/snapshots/pfm/code_spans/345.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/346.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/347.snap.ast +3 -0
- package/test/snapshots/pfm/code_spans/348.snap.ast +5 -0
- package/test/snapshots/pfm/code_spans/349.snap.ast +6 -0
- package/test/snapshots/pfm/code_spans/pfm_328_1.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/pfm_328_2.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/pfm_328_3.snap.ast +4 -0
- package/test/snapshots/pfm/code_spans/pfm_328_4.snap.ast +4 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/350.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/351.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/352.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/353.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/354.snap.ast +18 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/355.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/356.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/357.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/358.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/359.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/360.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/361.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/362.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/363.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/364.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/365.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/366.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/367.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/368.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/369.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/370.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/371.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/372.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/373.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/374.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/375.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/376.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/377.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/378.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/379.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/380.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/381.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/382.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/383.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/384.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/385.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/386.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/387.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/388.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/389.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/390.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/391.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/392.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/393.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/394.snap.ast +12 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/395.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/396.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/397.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/398.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/399.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/400.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/401.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/402.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/403.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/404.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/405.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/406.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/407.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/408.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/409.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/410.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/411.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/412.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/413.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/414.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/415.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/416.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/417.snap.ast +15 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/418.snap.ast +11 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/419.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/420.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/421.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/422.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/423.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/424.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/425.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/426.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/427.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/428.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/429.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/430.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/431.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/432.snap.ast +12 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/433.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/434.snap.ast +4 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/435.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/436.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/437.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/438.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/439.snap.ast +9 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/440.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/441.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/442.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/443.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/444.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/445.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/446.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/447.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/448.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/449.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/450.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/451.snap.ast +9 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/452.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/453.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/454.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/455.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/456.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/457.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/458.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/459.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/460.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/461.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/462.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/463.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/464.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/465.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/466.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/467.snap.ast +6 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/468.snap.ast +12 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/469.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/470.snap.ast +10 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/471.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/472.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/473.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/474.snap.ast +8 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/475.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/476.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/477.snap.ast +5 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/478.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/479.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/480.snap.ast +7 -0
- package/test/snapshots/pfm/emphasis_and_strong_emphasis/481.snap.ast +7 -0
- package/test/snapshots/pfm/fenced_code_blocks/119.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/121.snap.ast +4 -0
- package/test/snapshots/pfm/fenced_code_blocks/122.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/124.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/126.snap.ast +3 -0
- package/test/snapshots/pfm/fenced_code_blocks/127.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/128.snap.ast +11 -0
- package/test/snapshots/pfm/fenced_code_blocks/130.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/131.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/132.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/133.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/134.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/135.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/136.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/137.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/138.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/140.snap.ast +8 -0
- package/test/snapshots/pfm/fenced_code_blocks/142.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/144.snap.ast +3 -0
- package/test/snapshots/pfm/fenced_code_blocks/145.snap.ast +2 -0
- package/test/snapshots/pfm/fenced_code_blocks/pfm_119_2.snap.ast +6 -0
- package/test/snapshots/pfm/fenced_code_blocks/pfm_119_3.snap.ast +2 -0
- package/test/snapshots/pfm/frontmatter/1.snap.ast +6 -0
- package/test/snapshots/pfm/frontmatter/10.snap.ast +4 -0
- package/test/snapshots/pfm/frontmatter/2.snap.ast +2 -0
- package/test/snapshots/pfm/frontmatter/3.snap.ast +2 -0
- package/test/snapshots/pfm/frontmatter/4.snap.ast +2 -0
- package/test/snapshots/pfm/frontmatter/5.snap.ast +7 -0
- package/test/snapshots/pfm/frontmatter/6.snap.ast +9 -0
- package/test/snapshots/pfm/frontmatter/7.snap.ast +2 -0
- package/test/snapshots/pfm/frontmatter/8.snap.ast +6 -0
- package/test/snapshots/pfm/frontmatter/9.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/001.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/002.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/003.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/004.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/005.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/006.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/007.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/008.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/009.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/010.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/011.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/012.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/013.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/014.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/015.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/016.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/017.snap.ast +3 -0
- package/test/snapshots/pfm/generic_directives/018.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/019.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/020.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/021.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/022.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/023.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/024.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/025.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/026.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/027.snap.ast +10 -0
- package/test/snapshots/pfm/generic_directives/028.snap.ast +3 -0
- package/test/snapshots/pfm/generic_directives/029.snap.ast +12 -0
- package/test/snapshots/pfm/generic_directives/030.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/031.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/032.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/033.snap.ast +3 -0
- package/test/snapshots/pfm/generic_directives/034.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/035.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/036.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/037.snap.ast +10 -0
- package/test/snapshots/pfm/generic_directives/038.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/039.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/040.snap.ast +15 -0
- package/test/snapshots/pfm/generic_directives/041.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/042.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/043.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/044.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/045.snap.ast +2 -0
- package/test/snapshots/pfm/generic_directives/046.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/047.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/048.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/049.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/050.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/051.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/052.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/053.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/054.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/055.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/056.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/057.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/058.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/059.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/060.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/061.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/062.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/063.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/064.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/065.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/066.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/067.snap.ast +16 -0
- package/test/snapshots/pfm/generic_directives/068.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/069.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/070.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/071.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/072.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/073.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/074.snap.ast +10 -0
- package/test/snapshots/pfm/generic_directives/075.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/076.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/077.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/078.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/079.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/080.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/081.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/082.snap.ast +11 -0
- package/test/snapshots/pfm/generic_directives/083.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/084.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/085.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/086.snap.ast +4 -0
- package/test/snapshots/pfm/generic_directives/087.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/088.snap.ast +10 -0
- package/test/snapshots/pfm/generic_directives/089.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/090.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/091.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/092.snap.ast +16 -0
- package/test/snapshots/pfm/generic_directives/093.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/094.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/095.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/096.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/097.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/098.snap.ast +5 -0
- package/test/snapshots/pfm/generic_directives/099.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/100.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/101.snap.ast +7 -0
- package/test/snapshots/pfm/generic_directives/102.snap.ast +8 -0
- package/test/snapshots/pfm/generic_directives/103.snap.ast +9 -0
- package/test/snapshots/pfm/generic_directives/104.snap.ast +6 -0
- package/test/snapshots/pfm/generic_directives/105.snap.ast +8 -0
- package/test/snapshots/pfm/hard_line_breaks/633.snap.ast +6 -0
- package/test/snapshots/pfm/hard_line_breaks/634.snap.ast +6 -0
- package/test/snapshots/pfm/hard_line_breaks/635.snap.ast +6 -0
- package/test/snapshots/pfm/hard_line_breaks/636.snap.ast +6 -0
- package/test/snapshots/pfm/hard_line_breaks/637.snap.ast +6 -0
- package/test/snapshots/pfm/hard_line_breaks/638.snap.ast +7 -0
- package/test/snapshots/pfm/hard_line_breaks/639.snap.ast +7 -0
- package/test/snapshots/pfm/hard_line_breaks/640.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/641.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/642.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/643.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/644.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/645.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/646.snap.ast +4 -0
- package/test/snapshots/pfm/hard_line_breaks/647.snap.ast +4 -0
- package/test/snapshots/pfm/html/148.snap.ast +21 -0
- package/test/snapshots/pfm/html/149.snap.ast +17 -0
- package/test/snapshots/pfm/html/150.snap.ast +11 -0
- package/test/snapshots/pfm/html/151.snap.ast +7 -0
- package/test/snapshots/pfm/html/152.snap.ast +10 -0
- package/test/snapshots/pfm/html/153.snap.ast +4 -0
- package/test/snapshots/pfm/html/154.snap.ast +4 -0
- package/test/snapshots/pfm/html/155.snap.ast +13 -0
- package/test/snapshots/pfm/html/156.snap.ast +7 -0
- package/test/snapshots/pfm/html/157.snap.ast +6 -0
- package/test/snapshots/pfm/html/158.snap.ast +10 -0
- package/test/snapshots/pfm/html/159.snap.ast +7 -0
- package/test/snapshots/pfm/html/160.snap.ast +9 -0
- package/test/snapshots/pfm/html/161.snap.ast +4 -0
- package/test/snapshots/pfm/html/162.snap.ast +8 -0
- package/test/snapshots/pfm/html/163.snap.ast +8 -0
- package/test/snapshots/pfm/html/164.snap.ast +8 -0
- package/test/snapshots/pfm/html/165.snap.ast +7 -0
- package/test/snapshots/pfm/html/166.snap.ast +8 -0
- package/test/snapshots/pfm/html/167.snap.ast +10 -0
- package/test/snapshots/pfm/html/168.snap.ast +6 -0
- package/test/snapshots/pfm/html/169.snap.ast +17 -0
- package/test/snapshots/pfm/html/170.snap.ast +6 -0
- package/test/snapshots/pfm/html/171.snap.ast +15 -0
- package/test/snapshots/pfm/html/172.snap.ast +6 -0
- package/test/snapshots/pfm/html/173.snap.ast +2 -0
- package/test/snapshots/pfm/html/174.snap.ast +11 -0
- package/test/snapshots/pfm/html/175.snap.ast +7 -0
- package/test/snapshots/pfm/html/176.snap.ast +7 -0
- package/test/snapshots/pfm/html/177.snap.ast +9 -0
- package/test/snapshots/pfm/html/178.snap.ast +7 -0
- package/test/snapshots/pfm/html/179.snap.ast +6 -0
- package/test/snapshots/pfm/html/180.snap.ast +14 -0
- package/test/snapshots/pfm/html/181.snap.ast +5 -0
- package/test/snapshots/pfm/html/182.snap.ast +16 -0
- package/test/snapshots/pfm/html/183.snap.ast +6 -0
- package/test/snapshots/pfm/html/184.snap.ast +8 -0
- package/test/snapshots/pfm/html/185.snap.ast +10 -0
- package/test/snapshots/pfm/html/186.snap.ast +11 -0
- package/test/snapshots/pfm/html/187.snap.ast +8 -0
- package/test/snapshots/pfm/html/188.snap.ast +11 -0
- package/test/snapshots/pfm/html/189.snap.ast +9 -0
- package/test/snapshots/pfm/html/190.snap.ast +17 -0
- package/test/snapshots/pfm/html/191.snap.ast +17 -0
- package/test/snapshots/pfm/html/613.snap.ast +8 -0
- package/test/snapshots/pfm/html/614.snap.ast +4 -0
- package/test/snapshots/pfm/html/615.snap.ast +5 -0
- package/test/snapshots/pfm/html/616.snap.ast +3 -0
- package/test/snapshots/pfm/html/617.snap.ast +5 -0
- package/test/snapshots/pfm/html/618.snap.ast +5 -0
- package/test/snapshots/pfm/html/619.snap.ast +4 -0
- package/test/snapshots/pfm/html/620.snap.ast +5 -0
- package/test/snapshots/pfm/html/621.snap.ast +10 -0
- package/test/snapshots/pfm/html/622.snap.ast +4 -0
- package/test/snapshots/pfm/html/623.snap.ast +5 -0
- package/test/snapshots/pfm/html/624.snap.ast +4 -0
- package/test/snapshots/pfm/html/625.snap.ast +5 -0
- package/test/snapshots/pfm/html/626.snap.ast +10 -0
- package/test/snapshots/pfm/html/627.snap.ast +5 -0
- package/test/snapshots/pfm/html/628.snap.ast +6 -0
- package/test/snapshots/pfm/html/629.snap.ast +12 -0
- package/test/snapshots/pfm/html/630.snap.ast +5 -0
- package/test/snapshots/pfm/html/631.snap.ast +5 -0
- package/test/snapshots/pfm/html/632.snap.ast +4 -0
- package/test/snapshots/pfm/images/572.snap.ast +5 -0
- package/test/snapshots/pfm/images/573.snap.ast +9 -0
- package/test/snapshots/pfm/images/574.snap.ast +7 -0
- package/test/snapshots/pfm/images/575.snap.ast +7 -0
- package/test/snapshots/pfm/images/576.snap.ast +11 -0
- package/test/snapshots/pfm/images/577.snap.ast +11 -0
- package/test/snapshots/pfm/images/578.snap.ast +5 -0
- package/test/snapshots/pfm/images/579.snap.ast +6 -0
- package/test/snapshots/pfm/images/580.snap.ast +5 -0
- package/test/snapshots/pfm/images/581.snap.ast +4 -0
- package/test/snapshots/pfm/images/582.snap.ast +8 -0
- package/test/snapshots/pfm/images/583.snap.ast +8 -0
- package/test/snapshots/pfm/images/584.snap.ast +8 -0
- package/test/snapshots/pfm/images/585.snap.ast +11 -0
- package/test/snapshots/pfm/images/586.snap.ast +8 -0
- package/test/snapshots/pfm/images/587.snap.ast +9 -0
- package/test/snapshots/pfm/images/588.snap.ast +6 -0
- package/test/snapshots/pfm/images/589.snap.ast +9 -0
- package/test/snapshots/pfm/images/590.snap.ast +12 -0
- package/test/snapshots/pfm/images/591.snap.ast +6 -0
- package/test/snapshots/pfm/images/592.snap.ast +7 -0
- package/test/snapshots/pfm/images/593.snap.ast +7 -0
- package/test/snapshots/pfm/imports/1.snap.ast +6 -0
- package/test/snapshots/pfm/imports/10.snap.ast +4 -0
- package/test/snapshots/pfm/imports/11.snap.ast +6 -0
- package/test/snapshots/pfm/imports/2.snap.ast +7 -0
- package/test/snapshots/pfm/imports/3.snap.ast +7 -0
- package/test/snapshots/pfm/imports/4.snap.ast +6 -0
- package/test/snapshots/pfm/imports/5.snap.ast +6 -0
- package/test/snapshots/pfm/imports/6.snap.ast +8 -0
- package/test/snapshots/pfm/imports/7.snap.ast +6 -0
- package/test/snapshots/pfm/imports/8.snap.ast +8 -0
- package/test/snapshots/pfm/imports/9.snap.ast +2 -0
- package/test/snapshots/pfm/inlines/327.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/192.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/193.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/194.snap.ast +8 -0
- package/test/snapshots/pfm/link_reference_definitions/195.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/196.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/197.snap.ast +16 -0
- package/test/snapshots/pfm/link_reference_definitions/198.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/199.snap.ast +12 -0
- package/test/snapshots/pfm/link_reference_definitions/200.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/201.snap.ast +14 -0
- package/test/snapshots/pfm/link_reference_definitions/202.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/203.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/204.snap.ast +8 -0
- package/test/snapshots/pfm/link_reference_definitions/205.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/206.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/207.snap.ast +1 -0
- package/test/snapshots/pfm/link_reference_definitions/208.snap.ast +12 -0
- package/test/snapshots/pfm/link_reference_definitions/209.snap.ast +5 -0
- package/test/snapshots/pfm/link_reference_definitions/210.snap.ast +7 -0
- package/test/snapshots/pfm/link_reference_definitions/211.snap.ast +6 -0
- package/test/snapshots/pfm/link_reference_definitions/212.snap.ast +9 -0
- package/test/snapshots/pfm/link_reference_definitions/213.snap.ast +14 -0
- package/test/snapshots/pfm/link_reference_definitions/214.snap.ast +11 -0
- package/test/snapshots/pfm/link_reference_definitions/215.snap.ast +9 -0
- package/test/snapshots/pfm/link_reference_definitions/216.snap.ast +7 -0
- package/test/snapshots/pfm/link_reference_definitions/217.snap.ast +14 -0
- package/test/snapshots/pfm/link_reference_definitions/218.snap.ast +13 -0
- package/test/snapshots/pfm/links/482.snap.ast +5 -0
- package/test/snapshots/pfm/links/483.snap.ast +5 -0
- package/test/snapshots/pfm/links/484.snap.ast +4 -0
- package/test/snapshots/pfm/links/485.snap.ast +5 -0
- package/test/snapshots/pfm/links/486.snap.ast +5 -0
- package/test/snapshots/pfm/links/487.snap.ast +4 -0
- package/test/snapshots/pfm/links/488.snap.ast +5 -0
- package/test/snapshots/pfm/links/489.snap.ast +5 -0
- package/test/snapshots/pfm/links/490.snap.ast +7 -0
- package/test/snapshots/pfm/links/491.snap.ast +7 -0
- package/test/snapshots/pfm/links/492.snap.ast +5 -0
- package/test/snapshots/pfm/links/493.snap.ast +5 -0
- package/test/snapshots/pfm/links/494.snap.ast +11 -0
- package/test/snapshots/pfm/links/495.snap.ast +5 -0
- package/test/snapshots/pfm/links/496.snap.ast +5 -0
- package/test/snapshots/pfm/links/497.snap.ast +5 -0
- package/test/snapshots/pfm/links/498.snap.ast +5 -0
- package/test/snapshots/pfm/links/499.snap.ast +5 -0
- package/test/snapshots/pfm/links/500.snap.ast +5 -0
- package/test/snapshots/pfm/links/501.snap.ast +15 -0
- package/test/snapshots/pfm/links/502.snap.ast +5 -0
- package/test/snapshots/pfm/links/503.snap.ast +5 -0
- package/test/snapshots/pfm/links/504.snap.ast +5 -0
- package/test/snapshots/pfm/links/505.snap.ast +11 -0
- package/test/snapshots/pfm/links/506.snap.ast +5 -0
- package/test/snapshots/pfm/links/507.snap.ast +5 -0
- package/test/snapshots/pfm/links/508.snap.ast +5 -0
- package/test/snapshots/pfm/links/509.snap.ast +5 -0
- package/test/snapshots/pfm/links/510.snap.ast +7 -0
- package/test/snapshots/pfm/links/511.snap.ast +5 -0
- package/test/snapshots/pfm/links/512.snap.ast +11 -0
- package/test/snapshots/pfm/links/513.snap.ast +6 -0
- package/test/snapshots/pfm/links/514.snap.ast +7 -0
- package/test/snapshots/pfm/links/515.snap.ast +6 -0
- package/test/snapshots/pfm/links/516.snap.ast +13 -0
- package/test/snapshots/pfm/links/517.snap.ast +6 -0
- package/test/snapshots/pfm/links/518.snap.ast +7 -0
- package/test/snapshots/pfm/links/519.snap.ast +10 -0
- package/test/snapshots/pfm/links/520.snap.ast +7 -0
- package/test/snapshots/pfm/links/521.snap.ast +7 -0
- package/test/snapshots/pfm/links/522.snap.ast +9 -0
- package/test/snapshots/pfm/links/523.snap.ast +9 -0
- package/test/snapshots/pfm/links/524.snap.ast +6 -0
- package/test/snapshots/pfm/links/525.snap.ast +6 -0
- package/test/snapshots/pfm/links/526.snap.ast +7 -0
- package/test/snapshots/pfm/links/527.snap.ast +6 -0
- package/test/snapshots/pfm/links/528.snap.ast +14 -0
- package/test/snapshots/pfm/links/529.snap.ast +7 -0
- package/test/snapshots/pfm/links/530.snap.ast +17 -0
- package/test/snapshots/pfm/links/531.snap.ast +7 -0
- package/test/snapshots/pfm/links/532.snap.ast +8 -0
- package/test/snapshots/pfm/links/533.snap.ast +10 -0
- package/test/snapshots/pfm/links/534.snap.ast +8 -0
- package/test/snapshots/pfm/links/535.snap.ast +11 -0
- package/test/snapshots/pfm/links/536.snap.ast +7 -0
- package/test/snapshots/pfm/links/537.snap.ast +7 -0
- package/test/snapshots/pfm/links/538.snap.ast +8 -0
- package/test/snapshots/pfm/links/539.snap.ast +6 -0
- package/test/snapshots/pfm/links/540.snap.ast +8 -0
- package/test/snapshots/pfm/links/541.snap.ast +15 -0
- package/test/snapshots/pfm/links/542.snap.ast +8 -0
- package/test/snapshots/pfm/links/543.snap.ast +11 -0
- package/test/snapshots/pfm/links/544.snap.ast +7 -0
- package/test/snapshots/pfm/links/545.snap.ast +10 -0
- package/test/snapshots/pfm/links/546.snap.ast +16 -0
- package/test/snapshots/pfm/links/547.snap.ast +18 -0
- package/test/snapshots/pfm/links/548.snap.ast +14 -0
- package/test/snapshots/pfm/links/549.snap.ast +6 -0
- package/test/snapshots/pfm/links/550.snap.ast +7 -0
- package/test/snapshots/pfm/links/551.snap.ast +12 -0
- package/test/snapshots/pfm/links/552.snap.ast +12 -0
- package/test/snapshots/pfm/links/553.snap.ast +6 -0
- package/test/snapshots/pfm/links/554.snap.ast +8 -0
- package/test/snapshots/pfm/links/555.snap.ast +6 -0
- package/test/snapshots/pfm/links/556.snap.ast +9 -0
- package/test/snapshots/pfm/links/557.snap.ast +6 -0
- package/test/snapshots/pfm/links/558.snap.ast +8 -0
- package/test/snapshots/pfm/links/559.snap.ast +10 -0
- package/test/snapshots/pfm/links/560.snap.ast +9 -0
- package/test/snapshots/pfm/links/561.snap.ast +6 -0
- package/test/snapshots/pfm/links/562.snap.ast +7 -0
- package/test/snapshots/pfm/links/563.snap.ast +8 -0
- package/test/snapshots/pfm/links/564.snap.ast +8 -0
- package/test/snapshots/pfm/links/565.snap.ast +6 -0
- package/test/snapshots/pfm/links/566.snap.ast +6 -0
- package/test/snapshots/pfm/links/567.snap.ast +6 -0
- package/test/snapshots/pfm/links/568.snap.ast +6 -0
- package/test/snapshots/pfm/links/569.snap.ast +8 -0
- package/test/snapshots/pfm/links/570.snap.ast +8 -0
- package/test/snapshots/pfm/links/571.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/253.snap.ast +15 -0
- package/test/snapshots/pfm/list_items/254.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/255.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/256.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/257.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/258.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/259.snap.ast +10 -0
- package/test/snapshots/pfm/list_items/260.snap.ast +11 -0
- package/test/snapshots/pfm/list_items/261.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/262.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/263.snap.ast +12 -0
- package/test/snapshots/pfm/list_items/264.snap.ast +10 -0
- package/test/snapshots/pfm/list_items/265.snap.ast +5 -0
- package/test/snapshots/pfm/list_items/266.snap.ast +4 -0
- package/test/snapshots/pfm/list_items/267.snap.ast +5 -0
- package/test/snapshots/pfm/list_items/268.snap.ast +5 -0
- package/test/snapshots/pfm/list_items/269.snap.ast +4 -0
- package/test/snapshots/pfm/list_items/270.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/271.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/272.snap.ast +12 -0
- package/test/snapshots/pfm/list_items/273.snap.ast +10 -0
- package/test/snapshots/pfm/list_items/274.snap.ast +10 -0
- package/test/snapshots/pfm/list_items/275.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/276.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/277.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/278.snap.ast +14 -0
- package/test/snapshots/pfm/list_items/279.snap.ast +6 -0
- package/test/snapshots/pfm/list_items/280.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/281.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/282.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/283.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/284.snap.ast +4 -0
- package/test/snapshots/pfm/list_items/285.snap.ast +12 -0
- package/test/snapshots/pfm/list_items/286.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/287.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/288.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/289.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/290.snap.ast +13 -0
- package/test/snapshots/pfm/list_items/291.snap.ast +7 -0
- package/test/snapshots/pfm/list_items/292.snap.ast +11 -0
- package/test/snapshots/pfm/list_items/293.snap.ast +10 -0
- package/test/snapshots/pfm/list_items/294.snap.ast +14 -0
- package/test/snapshots/pfm/list_items/295.snap.ast +11 -0
- package/test/snapshots/pfm/list_items/296.snap.ast +8 -0
- package/test/snapshots/pfm/list_items/297.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/298.snap.ast +6 -0
- package/test/snapshots/pfm/list_items/299.snap.ast +9 -0
- package/test/snapshots/pfm/list_items/300.snap.ast +12 -0
- package/test/snapshots/pfm/lists/301.snap.ast +11 -0
- package/test/snapshots/pfm/lists/302.snap.ast +11 -0
- package/test/snapshots/pfm/lists/303.snap.ast +10 -0
- package/test/snapshots/pfm/lists/304.snap.ast +6 -0
- package/test/snapshots/pfm/lists/305.snap.ast +8 -0
- package/test/snapshots/pfm/lists/306.snap.ast +12 -0
- package/test/snapshots/pfm/lists/307.snap.ast +14 -0
- package/test/snapshots/pfm/lists/308.snap.ast +17 -0
- package/test/snapshots/pfm/lists/309.snap.ast +18 -0
- package/test/snapshots/pfm/lists/310.snap.ast +17 -0
- package/test/snapshots/pfm/lists/311.snap.ast +12 -0
- package/test/snapshots/pfm/lists/312.snap.ast +13 -0
- package/test/snapshots/pfm/lists/313.snap.ast +12 -0
- package/test/snapshots/pfm/lists/314.snap.ast +12 -0
- package/test/snapshots/pfm/lists/315.snap.ast +11 -0
- package/test/snapshots/pfm/lists/316.snap.ast +14 -0
- package/test/snapshots/pfm/lists/317.snap.ast +15 -0
- package/test/snapshots/pfm/lists/318.snap.ast +9 -0
- package/test/snapshots/pfm/lists/319.snap.ast +13 -0
- package/test/snapshots/pfm/lists/320.snap.ast +11 -0
- package/test/snapshots/pfm/lists/321.snap.ast +11 -0
- package/test/snapshots/pfm/lists/322.snap.ast +5 -0
- package/test/snapshots/pfm/lists/323.snap.ast +8 -0
- package/test/snapshots/pfm/lists/324.snap.ast +7 -0
- package/test/snapshots/pfm/lists/325.snap.ast +11 -0
- package/test/snapshots/pfm/lists/326.snap.ast +19 -0
- package/test/snapshots/pfm/paragraphs/219.snap.ast +8 -0
- package/test/snapshots/pfm/paragraphs/220.snap.ast +12 -0
- package/test/snapshots/pfm/paragraphs/221.snap.ast +9 -0
- package/test/snapshots/pfm/paragraphs/222.snap.ast +6 -0
- package/test/snapshots/pfm/paragraphs/223.snap.ast +8 -0
- package/test/snapshots/pfm/paragraphs/224.snap.ast +6 -0
- package/test/snapshots/pfm/paragraphs/225.snap.ast +6 -0
- package/test/snapshots/pfm/precedence/42.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/100.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/101.snap.ast +6 -0
- package/test/snapshots/pfm/setext_headings/102.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/103.snap.ast +12 -0
- package/test/snapshots/pfm/setext_headings/104.snap.ast +12 -0
- package/test/snapshots/pfm/setext_headings/105.snap.ast +10 -0
- package/test/snapshots/pfm/setext_headings/106.snap.ast +10 -0
- package/test/snapshots/pfm/setext_headings/80.snap.ast +15 -0
- package/test/snapshots/pfm/setext_headings/81.snap.ast +10 -0
- package/test/snapshots/pfm/setext_headings/82.snap.ast +11 -0
- package/test/snapshots/pfm/setext_headings/83.snap.ast +11 -0
- package/test/snapshots/pfm/setext_headings/84.snap.ast +16 -0
- package/test/snapshots/pfm/setext_headings/85.snap.ast +11 -0
- package/test/snapshots/pfm/setext_headings/86.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/87.snap.ast +6 -0
- package/test/snapshots/pfm/setext_headings/88.snap.ast +11 -0
- package/test/snapshots/pfm/setext_headings/89.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/90.snap.ast +6 -0
- package/test/snapshots/pfm/setext_headings/91.snap.ast +7 -0
- package/test/snapshots/pfm/setext_headings/92.snap.ast +6 -0
- package/test/snapshots/pfm/setext_headings/93.snap.ast +10 -0
- package/test/snapshots/pfm/setext_headings/94.snap.ast +6 -0
- package/test/snapshots/pfm/setext_headings/95.snap.ast +7 -0
- package/test/snapshots/pfm/setext_headings/96.snap.ast +9 -0
- package/test/snapshots/pfm/setext_headings/97.snap.ast +5 -0
- package/test/snapshots/pfm/setext_headings/98.snap.ast +2 -0
- package/test/snapshots/pfm/setext_headings/99.snap.ast +6 -0
- package/test/snapshots/pfm/soft_line_breaks/648.snap.ast +6 -0
- package/test/snapshots/pfm/soft_line_breaks/649.snap.ast +6 -0
- package/test/snapshots/pfm/tabs/1.snap.ast +4 -0
- package/test/snapshots/pfm/tabs/10.snap.ast +4 -0
- package/test/snapshots/pfm/tabs/11.snap.ast +2 -0
- package/test/snapshots/pfm/tabs/12.snap.ast +7 -0
- package/test/snapshots/pfm/tabs/13.snap.ast +8 -0
- package/test/snapshots/pfm/tabs/14.snap.ast +8 -0
- package/test/snapshots/pfm/tabs/15.snap.ast +7 -0
- package/test/snapshots/pfm/tabs/16.snap.ast +8 -0
- package/test/snapshots/pfm/tabs/17.snap.ast +11 -0
- package/test/snapshots/pfm/tabs/2.snap.ast +4 -0
- package/test/snapshots/pfm/tabs/3.snap.ast +6 -0
- package/test/snapshots/pfm/tabs/4.snap.ast +8 -0
- package/test/snapshots/pfm/tabs/5.snap.ast +8 -0
- package/test/snapshots/pfm/tabs/6.snap.ast +5 -0
- package/test/snapshots/pfm/tabs/7.snap.ast +5 -0
- package/test/snapshots/pfm/tabs/8.snap.ast +6 -0
- package/test/snapshots/pfm/tabs/9.snap.ast +10 -0
- package/test/snapshots/pfm/textual_content/650.snap.ast +4 -0
- package/test/snapshots/pfm/textual_content/651.snap.ast +4 -0
- package/test/snapshots/pfm/textual_content/652.snap.ast +4 -0
- package/test/snapshots/pfm/thematic_breaks/43.snap.ast +4 -0
- package/test/snapshots/pfm/thematic_breaks/44.snap.ast +4 -0
- package/test/snapshots/pfm/thematic_breaks/45.snap.ast +4 -0
- package/test/snapshots/pfm/thematic_breaks/46.snap.ast +10 -0
- package/test/snapshots/pfm/thematic_breaks/47.snap.ast +4 -0
- package/test/snapshots/pfm/thematic_breaks/48.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/49.snap.ast +8 -0
- package/test/snapshots/pfm/thematic_breaks/50.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/51.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/52.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/53.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/54.snap.ast +2 -0
- package/test/snapshots/pfm/thematic_breaks/55.snap.ast +15 -0
- package/test/snapshots/pfm/thematic_breaks/56.snap.ast +5 -0
- package/test/snapshots/pfm/thematic_breaks/57.snap.ast +10 -0
- package/test/snapshots/pfm/thematic_breaks/58.snap.ast +8 -0
- package/test/snapshots/pfm/thematic_breaks/59.snap.ast +8 -0
- package/test/snapshots/pfm/thematic_breaks/60.snap.ast +10 -0
- package/test/snapshots/pfm/thematic_breaks/61.snap.ast +6 -0
- package/test/snapshots/svelte/00-introduction/00-hello-world/App.snap.ast +9 -0
- package/test/snapshots/svelte/00-introduction/01-dynamic-attributes/App.snap.ast +7 -0
- package/test/snapshots/svelte/00-introduction/02-styling/App.snap.ast +8 -0
- package/test/snapshots/svelte/00-introduction/03-nested-components/App.snap.ast +12 -0
- package/test/snapshots/svelte/00-introduction/03-nested-components/Nested.snap.ast +4 -0
- package/test/snapshots/svelte/00-introduction/04-html-tags/App.snap.ast +7 -0
- package/test/snapshots/svelte/01-reactivity/00-reactive-assignments/App.snap.ast +12 -0
- package/test/snapshots/svelte/01-reactivity/01-reactive-declarations/App.snap.ast +25 -0
- package/test/snapshots/svelte/01-reactivity/02-reactive-statements/App.snap.ast +12 -0
- package/test/snapshots/svelte/02-props/00-declaring-props/App.snap.ast +5 -0
- package/test/snapshots/svelte/02-props/00-declaring-props/Nested.snap.ast +8 -0
- package/test/snapshots/svelte/02-props/01-default-values/App.snap.ast +7 -0
- package/test/snapshots/svelte/02-props/01-default-values/Nested.snap.ast +8 -0
- package/test/snapshots/svelte/02-props/02-spread-props/App.snap.ast +5 -0
- package/test/snapshots/svelte/02-props/02-spread-props/Info.snap.ast +24 -0
- package/test/snapshots/svelte/03-logic/00-if-blocks/App.snap.ast +26 -0
- package/test/snapshots/svelte/03-logic/01-else-blocks/App.snap.ast +23 -0
- package/test/snapshots/svelte/03-logic/02-else-if-blocks/App.snap.ast +26 -0
- package/test/snapshots/svelte/03-logic/03-each-blocks/App.snap.ast +25 -0
- package/test/snapshots/svelte/03-logic/04-keyed-each-blocks/App.snap.ast +40 -0
- package/test/snapshots/svelte/03-logic/04-keyed-each-blocks/Thing.snap.ast +17 -0
- package/test/snapshots/svelte/04-events/00-dom-events/App.snap.ast +15 -0
- package/test/snapshots/svelte/04-events/01-inline-handlers/App.snap.ast +15 -0
- package/test/snapshots/svelte/04-events/02-event-modifiers/App.snap.ast +9 -0
- package/test/snapshots/svelte/04-events/03-component-events/App.snap.ast +5 -0
- package/test/snapshots/svelte/04-events/03-component-events/Inner.snap.ast +9 -0
- package/test/snapshots/svelte/04-events/04-event-forwarding/App.snap.ast +5 -0
- package/test/snapshots/svelte/04-events/04-event-forwarding/Inner.snap.ast +9 -0
- package/test/snapshots/svelte/04-events/04-event-forwarding/Outer.snap.ast +5 -0
- package/test/snapshots/svelte/04-events/05-dom-event-forwarding/App.snap.ast +5 -0
- package/test/snapshots/svelte/04-events/05-dom-event-forwarding/FancyButton.snap.ast +9 -0
- package/test/snapshots/svelte/05-bindings/00-text-inputs/App.snap.ast +11 -0
- package/test/snapshots/svelte/05-bindings/01-numeric-inputs/App.snap.ast +27 -0
- package/test/snapshots/svelte/05-bindings/02-checkbox-inputs/App.snap.ast +34 -0
- package/test/snapshots/svelte/05-bindings/03-group-inputs/App.snap.ast +84 -0
- package/test/snapshots/svelte/05-bindings/04-textarea-inputs/App.snap.ast +12 -0
- package/test/snapshots/svelte/05-bindings/05-select-bindings/App.snap.ast +44 -0
- package/test/snapshots/svelte/05-bindings/06-multiple-select-bindings/App.snap.ast +84 -0
- package/test/snapshots/svelte/05-bindings/07-each-block-bindings/App.snap.ast +44 -0
- package/test/snapshots/svelte/05-bindings/08-media-elements/App.snap.ast +53 -0
- package/test/snapshots/svelte/05-bindings/09-dimensions/App.snap.ast +27 -0
- package/test/snapshots/svelte/05-bindings/10-bind-this/App.snap.ast +9 -0
- package/test/snapshots/svelte/05-bindings/11-component-bindings/App.snap.ast +10 -0
- package/test/snapshots/svelte/05-bindings/11-component-bindings/Keypad.snap.ast +58 -0
- package/test/snapshots/svelte/06-lifecycle/00-onmount/App.snap.ast +36 -0
- package/test/snapshots/svelte/06-lifecycle/01-ondestroy/App.snap.ast +14 -0
- package/test/snapshots/svelte/06-lifecycle/02-update/App.snap.ast +31 -0
- package/test/snapshots/svelte/06-lifecycle/03-tick/App.snap.ast +8 -0
- package/test/snapshots/svelte/07-stores/00-writable-stores/App.snap.ast +15 -0
- package/test/snapshots/svelte/07-stores/00-writable-stores/Decrementer.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/00-writable-stores/Incrementer.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/00-writable-stores/Resetter.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/01-auto-subscriptions/App.snap.ast +15 -0
- package/test/snapshots/svelte/07-stores/01-auto-subscriptions/Decrementer.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/01-auto-subscriptions/Incrementer.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/01-auto-subscriptions/Resetter.snap.ast +9 -0
- package/test/snapshots/svelte/07-stores/02-readable-stores/App.snap.ast +8 -0
- package/test/snapshots/svelte/07-stores/03-derived-stores/App.snap.ast +20 -0
- package/test/snapshots/svelte/07-stores/04-custom-stores/App.snap.ast +21 -0
- package/test/snapshots/svelte/08-motion/00-tweened/App.snap.ast +43 -0
- package/test/snapshots/svelte/08-motion/01-spring/App.snap.ast +38 -0
- package/test/snapshots/svelte/09-transitions/00-transition/App.snap.ast +22 -0
- package/test/snapshots/svelte/09-transitions/01-adding-parameters-to-transitions/App.snap.ast +22 -0
- package/test/snapshots/svelte/09-transitions/02-in-and-out/App.snap.ast +22 -0
- package/test/snapshots/svelte/09-transitions/03-custom-css-transitions/App.snap.ast +27 -0
- package/test/snapshots/svelte/09-transitions/04-custom-js-transitions/App.snap.ast +22 -0
- package/test/snapshots/svelte/09-transitions/05-transition-events/App.snap.ast +28 -0
- package/test/snapshots/svelte/10-animations/00-animate/App.snap.ast +62 -0
- package/test/snapshots/svelte/11-easing/00-easing/App.snap.ast +31 -0
- package/test/snapshots/svelte/11-easing/00-easing/Controls.snap.ast +113 -0
- package/test/snapshots/svelte/11-easing/00-easing/Grid.snap.ast +31 -0
- package/test/snapshots/svelte/12-svg/01-clock/App.snap.ast +47 -0
- package/test/snapshots/svelte/12-svg/02-bar-chart/App.snap.ast +65 -0
- package/test/snapshots/svelte/12-svg/03-area-chart/App.snap.ast +71 -0
- package/test/snapshots/svelte/12-svg/04-scatterplot/App.snap.ast +22 -0
- package/test/snapshots/svelte/12-svg/04-scatterplot/Scatterplot.snap.ast +59 -0
- package/test/snapshots/svelte/12-svg/05-svg-transitions/App.snap.ast +44 -0
- package/test/snapshots/svelte/13-actions/00-actions/App.snap.ast +8 -0
- package/test/snapshots/svelte/13-actions/01-adding-parameters-to-actions/App.snap.ast +9 -0
- package/test/snapshots/svelte/14-classes/00-classes/App.snap.ast +20 -0
- package/test/snapshots/svelte/14-classes/01-class-shorthand/App.snap.ast +23 -0
- package/test/snapshots/svelte/15-composition/00-slots/App.snap.ast +15 -0
- package/test/snapshots/svelte/15-composition/00-slots/Box.snap.ast +8 -0
- package/test/snapshots/svelte/15-composition/01-slot-fallbacks/App.snap.ast +18 -0
- package/test/snapshots/svelte/15-composition/01-slot-fallbacks/Box.snap.ast +13 -0
- package/test/snapshots/svelte/15-composition/02-named-slots/App.snap.ast +24 -0
- package/test/snapshots/svelte/15-composition/02-named-slots/ContactCard.snap.ast +38 -0
- package/test/snapshots/svelte/15-composition/03-slot-props/App.snap.ast +71 -0
- package/test/snapshots/svelte/15-composition/03-slot-props/Hoverable.snap.ast +8 -0
- package/test/snapshots/svelte/15-composition/04-modal/App.snap.ast +75 -0
- package/test/snapshots/svelte/15-composition/04-modal/Modal.snap.ast +26 -0
- package/test/snapshots/svelte/16-context/00-context-api/App.snap.ast +18 -0
- package/test/snapshots/svelte/16-context/00-context-api/Map.snap.ast +15 -0
- package/test/snapshots/svelte/16-context/00-context-api/MapMarker.snap.ast +2 -0
- package/test/snapshots/svelte/17-special-elements/00-svelte-self/App.snap.ast +5 -0
- package/test/snapshots/svelte/17-special-elements/00-svelte-self/File.snap.ast +10 -0
- package/test/snapshots/svelte/17-special-elements/00-svelte-self/Folder.snap.ast +35 -0
- package/test/snapshots/svelte/17-special-elements/01-svelte-component/App.snap.ast +17 -0
- package/test/snapshots/svelte/17-special-elements/01-svelte-component/BlueThing.snap.ast +7 -0
- package/test/snapshots/svelte/17-special-elements/01-svelte-component/GreenThing.snap.ast +7 -0
- package/test/snapshots/svelte/17-special-elements/01-svelte-component/RedThing.snap.ast +7 -0
- package/test/snapshots/svelte/17-special-elements/02-svelte-window/App.snap.ast +30 -0
- package/test/snapshots/svelte/17-special-elements/03-svelte-window-bindings/App.snap.ast +39 -0
- package/test/snapshots/svelte/17-special-elements/04-svelte-body/App.snap.ast +12 -0
- package/test/snapshots/svelte/17-special-elements/05-svelte-head/App.snap.ast +16 -0
- package/test/snapshots/svelte/18-module-context/01-module-exports/App.snap.ast +35 -0
- package/test/snapshots/svelte/18-module-context/01-module-exports/AudioPlayer.snap.ast +27 -0
- package/test/snapshots/svelte/19-debugging/00-debug/App.snap.ast +28 -0
- package/test/snapshots/svelte/19-debugging/00-debug/Test.snap.ast +359 -0
- package/test/snapshots/svelte/20-7guis/01-7guis-counter/App.snap.ast +11 -0
- package/test/snapshots/svelte/20-7guis/02-7guis-temperature/App.snap.ast +16 -0
- package/test/snapshots/svelte/20-7guis/03-7guis-flight-booker/App.snap.ast +30 -0
- package/test/snapshots/svelte/20-7guis/04-7guis-timer/App.snap.ast +36 -0
- package/test/snapshots/svelte/20-7guis/05-7guis-crud/App.snap.ast +49 -0
- package/test/snapshots/svelte/20-7guis/06-7guis-circles/App.snap.ast +47 -0
- package/test/snapshots/svelte/21-miscellaneous/01-hacker-news/App.snap.ast +22 -0
- package/test/snapshots/svelte/21-miscellaneous/01-hacker-news/Comment.snap.ast +29 -0
- package/test/snapshots/svelte/21-miscellaneous/01-hacker-news/Item.snap.ast +44 -0
- package/test/snapshots/svelte/21-miscellaneous/01-hacker-news/List.snap.ast +28 -0
- package/test/snapshots/svelte/21-miscellaneous/01-hacker-news/Summary.snap.ast +28 -0
- package/test/snapshots/svelte/21-miscellaneous/02-immutable-data/App.snap.ast +28 -0
- package/test/snapshots/svelte/21-miscellaneous/02-immutable-data/ImmutableTodo.snap.ast +20 -0
- package/test/snapshots/svelte/21-miscellaneous/02-immutable-data/MutableTodo.snap.ast +17 -0
- package/test/snapshots/svelte/22-bugs/CSS/App.snap.ast +3 -0
- package/test/snapshots/svelte/99-embeds/20181225-blog-svelte-css-in-js/App.snap.ast +18 -0
- package/test/snapshots/svelte/99-embeds/20181225-blog-svelte-css-in-js/Hero.snap.ast +25 -0
- package/test/snapshots/svelte/99-embeds/20190420-blog-write-less-code/App.snap.ast +16 -0
- package/test/strikethrough.spec.ts +114 -0
- package/test/subscript.spec.ts +132 -0
- package/test/superscript.spec.ts +139 -0
- package/test/svelte_blocks.spec.ts +208 -0
- package/test/svelte_expressions.spec.ts +175 -0
- package/test/svelte_tags.spec.ts +125 -0
- package/test/tables.spec.ts +663 -0
- package/test/thematic_breaks.spec.ts +274 -0
- package/test/tree_builder.spec.ts +342 -0
- package/test/utils.ts +58 -0
- package/test/wire_emitter.spec.ts +487 -0
- package/tsc/buf_utils.d.ts +13 -0
- package/tsc/buf_utils.js +49 -0
- package/tsc/constants.d.ts +68 -0
- package/tsc/constants.js +68 -0
- package/tsc/cursor.d.ts +79 -0
- package/tsc/cursor.js +160 -0
- package/tsc/main.d.ts +472 -0
- package/tsc/main.js +6351 -0
- package/tsc/node_view.d.ts +116 -0
- package/tsc/node_view.js +342 -0
- package/tsc/opcodes.d.ts +75 -0
- package/tsc/opcodes.js +1 -0
- package/tsc/plugin_dispatch.d.ts +68 -0
- package/tsc/plugin_dispatch.js +501 -0
- package/tsc/plugin_types.d.ts +31 -0
- package/tsc/plugin_types.js +1 -0
- package/tsc/tree_builder.d.ts +31 -0
- package/tsc/tree_builder.js +173 -0
- package/tsc/types.d.ts +25 -0
- package/tsc/types.js +1 -0
- package/tsc/undo_log.d.ts +103 -0
- package/tsc/undo_log.js +194 -0
- package/tsc/utils.d.ts +242 -0
- package/tsc/utils.js +792 -0
- package/tsc/utils.spec.d.ts +1 -0
- package/tsc/utils.spec.js +280 -0
- package/tsc/wire_emitter.d.ts +66 -0
- package/tsc/wire_emitter.js +385 -0
- package/tsc/wire_tree_builder.d.ts +58 -0
- package/tsc/wire_tree_builder.js +276 -0
- package/tsconfig.json +15 -0
- package/vite.config.build.ts +28 -0
- package/README.md +0 -3
package/dist/main.js
ADDED
|
@@ -0,0 +1,4699 @@
|
|
|
1
|
+
import { string_to_kind as tt, ErrorCollector as Ot } from "./utils.js";
|
|
2
|
+
import { NodeBuffer as Zt } from "./utils.js";
|
|
3
|
+
import { TreeBuilder as Et } from "./tree-builder.js";
|
|
4
|
+
import { U as Nt, V as J, S as St } from "./node_view-BEh2-H86.js";
|
|
5
|
+
import { W as ts } from "./node_view-BEh2-H86.js";
|
|
6
|
+
const f = 9, d = 10, p = 32, Q = 34, T = 35, X = 39, A = 45, M = 46, P = 47, x = 58, R = 60, W = 61, v = 62, Tt = 64, j = 123, D = 125, S = 92, b = 96, B = 126, Y = 94, q = 124, F = 33, O = 42, L = 40, E = 41, N = 91, I = 93, C = 95, K = 43, st = 44, G = 4294967295, V = 35, et = 1073741824;
|
|
7
|
+
function ht(m) {
|
|
8
|
+
const s = m.parse;
|
|
9
|
+
return function(n, e) {
|
|
10
|
+
const r = s(n, e);
|
|
11
|
+
return r ? [r] : null;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function Kt(m, s) {
|
|
15
|
+
const t = m.parse, n = s.parse;
|
|
16
|
+
return function(r, o) {
|
|
17
|
+
const h = t(r, o), i = n(r, o);
|
|
18
|
+
return h ? i ? [h, i] : [h] : i ? [i] : null;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function Rt(m, s, t) {
|
|
22
|
+
const n = m.parse, e = s.parse, r = t.parse;
|
|
23
|
+
return function(h, i) {
|
|
24
|
+
const c = n(h, i), a = e(h, i), _ = r(h, i);
|
|
25
|
+
let l = null;
|
|
26
|
+
return c && (l = [c]), a && (l ? l.push(a) : l = [a]), _ && (l ? l.push(_) : l = [_]), l;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function jt(m) {
|
|
30
|
+
const s = m.map((n) => n.parse), t = s.length;
|
|
31
|
+
return function(e, r) {
|
|
32
|
+
let o = null;
|
|
33
|
+
for (let h = 0; h < t; h++) {
|
|
34
|
+
const i = s[h](e, r);
|
|
35
|
+
i && (o ? o.push(i) : o = [i]);
|
|
36
|
+
}
|
|
37
|
+
return o;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function zt(m) {
|
|
41
|
+
switch (m.length) {
|
|
42
|
+
case 1:
|
|
43
|
+
return ht(m[0]);
|
|
44
|
+
case 2:
|
|
45
|
+
return Kt(m[0], m[1]);
|
|
46
|
+
case 3:
|
|
47
|
+
return Rt(m[0], m[1], m[2]);
|
|
48
|
+
default:
|
|
49
|
+
return jt(m);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function Lt(m) {
|
|
53
|
+
const s = [], t = [];
|
|
54
|
+
for (const h of m)
|
|
55
|
+
h.sequential ? t.push(h) : s.push(h);
|
|
56
|
+
const n = new Array(V).fill(null);
|
|
57
|
+
for (const h of s)
|
|
58
|
+
for (const i of Object.keys(h)) {
|
|
59
|
+
if (i === "sequential")
|
|
60
|
+
continue;
|
|
61
|
+
const c = tt(i);
|
|
62
|
+
if (c === void 0)
|
|
63
|
+
continue;
|
|
64
|
+
const a = h[i];
|
|
65
|
+
!a || typeof a != "object" || !("parse" in a) || (n[c] || (n[c] = []), n[c].push(a));
|
|
66
|
+
}
|
|
67
|
+
const e = new Array(V).fill(null), r = new Uint32Array(2);
|
|
68
|
+
for (let h = 0; h < V; h++) {
|
|
69
|
+
const i = n[h];
|
|
70
|
+
i && i.length > 0 && (e[h] = zt(i), r[h >> 5] |= 1 << (h & 31));
|
|
71
|
+
}
|
|
72
|
+
const o = t.map((h) => {
|
|
73
|
+
const i = new Array(V).fill(null);
|
|
74
|
+
for (const c of Object.keys(h)) {
|
|
75
|
+
if (c === "sequential")
|
|
76
|
+
continue;
|
|
77
|
+
const a = tt(c);
|
|
78
|
+
if (a === void 0)
|
|
79
|
+
continue;
|
|
80
|
+
const _ = h[c];
|
|
81
|
+
!_ || typeof _ != "object" || !("parse" in _) || (i[a] = ht(_));
|
|
82
|
+
}
|
|
83
|
+
return { plugin: h, handlers: i };
|
|
84
|
+
});
|
|
85
|
+
return { fused: e, sequential: o, has_handler: r };
|
|
86
|
+
}
|
|
87
|
+
class it {
|
|
88
|
+
constructor() {
|
|
89
|
+
this.store = [];
|
|
90
|
+
}
|
|
91
|
+
set(s, t) {
|
|
92
|
+
this.store[s] = t;
|
|
93
|
+
}
|
|
94
|
+
/** take close callbacks for a node, removing the entry. returns undefined if none. */
|
|
95
|
+
take(s) {
|
|
96
|
+
const t = this.store[s];
|
|
97
|
+
return t !== void 0 && (this.store[s] = void 0), t;
|
|
98
|
+
}
|
|
99
|
+
/** fire close callbacks for a node, removing the entry. */
|
|
100
|
+
fire(s) {
|
|
101
|
+
const t = this.store[s];
|
|
102
|
+
if (t !== void 0) {
|
|
103
|
+
for (let n = 0; n < t.length; n++)
|
|
104
|
+
t[n]();
|
|
105
|
+
this.store[s] = void 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/** discard callbacks without firing (for revocation). */
|
|
109
|
+
discard(s) {
|
|
110
|
+
this.store[s] = void 0;
|
|
111
|
+
}
|
|
112
|
+
reset() {
|
|
113
|
+
this.store.length = 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function Pt(m, s, t, n, e) {
|
|
117
|
+
if (!(e[m >> 5] & 1 << (m & 31)))
|
|
118
|
+
return null;
|
|
119
|
+
const r = n[0], o = n[1], h = n[2], i = n[3], c = n[4], a = n[5], _ = n[6], l = n[7], u = n[8], k = n[9], g = n[10], y = n[11], H = n[12], U = n[13], ot = n[14], nt = n[15], ct = n[16], at = n[17], _t = n[18], lt = n[19], ut = n[20], dt = n[21], pt = n[22], ft = n[23], mt = n[24], kt = n[25], bt = n[26], gt = n[27], At = n[28], Ct = n[29], vt = n[30], wt = n[31], xt = n[32], yt = n[33], qt = n[34];
|
|
120
|
+
switch (m) {
|
|
121
|
+
case 0:
|
|
122
|
+
return r(s, t);
|
|
123
|
+
case 1:
|
|
124
|
+
return o(s, t);
|
|
125
|
+
case 2:
|
|
126
|
+
return h(s, t);
|
|
127
|
+
case 3:
|
|
128
|
+
return i(s, t);
|
|
129
|
+
case 4:
|
|
130
|
+
return c(s, t);
|
|
131
|
+
case 5:
|
|
132
|
+
return a(s, t);
|
|
133
|
+
case 6:
|
|
134
|
+
return _(s, t);
|
|
135
|
+
case 7:
|
|
136
|
+
return l(s, t);
|
|
137
|
+
case 8:
|
|
138
|
+
return u(s, t);
|
|
139
|
+
case 9:
|
|
140
|
+
return k(s, t);
|
|
141
|
+
case 10:
|
|
142
|
+
return g(s, t);
|
|
143
|
+
case 11:
|
|
144
|
+
return y(s, t);
|
|
145
|
+
case 12:
|
|
146
|
+
return H(s, t);
|
|
147
|
+
case 13:
|
|
148
|
+
return U(s, t);
|
|
149
|
+
case 14:
|
|
150
|
+
return ot(s, t);
|
|
151
|
+
case 15:
|
|
152
|
+
return nt(s, t);
|
|
153
|
+
case 16:
|
|
154
|
+
return ct(s, t);
|
|
155
|
+
case 17:
|
|
156
|
+
return at(s, t);
|
|
157
|
+
case 18:
|
|
158
|
+
return _t(s, t);
|
|
159
|
+
case 19:
|
|
160
|
+
return lt(s, t);
|
|
161
|
+
case 20:
|
|
162
|
+
return ut(s, t);
|
|
163
|
+
case 21:
|
|
164
|
+
return dt(s, t);
|
|
165
|
+
case 22:
|
|
166
|
+
return pt(s, t);
|
|
167
|
+
case 23:
|
|
168
|
+
return ft(s, t);
|
|
169
|
+
case 24:
|
|
170
|
+
return mt(s, t);
|
|
171
|
+
case 25:
|
|
172
|
+
return kt(s, t);
|
|
173
|
+
case 26:
|
|
174
|
+
return bt(s, t);
|
|
175
|
+
case 27:
|
|
176
|
+
return gt(s, t);
|
|
177
|
+
case 28:
|
|
178
|
+
return At(s, t);
|
|
179
|
+
case 29:
|
|
180
|
+
return Ct(s, t);
|
|
181
|
+
case 30:
|
|
182
|
+
return vt(s, t);
|
|
183
|
+
case 31:
|
|
184
|
+
return wt(s, t);
|
|
185
|
+
case 32:
|
|
186
|
+
return xt(s, t);
|
|
187
|
+
case 33:
|
|
188
|
+
return yt(s, t);
|
|
189
|
+
case 34:
|
|
190
|
+
return qt(s, t);
|
|
191
|
+
default:
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function Bt(m, s) {
|
|
196
|
+
const t = m._children_starts, n = m._next_siblings, e = m._parents, r = m._kinds;
|
|
197
|
+
let o = t[0];
|
|
198
|
+
if (o === G)
|
|
199
|
+
return;
|
|
200
|
+
const h = [];
|
|
201
|
+
for (; ; ) {
|
|
202
|
+
s(o, r[o], !1);
|
|
203
|
+
const i = t[o];
|
|
204
|
+
if (i !== G) {
|
|
205
|
+
h.push(o), o = i;
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
s(o, r[o], !0);
|
|
209
|
+
let c = n[o];
|
|
210
|
+
for (; (c === G || e[c] !== e[o]) && h.length > 0; )
|
|
211
|
+
o = h.pop(), s(o, r[o], !0), c = n[o];
|
|
212
|
+
if (c === G || e[c] !== e[o])
|
|
213
|
+
break;
|
|
214
|
+
o = c;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
class Mt {
|
|
218
|
+
constructor(s, t) {
|
|
219
|
+
this.undo = new Nt(), this.close_cbs = new it(), this.ctx = {}, this.redirects = /* @__PURE__ */ new Map(), this.next_synthetic_id = et;
|
|
220
|
+
const n = Lt(s);
|
|
221
|
+
this.fused = n.fused, this.has_handler = n.has_handler, this.sequential = n.sequential, this.text_source = t;
|
|
222
|
+
}
|
|
223
|
+
/** check whether any fused handlers exist for this kind. */
|
|
224
|
+
has_handlers(s) {
|
|
225
|
+
return !!(this.has_handler[s >> 5] & 1 << (s & 31));
|
|
226
|
+
}
|
|
227
|
+
/** check if a parent index has a redirect (wrap_inner). */
|
|
228
|
+
get_redirect(s) {
|
|
229
|
+
return this.redirects.get(s);
|
|
230
|
+
}
|
|
231
|
+
/** register a wrap_inner redirect. */
|
|
232
|
+
set_redirect(s, t) {
|
|
233
|
+
this.redirects.set(s, t);
|
|
234
|
+
}
|
|
235
|
+
/** clear a redirect (on parent close). */
|
|
236
|
+
clear_redirect(s) {
|
|
237
|
+
this.redirects.delete(s);
|
|
238
|
+
}
|
|
239
|
+
/** allocate a new synthetic node id. */
|
|
240
|
+
allocate_synthetic_id() {
|
|
241
|
+
return this.next_synthetic_id++;
|
|
242
|
+
}
|
|
243
|
+
/** update text source (for incremental parsing). */
|
|
244
|
+
set_text_source(s) {
|
|
245
|
+
this.text_source = s;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* dispatch fused plugin handlers on node open.
|
|
249
|
+
* creates a ViewCache, runs handlers, stores close callbacks.
|
|
250
|
+
*/
|
|
251
|
+
dispatch_open(s, t, n, e) {
|
|
252
|
+
const r = new J(n, this.text_source, this.undo, s), o = r.get(s);
|
|
253
|
+
this.undo.set_active_node(s);
|
|
254
|
+
const h = Pt(t, o, this.ctx, this.fused, this.has_handler);
|
|
255
|
+
this.undo.clear_active_node();
|
|
256
|
+
const i = this.undo.get_entries(s);
|
|
257
|
+
if (i)
|
|
258
|
+
for (let c = 0; c < i.length; c++) {
|
|
259
|
+
const a = i[c];
|
|
260
|
+
a.kind === 3 && this.redirects.set(a.parent, a.wrapper);
|
|
261
|
+
}
|
|
262
|
+
h && this.close_cbs.set(s, h), r.clear();
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* dispatch close callbacks for a node.
|
|
266
|
+
* fires callbacks with undo attribution.
|
|
267
|
+
* only commits the undo log if the node is no longer pending,
|
|
268
|
+
* pending nodes may still be revoked after close (e.g. tight-list
|
|
269
|
+
* speculation, inline emphasis).
|
|
270
|
+
*/
|
|
271
|
+
dispatch_close(s, t) {
|
|
272
|
+
this.redirects.delete(s);
|
|
273
|
+
const n = this.close_cbs.take(s);
|
|
274
|
+
if (n) {
|
|
275
|
+
const e = new J(t, this.text_source, this.undo, s);
|
|
276
|
+
this.undo.set_active_node(s);
|
|
277
|
+
for (let r = 0; r < n.length; r++)
|
|
278
|
+
n[r]();
|
|
279
|
+
this.undo.clear_active_node(), e.clear();
|
|
280
|
+
}
|
|
281
|
+
t._pending_nodes[s] === 0 && this.undo.commit(s);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* commit a node's undo log after it has been confirmed non-pending.
|
|
285
|
+
* called by the builder when a pending node is explicitly committed.
|
|
286
|
+
*/
|
|
287
|
+
dispatch_commit(s) {
|
|
288
|
+
this.undo.commit(s);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* revoke all plugin mutations for a node.
|
|
292
|
+
* walks undo log in reverse, discards close callbacks.
|
|
293
|
+
* must be called BEFORE handle_repair().
|
|
294
|
+
*/
|
|
295
|
+
dispatch_revoke(s, t) {
|
|
296
|
+
this.redirects.delete(s), this.close_cbs.discard(s);
|
|
297
|
+
const n = this.undo.get_entries(s);
|
|
298
|
+
if (n)
|
|
299
|
+
for (let r = 0; r < n.length; r++) {
|
|
300
|
+
const o = n[r];
|
|
301
|
+
o.kind === 3 && this.redirects.delete(o.parent);
|
|
302
|
+
}
|
|
303
|
+
this.undo.revoke(s, t);
|
|
304
|
+
let e = t._children_starts[s];
|
|
305
|
+
for (; e !== G && t._parents[e] === s; )
|
|
306
|
+
this.dispatch_revoke(e, t), e = t._next_siblings[e];
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* run sequential plugin passes over a completed tree.
|
|
310
|
+
* each sequential plugin gets its own tree walk.
|
|
311
|
+
*/
|
|
312
|
+
run_sequential(s) {
|
|
313
|
+
for (const t of this.sequential) {
|
|
314
|
+
const n = new it();
|
|
315
|
+
Bt(s, (e, r, o) => {
|
|
316
|
+
if (o) {
|
|
317
|
+
n.fire(e);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
const h = t.handlers[r];
|
|
321
|
+
if (h === null)
|
|
322
|
+
return;
|
|
323
|
+
const i = new J(s, this.text_source, this.undo, e), c = i.get(e);
|
|
324
|
+
this.undo.set_active_node(e);
|
|
325
|
+
const a = h(c, this.ctx);
|
|
326
|
+
this.undo.clear_active_node(), a && n.set(e, a), i.clear();
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
/** reset all state. */
|
|
331
|
+
reset() {
|
|
332
|
+
this.undo.clear(), this.close_cbs.reset(), this.redirects.clear(), this.next_synthetic_id = et;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const It = [
|
|
336
|
+
"root",
|
|
337
|
+
"text",
|
|
338
|
+
"html",
|
|
339
|
+
"heading",
|
|
340
|
+
"mustache",
|
|
341
|
+
"code_fence",
|
|
342
|
+
"line_break",
|
|
343
|
+
"paragraph",
|
|
344
|
+
"code_span",
|
|
345
|
+
"emphasis",
|
|
346
|
+
"strong_emphasis",
|
|
347
|
+
"thematic_break",
|
|
348
|
+
"link",
|
|
349
|
+
"image",
|
|
350
|
+
"block_quote",
|
|
351
|
+
"list",
|
|
352
|
+
"list_item",
|
|
353
|
+
"hard_break",
|
|
354
|
+
"soft_break",
|
|
355
|
+
"strikethrough",
|
|
356
|
+
"superscript",
|
|
357
|
+
"subscript",
|
|
358
|
+
"table",
|
|
359
|
+
"table_header",
|
|
360
|
+
"table_row",
|
|
361
|
+
"table_cell",
|
|
362
|
+
"html_comment",
|
|
363
|
+
"svelte_tag",
|
|
364
|
+
"svelte_block",
|
|
365
|
+
"svelte_branch"
|
|
366
|
+
];
|
|
367
|
+
function Ut(m) {
|
|
368
|
+
return m === 5 || m === 8 || m === 26;
|
|
369
|
+
}
|
|
370
|
+
class Gt {
|
|
371
|
+
constructor() {
|
|
372
|
+
this.source = "", this.batch = [], this.schema_emitted = !1, this.kinds = /* @__PURE__ */ new Map(), this.pending_starts = /* @__PURE__ */ new Map(), this.text_parents = /* @__PURE__ */ new Map(), this.text_state = /* @__PURE__ */ new Map(), this.info_starts = /* @__PURE__ */ new Map(), this.raw_html_ids = /* @__PURE__ */ new Set(), this.parser_cursor = 0;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* set the current source string. in incremental mode, call this
|
|
376
|
+
* with the accumulated source before each feed() call.
|
|
377
|
+
*/
|
|
378
|
+
set_source(s) {
|
|
379
|
+
this.source = s;
|
|
380
|
+
}
|
|
381
|
+
// emitter interface
|
|
382
|
+
open(s, t, n, e, r, o) {
|
|
383
|
+
if (this.kinds.set(s, t), t === 1) {
|
|
384
|
+
const h = this.kinds.get(e) === 1 ? this.text_parents.get(e) ?? e : e;
|
|
385
|
+
this.text_parents.set(s, h);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
o && this.pending_starts.set(s, n), this.batch.push(["O", s, t, e, o ? 1 : 0, r]);
|
|
389
|
+
}
|
|
390
|
+
close(s, t) {
|
|
391
|
+
this.kinds.get(s) !== 1 && this.batch.push(["C", s]);
|
|
392
|
+
}
|
|
393
|
+
text(s, t, n) {
|
|
394
|
+
if (n > t) {
|
|
395
|
+
const e = this.source.slice(t, n);
|
|
396
|
+
e && this.batch.push(["T", s, e]);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
attr(s, t, n) {
|
|
400
|
+
if (t === "tag" && this.kinds.get(s) === 2 && (n === "script" || n === "style") && this.raw_html_ids.add(s), t === "value_start") {
|
|
401
|
+
const e = this.kinds.get(s), r = e === 2 && this.raw_html_ids.has(s);
|
|
402
|
+
if (e !== 1 && !r && (e === void 0 || !Ut(e)))
|
|
403
|
+
return;
|
|
404
|
+
const o = e === 1 ? this.text_parents.get(s) ?? s : s, h = this.text_state.get(s);
|
|
405
|
+
h && h.sent > n && this.batch.push(["X", h.target]), this.text_state.set(s, {
|
|
406
|
+
start: n,
|
|
407
|
+
sent: n,
|
|
408
|
+
target: o,
|
|
409
|
+
done: !1,
|
|
410
|
+
is_fence: e === 5
|
|
411
|
+
});
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
if (t === "value_end") {
|
|
415
|
+
const e = this.text_state.get(s);
|
|
416
|
+
if (e) {
|
|
417
|
+
if (n > e.sent) {
|
|
418
|
+
const r = this.source.slice(e.sent, n);
|
|
419
|
+
r && (this.batch.push(["T", e.target, r]), e.sent = n);
|
|
420
|
+
} else if (e.sent > n) {
|
|
421
|
+
this.batch.push(["X", e.target]);
|
|
422
|
+
const r = this.source.slice(e.start, n);
|
|
423
|
+
r && this.batch.push(["T", e.target, r]), e.sent = n;
|
|
424
|
+
}
|
|
425
|
+
e.done = !0;
|
|
426
|
+
}
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
if (t === "info_start") {
|
|
430
|
+
this.info_starts.set(s, n);
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
if (t === "info_end") {
|
|
434
|
+
const e = this.info_starts.get(s);
|
|
435
|
+
if (e !== void 0) {
|
|
436
|
+
const r = this.source.slice(e, n);
|
|
437
|
+
r && this.batch.push(["A", s, "info", r]), this.info_starts.delete(s);
|
|
438
|
+
}
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
this.kinds.get(s) !== 1 && this.batch.push(["A", s, t, n]);
|
|
442
|
+
}
|
|
443
|
+
set_value_start(s, t) {
|
|
444
|
+
this.attr(s, "value_start", t);
|
|
445
|
+
}
|
|
446
|
+
set_value_end(s, t) {
|
|
447
|
+
this.attr(s, "value_end", t);
|
|
448
|
+
}
|
|
449
|
+
cursor(s) {
|
|
450
|
+
this.parser_cursor = s;
|
|
451
|
+
}
|
|
452
|
+
revoke(s, t) {
|
|
453
|
+
const n = this.kinds.get(s), e = t ?? Dt(n);
|
|
454
|
+
this.batch.push(["R", s, e]), this.text_state.delete(s), this.pending_starts.delete(s), this.raw_html_ids.delete(s);
|
|
455
|
+
}
|
|
456
|
+
commit(s) {
|
|
457
|
+
this.batch.push(["K", s]), this.pending_starts.delete(s);
|
|
458
|
+
}
|
|
459
|
+
// batch control
|
|
460
|
+
/**
|
|
461
|
+
* flush accumulated opcodes. returns the batch as an array of
|
|
462
|
+
* opcode tuples. the first flush includes the schema as the
|
|
463
|
+
* first opcode.
|
|
464
|
+
*
|
|
465
|
+
* call this after each feed() in incremental mode, or once
|
|
466
|
+
* after parse() in batch mode.
|
|
467
|
+
*/
|
|
468
|
+
flush() {
|
|
469
|
+
const s = this.source.length;
|
|
470
|
+
for (const [, n] of this.text_state) {
|
|
471
|
+
if (n.done)
|
|
472
|
+
continue;
|
|
473
|
+
let e;
|
|
474
|
+
if (n.is_fence) {
|
|
475
|
+
if (e = s, e > n.sent) {
|
|
476
|
+
const r = this.source.slice(n.sent, e), o = r.lastIndexOf(`
|
|
477
|
+
`);
|
|
478
|
+
if (o !== -1) {
|
|
479
|
+
const h = r.slice(o + 1);
|
|
480
|
+
let i = 0;
|
|
481
|
+
for (; i < h.length && (h.charCodeAt(i) === 32 || h.charCodeAt(i) === 9); )
|
|
482
|
+
i++;
|
|
483
|
+
i < h.length && h.charCodeAt(i) === 96 && (e = n.sent + o);
|
|
484
|
+
} else {
|
|
485
|
+
let h = 0;
|
|
486
|
+
for (; h < r.length && (r.charCodeAt(h) === 32 || r.charCodeAt(h) === 9); )
|
|
487
|
+
h++;
|
|
488
|
+
if (h < r.length && r.charCodeAt(h) === 96)
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
} else
|
|
493
|
+
e = this.parser_cursor;
|
|
494
|
+
if (e > n.sent) {
|
|
495
|
+
const r = this.source.slice(n.sent, e);
|
|
496
|
+
r && (this.batch.push(["T", n.target, r]), n.sent = e);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
const t = [];
|
|
500
|
+
this.schema_emitted || (t.push(["S", It]), this.schema_emitted = !0);
|
|
501
|
+
for (let n = 0; n < this.batch.length; n++)
|
|
502
|
+
t.push(this.batch[n]);
|
|
503
|
+
return this.batch.length = 0, t;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* flush and serialize to json. convenience for transports
|
|
507
|
+
* that need a string.
|
|
508
|
+
*/
|
|
509
|
+
flush_json() {
|
|
510
|
+
return JSON.stringify(this.flush());
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* reset all state. call when reusing the emitter for a new parse.
|
|
514
|
+
*/
|
|
515
|
+
reset() {
|
|
516
|
+
this.source = "", this.batch.length = 0, this.schema_emitted = !1, this.kinds.clear(), this.text_parents.clear(), this.text_state.clear(), this.pending_starts.clear(), this.info_starts.clear(), this.raw_html_ids.clear(), this.parser_cursor = 0;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function Dt(m) {
|
|
520
|
+
switch (m) {
|
|
521
|
+
case 9:
|
|
522
|
+
return "_";
|
|
523
|
+
case 10:
|
|
524
|
+
return "*";
|
|
525
|
+
case 19:
|
|
526
|
+
return "~~";
|
|
527
|
+
case 20:
|
|
528
|
+
return "^";
|
|
529
|
+
case 21:
|
|
530
|
+
return "~";
|
|
531
|
+
case 12:
|
|
532
|
+
return "[";
|
|
533
|
+
case 13:
|
|
534
|
+
return "![";
|
|
535
|
+
case 8:
|
|
536
|
+
return "`";
|
|
537
|
+
case 2:
|
|
538
|
+
return "<";
|
|
539
|
+
default:
|
|
540
|
+
return "";
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
const $ = new Uint8Array(128);
|
|
544
|
+
for (let m = 0; m < $.length; m += 1) {
|
|
545
|
+
let s = 0;
|
|
546
|
+
m <= 32 && (s |= 1), (m >= 33 && m <= 47 || m >= 58 && m <= 64 || m >= 91 && m <= 96 || m >= 123 && m <= 126) && (s |= 2), s === 0 && (s = 4), $[m] = s;
|
|
547
|
+
}
|
|
548
|
+
const Ht = (m) => m === 160 || m === 5760 || m >= 8192 && m <= 8202 || m === 8232 || m === 8233 || m === 8239 || m === 8287 || m === 12288, w = (m) => (
|
|
549
|
+
// common case first: ascii (code < 128). nan < 128 is false, so
|
|
550
|
+
// nan falls through to the second branch where code !== code catches it.
|
|
551
|
+
m < 128 ? $[m] : m !== m ? (
|
|
552
|
+
// nan means charcodeat read past the buffer. return a mask that
|
|
553
|
+
// satisfies all flanking checks so both openers and closers
|
|
554
|
+
// commit speculatively. revocation corrects if wrong.
|
|
555
|
+
7
|
|
556
|
+
) : Ht(m) ? 1 : 4
|
|
557
|
+
), Z = new Ot(1);
|
|
558
|
+
function rt(m) {
|
|
559
|
+
return m.indexOf("\r") === -1 ? m : m.replace(/\r\n?/g, `
|
|
560
|
+
`);
|
|
561
|
+
}
|
|
562
|
+
const z = new Uint8Array(128);
|
|
563
|
+
z[d] = 1;
|
|
564
|
+
z[S] = 1;
|
|
565
|
+
z[O] = 1;
|
|
566
|
+
z[C] = 1;
|
|
567
|
+
z[B] = 1;
|
|
568
|
+
z[Y] = 1;
|
|
569
|
+
z[R] = 1;
|
|
570
|
+
z[N] = 1;
|
|
571
|
+
z[I] = 1;
|
|
572
|
+
z[F] = 1;
|
|
573
|
+
z[b] = 1;
|
|
574
|
+
z[q] = 1;
|
|
575
|
+
z[j] = 1;
|
|
576
|
+
z[x] = 1;
|
|
577
|
+
class Qt {
|
|
578
|
+
constructor(s, t = 2) {
|
|
579
|
+
this.source = "", this.cursor = 0, this.finished = !1, this.pending_cr = !1, this.states = [
|
|
580
|
+
0
|
|
581
|
+
/* StateKind.root */
|
|
582
|
+
], this.node_stack = [0], this.next_id = 1, this.pending_ids = [], this.pending_starts = [], this.pending_count = 0, this.closed_flags = [], this.NodeKind_array = [], this.prev = 1, this.current = 0, this.next_class = 0, this.block_quote_depth = 0, this.emphasis_has_content = !1, this.list_depth = 0, this.list_marker = 0, this.list_ordered = !1, this.list_start_num = 0, this.list_node_id = 0, this.list_is_loose = !1, this.list_content_offset = 0, this.list_marker_indent = 0, this.list_state_stack = [], this.list_pending_paras = [], this.table_col_count = 0, this.table_node_id = 0, this.table_row_id = 0, this.table_cell_id = 0, this.table_cell_col = 0, this.in_table = !1, this.in_heading = !1, this.inline_range_parse = !1, this.table_cell_has_content = !1, this.html_tag_stack = [], this.html_block_depth = 0, this.svelte_block_depth = 0, this.svelte_block_tag = "", this.svelte_branch_id = 0, this.svelte_block_id = 0, this.svelte_block_stack = [], this.frontmatter_failed = !1, this.imports_allowed = !0, this.ref_map = /* @__PURE__ */ new Map(), this.link_text_start = 0, this.directive_colon_counts = [], this.directive_text_ids = [], this.directive_text_brackets = [], this.extra = 0, this.info_start_pos = 0, this.info_end_pos = 0, this.checkpoint_cursor = 0, this.prev_cursor = 0, this.loop_without_progress = 0, this.tab_size = 2, this.out = s, this.errors = Z, this.tab_size = t;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* parse a complete source string.
|
|
586
|
+
* @param source the markdown source to parse.
|
|
587
|
+
* @returns object with error collector.
|
|
588
|
+
*/
|
|
589
|
+
/**
|
|
590
|
+
* parse a complete source string (batch mode). equivalent to
|
|
591
|
+
* init() + feed(source) + finish().
|
|
592
|
+
*/
|
|
593
|
+
parse(s) {
|
|
594
|
+
return this._init(), this.source = rt(s), this.current = w(this.source.charCodeAt(0)), this.next_class = w(this.source.charCodeAt(1)), this.errors = Z, this.finished = !0, this._run(), this._finalize(), { errors: this.errors };
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* initialize the parser for incremental feeding. must be called
|
|
598
|
+
* before the first feed() call.
|
|
599
|
+
*/
|
|
600
|
+
init() {
|
|
601
|
+
this._init(), this.finished = !1;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* feed a chunk of source text. the parser advances as far as it
|
|
605
|
+
* can, stalling at line boundaries when lookahead is insufficient.
|
|
606
|
+
* call init() before the first feed().
|
|
607
|
+
*
|
|
608
|
+
* line-ending normalization: \r\n and bare \r are collapsed to \n
|
|
609
|
+
* before reaching the state machine. a trailing \r is deferred
|
|
610
|
+
* across feed() boundaries so a \r\n pair split across chunks is
|
|
611
|
+
* handled correctly.
|
|
612
|
+
*/
|
|
613
|
+
feed(s) {
|
|
614
|
+
s.length !== 0 && (this.pending_cr && (s.charCodeAt(0) === 10 && (s = s.slice(1)), this.source += `
|
|
615
|
+
`, this.pending_cr = !1), s.length > 0 && s.charCodeAt(s.length - 1) === 13 && (this.pending_cr = !0, s = s.slice(0, -1)), s.indexOf("\r") !== -1 && (s = s.replace(/\r\n?/g, `
|
|
616
|
+
`)), this.source += s, this.current = w(this.source.charCodeAt(this.cursor)), this.next_class = w(this.source.charCodeAt(this.cursor + 1)), this._run(), this.out.cursor(this.cursor));
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* signal end-of-input. finalizes all open nodes and revokes
|
|
620
|
+
* pending speculation.
|
|
621
|
+
*/
|
|
622
|
+
finish() {
|
|
623
|
+
return this.pending_cr && (this.source += `
|
|
624
|
+
`, this.pending_cr = !1), this.finished = !0, this._run(), this._finalize(), this.out.cursor(this.cursor), { errors: this.errors };
|
|
625
|
+
}
|
|
626
|
+
_init() {
|
|
627
|
+
this.source = "", this.cursor = 0, this.finished = !1, this.pending_cr = !1, this.states = [
|
|
628
|
+
0
|
|
629
|
+
/* StateKind.root */
|
|
630
|
+
], this.node_stack = [0], this.next_id = 1, this.pending_ids = [], this.pending_count = 0, this.closed_flags = [], this.NodeKind_array = [], this.prev = 1, this.current = 1, this.next_class = 1, this.block_quote_depth = 0, this.list_depth = 0, this.list_marker = 0, this.list_ordered = !1, this.list_start_num = 0, this.list_node_id = 0, this.list_is_loose = !1, this.list_content_offset = 0, this.list_marker_indent = 0, this.list_state_stack = [], this.list_pending_paras = [], this.table_col_count = 0, this.table_node_id = 0, this.table_row_id = 0, this.table_cell_id = 0, this.table_cell_col = 0, this.in_table = !1, this.inline_range_parse = !1, this.table_cell_has_content = !1, this.html_tag_stack = [], this.html_block_depth = 0, this.svelte_block_depth = 0, this.svelte_block_tag = "", this.svelte_branch_id = 0, this.svelte_block_id = 0, this.svelte_block_stack = [], this.extra = 0, this.info_start_pos = 0, this.info_end_pos = 0, this.checkpoint_cursor = 0, this.prev_cursor = 0, this.loop_without_progress = 0, this.frontmatter_failed = !1, this.imports_allowed = !0, this.ref_map.clear(), this.link_text_start = 0, this.directive_colon_counts = [], this.directive_text_ids = [], this.directive_text_brackets = [], this.errors = Z, this.out.open(0, 0, 0, -1, 0, !1);
|
|
631
|
+
}
|
|
632
|
+
// opcode helpers
|
|
633
|
+
emit_open(s, t, n, e = 0, r = !1) {
|
|
634
|
+
const o = this.next_id++;
|
|
635
|
+
return this.out.open(o, s, t, n, e, r), r && (this.pending_starts[this.pending_count] = t, this.pending_ids[this.pending_count++] = o), this.NodeKind_array[o] = s, o;
|
|
636
|
+
}
|
|
637
|
+
emit_close(s, t) {
|
|
638
|
+
this.out.close(s, t), this.closed_flags[s] = 1;
|
|
639
|
+
}
|
|
640
|
+
/** swap-remove an id from the pending_ids array. */
|
|
641
|
+
pending_remove(s) {
|
|
642
|
+
const t = this.pending_ids, n = this.pending_count;
|
|
643
|
+
for (let e = 0; e < n; e++)
|
|
644
|
+
if (t[e] === s) {
|
|
645
|
+
t[e] = t[n - 1], this.pending_count = n - 1;
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
/** check if an id is in the pending_ids array. */
|
|
650
|
+
pending_has(s) {
|
|
651
|
+
const t = this.pending_ids;
|
|
652
|
+
for (let n = 0; n < this.pending_count; n++)
|
|
653
|
+
if (t[n] === s)
|
|
654
|
+
return !0;
|
|
655
|
+
return !1;
|
|
656
|
+
}
|
|
657
|
+
/** normalize link reference label: collapse whitespace, lowercase. */
|
|
658
|
+
normalize_label(s) {
|
|
659
|
+
return s.trim().replace(/\s+/g, " ").toLowerCase();
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* check if a character code is valid in a directive name.
|
|
663
|
+
* valid: [a-za-z0-9_-]
|
|
664
|
+
*/
|
|
665
|
+
is_directive_name_char(s) {
|
|
666
|
+
return s >= 97 && s <= 122 || // a-z
|
|
667
|
+
s >= 65 && s <= 90 || // a-z
|
|
668
|
+
s >= 48 && s <= 57 || // 0-9
|
|
669
|
+
s === C || // _
|
|
670
|
+
s === A;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* remove the directive text frame for `id` if present. idempotent -
|
|
674
|
+
* close and revoke paths can race on the same node (a revoked id may
|
|
675
|
+
* stay in pending_ids and be revoked again at block level).
|
|
676
|
+
*/
|
|
677
|
+
directive_text_pop(s) {
|
|
678
|
+
const t = this.directive_text_ids;
|
|
679
|
+
for (let n = t.length - 1; n >= 0; n--)
|
|
680
|
+
if (t[n] === s) {
|
|
681
|
+
n === t.length - 1 ? (t.pop(), this.directive_text_brackets.pop()) : (t.splice(n, 1), this.directive_text_brackets.splice(n, 1));
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* try to parse a directive argument list at `pos`, which must point
|
|
687
|
+
* at `(`. arguments are named only - no positional values:
|
|
688
|
+
*
|
|
689
|
+
* ( key=value, key="quoted value", key='quoted' )
|
|
690
|
+
*
|
|
691
|
+
* key: [a-za-z_][a-za-z0-9_-]*
|
|
692
|
+
* value: bare (no whitespace, comma, parens, quotes, or backslash)
|
|
693
|
+
* or single/double quoted (backslash escapes, kept raw).
|
|
694
|
+
* duplicate keys and trailing commas are malformed. no newlines.
|
|
695
|
+
*
|
|
696
|
+
* returns:
|
|
697
|
+
* - `{ args, end }` on success (`args === null` for an empty list)
|
|
698
|
+
* - `null` if malformed
|
|
699
|
+
* - `false` if more input is needed (stall)
|
|
700
|
+
*/
|
|
701
|
+
try_parse_directive_args(s) {
|
|
702
|
+
const t = this.source, n = t.length;
|
|
703
|
+
let e = s + 1, r = null;
|
|
704
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
705
|
+
e++;
|
|
706
|
+
if (e >= n)
|
|
707
|
+
return this.finished ? null : !1;
|
|
708
|
+
if (t.charCodeAt(e) === E)
|
|
709
|
+
return { args: null, end: e + 1 };
|
|
710
|
+
for (; ; ) {
|
|
711
|
+
const o = t.charCodeAt(e);
|
|
712
|
+
if (!(o >= 97 && o <= 122 || o >= 65 && o <= 90 || o === C))
|
|
713
|
+
return null;
|
|
714
|
+
const h = e;
|
|
715
|
+
for (; e < n && this.is_directive_name_char(t.charCodeAt(e)); )
|
|
716
|
+
e++;
|
|
717
|
+
if (e >= n)
|
|
718
|
+
return this.finished ? null : !1;
|
|
719
|
+
const i = t.slice(h, e);
|
|
720
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
721
|
+
e++;
|
|
722
|
+
if (e >= n)
|
|
723
|
+
return this.finished ? null : !1;
|
|
724
|
+
if (t.charCodeAt(e) !== W)
|
|
725
|
+
return null;
|
|
726
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
727
|
+
e++;
|
|
728
|
+
if (e >= n)
|
|
729
|
+
return this.finished ? null : !1;
|
|
730
|
+
let c;
|
|
731
|
+
const a = t.charCodeAt(e);
|
|
732
|
+
if (a === Q || a === X) {
|
|
733
|
+
e++;
|
|
734
|
+
const l = e;
|
|
735
|
+
for (; e < n; ) {
|
|
736
|
+
const u = t.charCodeAt(e);
|
|
737
|
+
if (u === S && e + 1 < n) {
|
|
738
|
+
e += 2;
|
|
739
|
+
continue;
|
|
740
|
+
}
|
|
741
|
+
if (u === a || u === d)
|
|
742
|
+
break;
|
|
743
|
+
e++;
|
|
744
|
+
}
|
|
745
|
+
if (e >= n)
|
|
746
|
+
return this.finished ? null : !1;
|
|
747
|
+
if (t.charCodeAt(e) !== a)
|
|
748
|
+
return null;
|
|
749
|
+
c = t.slice(l, e), e++;
|
|
750
|
+
} else {
|
|
751
|
+
const l = e;
|
|
752
|
+
for (; e < n; ) {
|
|
753
|
+
const u = t.charCodeAt(e);
|
|
754
|
+
if (u === p || u === f || u === d || u === st || u === L || u === E || u === Q || u === X || u === S)
|
|
755
|
+
break;
|
|
756
|
+
e++;
|
|
757
|
+
}
|
|
758
|
+
if (e >= n && !this.finished)
|
|
759
|
+
return !1;
|
|
760
|
+
if (e === l)
|
|
761
|
+
return null;
|
|
762
|
+
c = t.slice(l, e);
|
|
763
|
+
}
|
|
764
|
+
if (r === null)
|
|
765
|
+
r = {};
|
|
766
|
+
else if (Object.prototype.hasOwnProperty.call(r, i))
|
|
767
|
+
return null;
|
|
768
|
+
for (r[i] = c; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
769
|
+
e++;
|
|
770
|
+
if (e >= n)
|
|
771
|
+
return this.finished ? null : !1;
|
|
772
|
+
const _ = t.charCodeAt(e);
|
|
773
|
+
if (_ === E)
|
|
774
|
+
return { args: r, end: e + 1 };
|
|
775
|
+
if (_ !== st)
|
|
776
|
+
return null;
|
|
777
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
778
|
+
e++;
|
|
779
|
+
if (e >= n)
|
|
780
|
+
return this.finished ? null : !1;
|
|
781
|
+
if (t.charCodeAt(e) === E)
|
|
782
|
+
return null;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* try to parse a top-level import statement at `pos`.
|
|
787
|
+
* returns:
|
|
788
|
+
* - `{ value_start, value_end, end }` on success
|
|
789
|
+
* - `null` if not an import
|
|
790
|
+
* - `false` if we need more input (stall)
|
|
791
|
+
*/
|
|
792
|
+
try_parse_import(s) {
|
|
793
|
+
const t = this.source, n = t.length;
|
|
794
|
+
if (s + 6 >= n && !this.finished)
|
|
795
|
+
return !1;
|
|
796
|
+
if (t.charCodeAt(s + 1) !== 109 || t.charCodeAt(s + 2) !== 112 || t.charCodeAt(s + 3) !== 111 || t.charCodeAt(s + 4) !== 114 || t.charCodeAt(s + 5) !== 116)
|
|
797
|
+
return null;
|
|
798
|
+
const e = t.charCodeAt(s + 6);
|
|
799
|
+
if (e !== p && e !== j)
|
|
800
|
+
return null;
|
|
801
|
+
let r = s + 6;
|
|
802
|
+
for (; r < n && t.charCodeAt(r) !== d; )
|
|
803
|
+
r++;
|
|
804
|
+
if (r >= n && !this.finished)
|
|
805
|
+
return !1;
|
|
806
|
+
const o = s, h = r, i = r < n ? r + 1 : r;
|
|
807
|
+
return { value_start: o, value_end: h, end: i };
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* try to parse a block-level directive at `pos`. the `[content]`
|
|
811
|
+
* brackets are required - empty text must be explicit (`::name[]`).
|
|
812
|
+
* an optional argument list may follow the brackets immediately:
|
|
813
|
+
* `::name[content](key=val, key2=val2)`.
|
|
814
|
+
* returns:
|
|
815
|
+
* - `{ kind: 'leaf' | 'container', colons, name, content_start, content_end, args, end }`
|
|
816
|
+
* on success
|
|
817
|
+
* - `null` if not a directive
|
|
818
|
+
* - `false` if we need more input (stall)
|
|
819
|
+
*/
|
|
820
|
+
try_parse_block_directive(s) {
|
|
821
|
+
const t = this.source, n = t.length;
|
|
822
|
+
let e = s, r = 0;
|
|
823
|
+
for (; e < n && t.charCodeAt(e) === x; )
|
|
824
|
+
r++, e++;
|
|
825
|
+
if (e >= n && !this.finished)
|
|
826
|
+
return !1;
|
|
827
|
+
if (r < 2 || e >= n)
|
|
828
|
+
return null;
|
|
829
|
+
const o = t.charCodeAt(e);
|
|
830
|
+
if (!(o >= 97 && o <= 122 || o >= 65 && o <= 90))
|
|
831
|
+
return null;
|
|
832
|
+
const h = e;
|
|
833
|
+
for (; e < n && this.is_directive_name_char(t.charCodeAt(e)); )
|
|
834
|
+
e++;
|
|
835
|
+
if (e >= n && !this.finished)
|
|
836
|
+
return !1;
|
|
837
|
+
const i = t.slice(h, e), c = r >= 3 ? "container" : "leaf";
|
|
838
|
+
if (e >= n || t.charCodeAt(e) !== N)
|
|
839
|
+
return null;
|
|
840
|
+
e++;
|
|
841
|
+
const a = e;
|
|
842
|
+
let _ = 1;
|
|
843
|
+
for (; e < n && _ > 0; ) {
|
|
844
|
+
const k = t.charCodeAt(e);
|
|
845
|
+
if (k === N)
|
|
846
|
+
_++;
|
|
847
|
+
else if (k === I)
|
|
848
|
+
_--;
|
|
849
|
+
else if (k === S && e + 1 < n)
|
|
850
|
+
e++;
|
|
851
|
+
else if (k === d)
|
|
852
|
+
break;
|
|
853
|
+
_ > 0 && e++;
|
|
854
|
+
}
|
|
855
|
+
if (_ !== 0)
|
|
856
|
+
return e >= n && !this.finished ? !1 : null;
|
|
857
|
+
const l = e;
|
|
858
|
+
if (e++, e >= n && !this.finished)
|
|
859
|
+
return !1;
|
|
860
|
+
let u = null;
|
|
861
|
+
if (e < n && t.charCodeAt(e) === L) {
|
|
862
|
+
const k = this.try_parse_directive_args(e);
|
|
863
|
+
if (k === !1)
|
|
864
|
+
return !1;
|
|
865
|
+
if (k === null)
|
|
866
|
+
return null;
|
|
867
|
+
u = k.args, e = k.end;
|
|
868
|
+
}
|
|
869
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
870
|
+
e++;
|
|
871
|
+
return e >= n && !this.finished ? !1 : e < n && t.charCodeAt(e) !== d ? null : (e < n && e++, {
|
|
872
|
+
kind: c,
|
|
873
|
+
colons: r,
|
|
874
|
+
name: i,
|
|
875
|
+
content_start: a,
|
|
876
|
+
content_end: l,
|
|
877
|
+
args: u,
|
|
878
|
+
end: e
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* open a block directive node from a successful
|
|
883
|
+
* try_parse_block_directive result. leaf directives close
|
|
884
|
+
* immediately, containers push their state and colon count.
|
|
885
|
+
*/
|
|
886
|
+
start_block_directive(s, t) {
|
|
887
|
+
const n = this.emit_open(s.kind === "leaf" ? 31 : 32, this.cursor, t);
|
|
888
|
+
this.out.attr(n, "name", s.name), s.args && this.out.attr(n, "args", s.args), s.content_start >= 0 && (this.out.set_value_start(n, s.content_start), this.out.set_value_end(n, s.content_end)), s.kind === "leaf" ? this.emit_close(n, s.end) : (this.node_stack.push(n), this.states.push(
|
|
889
|
+
28
|
|
890
|
+
/* StateKind.directive_container */
|
|
891
|
+
), this.directive_colon_counts.push(s.colons)), this.chomp(s.end, !0);
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* check if position starts a block directive closing fence.
|
|
895
|
+
* returns the end position (after newline) or -1 if not a closing fence.
|
|
896
|
+
* returns -2 if more input needed.
|
|
897
|
+
*/
|
|
898
|
+
try_parse_directive_close(s, t) {
|
|
899
|
+
const n = this.source, e = n.length;
|
|
900
|
+
let r = s, o = 0;
|
|
901
|
+
for (; r < e && n.charCodeAt(r) === x; )
|
|
902
|
+
o++, r++;
|
|
903
|
+
if (r >= e && !this.finished)
|
|
904
|
+
return -2;
|
|
905
|
+
if (o < t)
|
|
906
|
+
return -1;
|
|
907
|
+
for (; r < e && (n.charCodeAt(r) === p || n.charCodeAt(r) === f); )
|
|
908
|
+
r++;
|
|
909
|
+
return r >= e && !this.finished ? -2 : r < e && n.charCodeAt(r) !== d ? -1 : (r < e && r++, r);
|
|
910
|
+
}
|
|
911
|
+
chomp(s, t = !1) {
|
|
912
|
+
t ? this.cursor = s : this.cursor += s, s > 1 || t ? (this.prev = w(this.source.charCodeAt(this.cursor - 1)), this.current = w(this.source.charCodeAt(this.cursor)), this.next_class = w(this.source.charCodeAt(this.cursor + 1))) : (this.prev = this.current, this.current = this.next_class, this.next_class = w(this.source.charCodeAt(this.cursor + 1)));
|
|
913
|
+
}
|
|
914
|
+
/** fast path for the common case: advance cursor by 1. */
|
|
915
|
+
chomp1() {
|
|
916
|
+
this.cursor++, this.prev = this.current, this.current = this.next_class, this.next_class = w(this.source.charCodeAt(this.cursor + 1));
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* count leading whitespace columns starting at `pos`.
|
|
920
|
+
* spaces count as 1 column, tabs count as `tab_size` columns.
|
|
921
|
+
* returns total columns and the position after the whitespace.
|
|
922
|
+
*/
|
|
923
|
+
count_indent(s) {
|
|
924
|
+
const t = this.source, n = t.length, e = this.tab_size;
|
|
925
|
+
let r = 0;
|
|
926
|
+
for (; s < n; ) {
|
|
927
|
+
const o = t.charCodeAt(s);
|
|
928
|
+
if (o === p)
|
|
929
|
+
r++, s++;
|
|
930
|
+
else if (o === f)
|
|
931
|
+
r += e, s++;
|
|
932
|
+
else
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
return { columns: r, end: s };
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* skip enough whitespace characters starting at `pos` to consume
|
|
939
|
+
* at least `target` columns. returns the position after skipping.
|
|
940
|
+
*/
|
|
941
|
+
skip_columns(s, t) {
|
|
942
|
+
const n = this.source, e = n.length, r = this.tab_size;
|
|
943
|
+
let o = 0;
|
|
944
|
+
for (; s < e && o < t; ) {
|
|
945
|
+
const h = n.charCodeAt(s);
|
|
946
|
+
if (h === p)
|
|
947
|
+
o++, s++;
|
|
948
|
+
else if (h === f)
|
|
949
|
+
o += r, s++;
|
|
950
|
+
else
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
return s;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* check if there's enough input after a linefeed at `pos` to make
|
|
957
|
+
* a block-level decision. in block quote contexts we need to see the
|
|
958
|
+
* complete next line (its `>` markers and content). outside of block
|
|
959
|
+
* quotes we decide eagerly for any first non-whitespace char that
|
|
960
|
+
* unambiguously continues a paragraph or unambiguously starts a known
|
|
961
|
+
* block - only genuinely ambiguous leading chars (`-`, `*`, `_`, `[`,
|
|
962
|
+
* `|`, `:`, `<`, digits) still wait for the full next line.
|
|
963
|
+
*/
|
|
964
|
+
can_decide_after_lf(s) {
|
|
965
|
+
const t = this.source, n = t.length;
|
|
966
|
+
if (this.block_quote_depth > 0) {
|
|
967
|
+
for (let o = s + 1; o < n; o++)
|
|
968
|
+
if (t.charCodeAt(o) === d)
|
|
969
|
+
return !0;
|
|
970
|
+
return !1;
|
|
971
|
+
}
|
|
972
|
+
let e = s + 1;
|
|
973
|
+
for (; e < n; ) {
|
|
974
|
+
const o = t.charCodeAt(e);
|
|
975
|
+
if (o !== p && o !== f)
|
|
976
|
+
break;
|
|
977
|
+
e++;
|
|
978
|
+
}
|
|
979
|
+
if (e >= n)
|
|
980
|
+
return this.finished;
|
|
981
|
+
const r = t.charCodeAt(e);
|
|
982
|
+
if (r === d)
|
|
983
|
+
return !0;
|
|
984
|
+
for (let o = e + 1; o < n; o++)
|
|
985
|
+
if (t.charCodeAt(o) === d)
|
|
986
|
+
return !0;
|
|
987
|
+
switch (r) {
|
|
988
|
+
case T:
|
|
989
|
+
return e + 1 < n;
|
|
990
|
+
case v:
|
|
991
|
+
return !0;
|
|
992
|
+
case b:
|
|
993
|
+
return e + 2 < n && t.charCodeAt(e + 1) === b && t.charCodeAt(e + 2) === b;
|
|
994
|
+
case A:
|
|
995
|
+
case O:
|
|
996
|
+
if (this.list_depth > 0)
|
|
997
|
+
for (let o = e + 1; o < n; o++) {
|
|
998
|
+
const h = t.charCodeAt(o);
|
|
999
|
+
if (h === d || h !== r && h !== p && h !== f)
|
|
1000
|
+
return !0;
|
|
1001
|
+
}
|
|
1002
|
+
return !1;
|
|
1003
|
+
case K:
|
|
1004
|
+
return this.list_depth > 0 && e + 1 < n;
|
|
1005
|
+
case C:
|
|
1006
|
+
case R:
|
|
1007
|
+
case N:
|
|
1008
|
+
case q:
|
|
1009
|
+
case j:
|
|
1010
|
+
case x:
|
|
1011
|
+
return !1;
|
|
1012
|
+
default:
|
|
1013
|
+
if (r >= 48 && r <= 57) {
|
|
1014
|
+
if (this.list_depth === 0)
|
|
1015
|
+
return !1;
|
|
1016
|
+
let o = e + 1;
|
|
1017
|
+
for (; o < n && t.charCodeAt(o) >= 48 && t.charCodeAt(o) <= 57; )
|
|
1018
|
+
o++;
|
|
1019
|
+
if (o >= n)
|
|
1020
|
+
return !1;
|
|
1021
|
+
const h = t.charCodeAt(o);
|
|
1022
|
+
return h !== M && h !== E ? !0 : o + 1 < n;
|
|
1023
|
+
}
|
|
1024
|
+
return !0;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
is_heading_start(s) {
|
|
1028
|
+
const t = this.source, n = t.length;
|
|
1029
|
+
for (; s < n && (t.charCodeAt(s) === p || t.charCodeAt(s) === f); )
|
|
1030
|
+
s++;
|
|
1031
|
+
if (s >= n || t.charCodeAt(s) !== T)
|
|
1032
|
+
return !1;
|
|
1033
|
+
let e = 0;
|
|
1034
|
+
for (; s < n && t.charCodeAt(s) === T; )
|
|
1035
|
+
e++, s++;
|
|
1036
|
+
if (e > 6)
|
|
1037
|
+
return !1;
|
|
1038
|
+
const r = t.charCodeAt(s);
|
|
1039
|
+
return s >= n || r === p || r === f || r === d;
|
|
1040
|
+
}
|
|
1041
|
+
is_blank_line_after(s) {
|
|
1042
|
+
const t = this.source, n = t.length;
|
|
1043
|
+
let e = s + 1;
|
|
1044
|
+
for (; e < n && t.charCodeAt(e) !== d; ) {
|
|
1045
|
+
const r = t.charCodeAt(e);
|
|
1046
|
+
if (r !== p && r !== f)
|
|
1047
|
+
return !1;
|
|
1048
|
+
e++;
|
|
1049
|
+
}
|
|
1050
|
+
return !(e >= n && !this.finished);
|
|
1051
|
+
}
|
|
1052
|
+
is_thematic_break_start(s) {
|
|
1053
|
+
const t = this.source, n = t.length;
|
|
1054
|
+
let e = 0;
|
|
1055
|
+
for (; s < n && t.charCodeAt(s) === p; )
|
|
1056
|
+
e++, s++;
|
|
1057
|
+
if (e > 3 || s >= n)
|
|
1058
|
+
return !1;
|
|
1059
|
+
const r = t.charCodeAt(s);
|
|
1060
|
+
if (r !== O && r !== A && r !== C)
|
|
1061
|
+
return !1;
|
|
1062
|
+
let o = 0;
|
|
1063
|
+
for (; s < n && t.charCodeAt(s) !== d; ) {
|
|
1064
|
+
const h = t.charCodeAt(s);
|
|
1065
|
+
if (h === r)
|
|
1066
|
+
o++;
|
|
1067
|
+
else if (h !== p && h !== f)
|
|
1068
|
+
return !1;
|
|
1069
|
+
s++;
|
|
1070
|
+
}
|
|
1071
|
+
return s >= n && !this.finished ? !1 : o >= 3;
|
|
1072
|
+
}
|
|
1073
|
+
is_ascii_punctuation(s) {
|
|
1074
|
+
return s >= 33 && s <= 47 || s >= 58 && s <= 64 || s >= 91 && s <= 96 || s >= 123 && s <= 126;
|
|
1075
|
+
}
|
|
1076
|
+
skip_bq_markers(s, t) {
|
|
1077
|
+
const n = this.source, e = n.length;
|
|
1078
|
+
for (let r = 0; r < t; r++) {
|
|
1079
|
+
for (; s < e && (n.charCodeAt(s) === p || n.charCodeAt(s) === f); )
|
|
1080
|
+
s++;
|
|
1081
|
+
if (s >= e || n.charCodeAt(s) !== v)
|
|
1082
|
+
return -1;
|
|
1083
|
+
s++, s < e && n.charCodeAt(s) === p && s++;
|
|
1084
|
+
}
|
|
1085
|
+
return s;
|
|
1086
|
+
}
|
|
1087
|
+
is_block_quote_start(s) {
|
|
1088
|
+
const t = this.source, n = t.length;
|
|
1089
|
+
for (; s < n && (t.charCodeAt(s) === p || t.charCodeAt(s) === f); )
|
|
1090
|
+
s++;
|
|
1091
|
+
return s < n && t.charCodeAt(s) === v;
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* check whether a code fence opening inside a blockquote can close
|
|
1095
|
+
* cleanly (whether every line up to the closing fence has matching
|
|
1096
|
+
* `>` markers). returns:
|
|
1097
|
+
* 1 - fence is valid (closing fence found, or eof in finished mode)
|
|
1098
|
+
* 0 - more input needed (stall)
|
|
1099
|
+
* -1 - fence is invalid (unmarked line encountered before closing fence)
|
|
1100
|
+
*
|
|
1101
|
+
* `start_pos` is the position of the first character of the first content
|
|
1102
|
+
* line (past the info line's linefeed). `fence_len` is the number of
|
|
1103
|
+
* backticks in the opener.
|
|
1104
|
+
*/
|
|
1105
|
+
bq_fence_scan(s, t, n) {
|
|
1106
|
+
const e = this.source, r = e.length;
|
|
1107
|
+
let o = s;
|
|
1108
|
+
for (; o <= r; ) {
|
|
1109
|
+
if (o >= r)
|
|
1110
|
+
return this.finished ? 1 : 0;
|
|
1111
|
+
const h = this.skip_bq_markers(o, n);
|
|
1112
|
+
if (h === -1)
|
|
1113
|
+
return -1;
|
|
1114
|
+
let i = h;
|
|
1115
|
+
for (; i < r && (e.charCodeAt(i) === p || e.charCodeAt(i) === f); )
|
|
1116
|
+
i++;
|
|
1117
|
+
let c = 0;
|
|
1118
|
+
for (; i < r && e.charCodeAt(i) === b; )
|
|
1119
|
+
c++, i++;
|
|
1120
|
+
if (c >= t)
|
|
1121
|
+
return 1;
|
|
1122
|
+
let a = h;
|
|
1123
|
+
for (; a < r && e.charCodeAt(a) !== d; )
|
|
1124
|
+
a++;
|
|
1125
|
+
if (a >= r)
|
|
1126
|
+
return this.finished ? 1 : 0;
|
|
1127
|
+
o = a + 1;
|
|
1128
|
+
}
|
|
1129
|
+
return this.finished ? 1 : 0;
|
|
1130
|
+
}
|
|
1131
|
+
is_blank_at_pos(s) {
|
|
1132
|
+
const t = this.source, n = t.length;
|
|
1133
|
+
for (; s < n && t.charCodeAt(s) !== d; ) {
|
|
1134
|
+
const e = t.charCodeAt(s);
|
|
1135
|
+
if (e !== p && e !== f)
|
|
1136
|
+
return !1;
|
|
1137
|
+
s++;
|
|
1138
|
+
}
|
|
1139
|
+
return !(s >= n && !this.finished);
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* single-pass lookahead: does a block-level construct start at `pos`?
|
|
1143
|
+
* skips whitespace once, checks the first meaningful character, then
|
|
1144
|
+
* dispatches to the specific predicate only when the char could start
|
|
1145
|
+
* a block construct. for continuation lines (most common case) this
|
|
1146
|
+
* returns false after one whitespace scan + one char check.
|
|
1147
|
+
*/
|
|
1148
|
+
is_block_interrupt(s) {
|
|
1149
|
+
const t = this.source, n = t.length;
|
|
1150
|
+
let e = s;
|
|
1151
|
+
for (; e < n; ) {
|
|
1152
|
+
const o = t.charCodeAt(e);
|
|
1153
|
+
if (o !== p && o !== f)
|
|
1154
|
+
break;
|
|
1155
|
+
e++;
|
|
1156
|
+
}
|
|
1157
|
+
if (e >= n)
|
|
1158
|
+
return this.finished;
|
|
1159
|
+
const r = t.charCodeAt(e);
|
|
1160
|
+
if (r === d || r === j && this.is_svelte_block_boundary(e))
|
|
1161
|
+
return !0;
|
|
1162
|
+
switch (r) {
|
|
1163
|
+
case T:
|
|
1164
|
+
return this.is_heading_start(s);
|
|
1165
|
+
case v:
|
|
1166
|
+
return !0;
|
|
1167
|
+
case b:
|
|
1168
|
+
return e + 2 < n && t.charCodeAt(e + 1) === b && t.charCodeAt(e + 2) === b;
|
|
1169
|
+
case O:
|
|
1170
|
+
case A:
|
|
1171
|
+
case C:
|
|
1172
|
+
return this.is_thematic_break_start(s) || r !== C && this.is_list_item_start_interrupt(s);
|
|
1173
|
+
case K:
|
|
1174
|
+
return this.is_list_item_start_interrupt(s);
|
|
1175
|
+
case R: {
|
|
1176
|
+
let o = e + 1;
|
|
1177
|
+
if (o < n && t.charCodeAt(o) === P && o++, o >= n || !this.is_tag_name_start(t.charCodeAt(o)))
|
|
1178
|
+
return !1;
|
|
1179
|
+
const h = o;
|
|
1180
|
+
for (; o < n && this.is_tag_name_char(t.charCodeAt(o)); )
|
|
1181
|
+
o++;
|
|
1182
|
+
return this.is_block_html_tag(t.slice(h, o));
|
|
1183
|
+
}
|
|
1184
|
+
case x:
|
|
1185
|
+
return e + 1 < n && t.charCodeAt(e + 1) === x;
|
|
1186
|
+
default:
|
|
1187
|
+
return r >= 48 && r <= 57 ? this.is_list_item_start_interrupt(s) : !1;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* a list marker (`-`, `*`, `+`, or `1.`) only opens a list when the
|
|
1192
|
+
* marker line carries actual content. a bare marker on its own line is
|
|
1193
|
+
* just text - this prevents stray dashes (e.g. a `-` glyph used as a
|
|
1194
|
+
* button label inside a custom html element) from spuriously starting
|
|
1195
|
+
* a list with an empty item.
|
|
1196
|
+
*/
|
|
1197
|
+
marker_line_has_content(s) {
|
|
1198
|
+
const t = this.source, n = t.length;
|
|
1199
|
+
let e = s;
|
|
1200
|
+
for (; e < n; ) {
|
|
1201
|
+
const r = t.charCodeAt(e);
|
|
1202
|
+
if (r === d)
|
|
1203
|
+
return !1;
|
|
1204
|
+
if (r !== p && r !== f)
|
|
1205
|
+
return !0;
|
|
1206
|
+
e++;
|
|
1207
|
+
}
|
|
1208
|
+
return !this.finished;
|
|
1209
|
+
}
|
|
1210
|
+
try_parse_list_marker(s) {
|
|
1211
|
+
const t = this.source, n = t.length;
|
|
1212
|
+
if (s >= n)
|
|
1213
|
+
return null;
|
|
1214
|
+
const e = this.count_indent(s);
|
|
1215
|
+
let r = e.columns;
|
|
1216
|
+
if (s = e.end, s >= n)
|
|
1217
|
+
return null;
|
|
1218
|
+
const o = t.charCodeAt(s);
|
|
1219
|
+
if (o === A || o === O || o === K) {
|
|
1220
|
+
if (s + 1 >= n && !this.finished)
|
|
1221
|
+
return null;
|
|
1222
|
+
const h = t.charCodeAt(s + 1);
|
|
1223
|
+
if (s + 1 >= n || h === p || h === f || h === d) {
|
|
1224
|
+
let i = s + 1, c = r + 1;
|
|
1225
|
+
return i < n && (h === p || h === f) && (c += h === f ? this.tab_size : 1, i++), this.marker_line_has_content(i) ? {
|
|
1226
|
+
indent: r,
|
|
1227
|
+
marker_char: o,
|
|
1228
|
+
ordered: !1,
|
|
1229
|
+
start_num: 0,
|
|
1230
|
+
content_start: i,
|
|
1231
|
+
content_offset: c
|
|
1232
|
+
} : null;
|
|
1233
|
+
}
|
|
1234
|
+
return null;
|
|
1235
|
+
}
|
|
1236
|
+
if (o >= 48 && o <= 57) {
|
|
1237
|
+
const h = s;
|
|
1238
|
+
for (; s < n && t.charCodeAt(s) >= 48 && t.charCodeAt(s) <= 57; )
|
|
1239
|
+
s++;
|
|
1240
|
+
if (s - h > 9 || s >= n)
|
|
1241
|
+
return null;
|
|
1242
|
+
const i = t.charCodeAt(s);
|
|
1243
|
+
if (i !== M && i !== E || s + 1 >= n && !this.finished)
|
|
1244
|
+
return null;
|
|
1245
|
+
const c = t.charCodeAt(s + 1);
|
|
1246
|
+
if (s + 1 >= n || c === p || c === f || c === d) {
|
|
1247
|
+
let a = s + 1, _ = r + (s - h) + 1;
|
|
1248
|
+
if (a < n && (c === p || c === f) && (_ += c === f ? this.tab_size : 1, a++), !this.marker_line_has_content(a))
|
|
1249
|
+
return null;
|
|
1250
|
+
const l = parseInt(t.slice(h, s), 10);
|
|
1251
|
+
return {
|
|
1252
|
+
indent: r,
|
|
1253
|
+
marker_char: i,
|
|
1254
|
+
ordered: !0,
|
|
1255
|
+
start_num: l,
|
|
1256
|
+
content_start: a,
|
|
1257
|
+
content_offset: _
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
return null;
|
|
1261
|
+
}
|
|
1262
|
+
return null;
|
|
1263
|
+
}
|
|
1264
|
+
is_list_item_start_interrupt(s) {
|
|
1265
|
+
const t = this.source, n = t.length, e = this.try_parse_list_marker(s);
|
|
1266
|
+
if (!e)
|
|
1267
|
+
return !1;
|
|
1268
|
+
if (this.list_depth > 0)
|
|
1269
|
+
return !0;
|
|
1270
|
+
if (e.ordered && e.start_num !== 1)
|
|
1271
|
+
return !1;
|
|
1272
|
+
let r = e.content_start;
|
|
1273
|
+
for (; r < n && t.charCodeAt(r) !== d; ) {
|
|
1274
|
+
if (t.charCodeAt(r) !== p && t.charCodeAt(r) !== f)
|
|
1275
|
+
return !0;
|
|
1276
|
+
r++;
|
|
1277
|
+
}
|
|
1278
|
+
return !1;
|
|
1279
|
+
}
|
|
1280
|
+
start_list(s, t) {
|
|
1281
|
+
this.list_depth > 0 && this.list_state_stack.push({
|
|
1282
|
+
marker: this.list_marker,
|
|
1283
|
+
ordered: this.list_ordered,
|
|
1284
|
+
start_num: this.list_start_num,
|
|
1285
|
+
node_idx: this.list_node_id,
|
|
1286
|
+
is_loose: this.list_is_loose,
|
|
1287
|
+
content_offset: this.list_content_offset,
|
|
1288
|
+
marker_indent: this.list_marker_indent,
|
|
1289
|
+
pending_paras: this.list_pending_paras
|
|
1290
|
+
}), this.list_depth++, this.list_ordered = s.ordered, this.list_marker = s.marker_char, this.list_start_num = s.start_num, this.list_is_loose = !1, this.list_content_offset = s.content_offset, this.list_marker_indent = s.indent, this.list_pending_paras = [];
|
|
1291
|
+
const n = this.emit_open(15, this.cursor, t);
|
|
1292
|
+
this.node_stack.push(n), this.list_node_id = n, this.out.attr(n, "ordered", s.ordered), this.out.attr(n, "start", s.start_num);
|
|
1293
|
+
const e = this.emit_open(16, this.cursor, n);
|
|
1294
|
+
this.node_stack.push(e), this.states.push(
|
|
1295
|
+
18
|
|
1296
|
+
/* StateKind.list_item */
|
|
1297
|
+
), this.chomp(s.content_start, !0);
|
|
1298
|
+
}
|
|
1299
|
+
/**
|
|
1300
|
+
* eegister a pending paragraph that was opened inside a list_item -
|
|
1301
|
+
* the wrapper is speculative until the list closes (tight -> unwrap,
|
|
1302
|
+
* loose -> commit).
|
|
1303
|
+
*/
|
|
1304
|
+
track_list_pending_para(s) {
|
|
1305
|
+
this.list_pending_paras.push(s);
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* promote all pending list-item paragraphs in the current list to
|
|
1309
|
+
* committed. called when a blank line makes the list loose - the
|
|
1310
|
+
* wrappers are now real paragraphs that renderers should show.
|
|
1311
|
+
*/
|
|
1312
|
+
commit_list_pending_paras() {
|
|
1313
|
+
for (let s = 0; s < this.list_pending_paras.length; s++) {
|
|
1314
|
+
const t = this.list_pending_paras[s];
|
|
1315
|
+
this.out.commit(t), this.pending_remove(t);
|
|
1316
|
+
}
|
|
1317
|
+
this.list_pending_paras.length = 0;
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* at list close, resolve every pending paragraph collected for this
|
|
1321
|
+
* list. tight -> revoke (unwrap wrapper, text becomes direct child of
|
|
1322
|
+
* list_item). loose -> commit (wrapper stays).
|
|
1323
|
+
*/
|
|
1324
|
+
finalize_list_pending_paras() {
|
|
1325
|
+
const s = this.list_is_loose;
|
|
1326
|
+
for (let t = 0; t < this.list_pending_paras.length; t++) {
|
|
1327
|
+
const n = this.list_pending_paras[t];
|
|
1328
|
+
s ? this.out.commit(n) : this.out.revoke(n), this.pending_remove(n);
|
|
1329
|
+
}
|
|
1330
|
+
this.list_pending_paras.length = 0;
|
|
1331
|
+
}
|
|
1332
|
+
end_list() {
|
|
1333
|
+
this.finalize_list_pending_paras();
|
|
1334
|
+
const s = this.node_stack[this.node_stack.length - 1];
|
|
1335
|
+
this.emit_close(s, this.cursor), this.node_stack.pop();
|
|
1336
|
+
const t = this.node_stack[this.node_stack.length - 1];
|
|
1337
|
+
if (this.out.attr(t, "tight", !this.list_is_loose), this.emit_close(t, this.cursor), this.node_stack.pop(), this.states.pop(), this.list_depth--, this.list_depth > 0 && this.list_state_stack.length > 0) {
|
|
1338
|
+
const n = this.list_state_stack.pop();
|
|
1339
|
+
this.list_marker = n.marker, this.list_ordered = n.ordered, this.list_start_num = n.start_num, this.list_node_id = n.node_idx, this.list_is_loose = n.is_loose, this.list_content_offset = n.content_offset, this.list_marker_indent = n.marker_indent, this.list_pending_paras = n.pending_paras;
|
|
1340
|
+
} else
|
|
1341
|
+
this.list_pending_paras = [];
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* open a svelte_block + first svelte_branch from a {#tag expr} token.
|
|
1345
|
+
*/
|
|
1346
|
+
start_svelte_block(s, t) {
|
|
1347
|
+
this.svelte_block_depth > 0 && this.svelte_block_stack.push({
|
|
1348
|
+
block_id: this.svelte_block_id,
|
|
1349
|
+
branch_id: this.svelte_branch_id,
|
|
1350
|
+
tag: this.svelte_block_tag
|
|
1351
|
+
}), this.svelte_block_depth++, this.svelte_block_tag = s.tag;
|
|
1352
|
+
const n = this.emit_open(28, this.cursor, t);
|
|
1353
|
+
this.out.attr(n, "tag", s.tag), this.svelte_block_id = n, this.node_stack.push(n);
|
|
1354
|
+
const e = this.emit_open(29, this.cursor, n);
|
|
1355
|
+
this.out.attr(e, "tag", s.tag), (s.expr_start !== 0 || s.expr_end !== 0) && (this.out.set_value_start(e, s.expr_start), this.out.set_value_end(e, s.expr_end)), this.svelte_branch_id = e, this.node_stack.push(e), this.states.push(
|
|
1356
|
+
27
|
|
1357
|
+
/* StateKind.svelte_branch */
|
|
1358
|
+
), this.chomp(s.end, !0);
|
|
1359
|
+
}
|
|
1360
|
+
try_parse_uri_autolink(s) {
|
|
1361
|
+
const t = this.source, n = t.length;
|
|
1362
|
+
let e = s, r = t.charCodeAt(e);
|
|
1363
|
+
if (!(r >= 65 && r <= 90 || r >= 97 && r <= 122))
|
|
1364
|
+
return -1;
|
|
1365
|
+
e++;
|
|
1366
|
+
let o = 1;
|
|
1367
|
+
for (; e < n && o <= 32 && (r = t.charCodeAt(e), r >= 65 && r <= 90 || r >= 97 && r <= 122 || r >= 48 && r <= 57 || r === 43 || r === 45 || r === 46); )
|
|
1368
|
+
e++, o++;
|
|
1369
|
+
if (o < 2 || t.charCodeAt(e) !== x)
|
|
1370
|
+
return -1;
|
|
1371
|
+
for (e++; e < n; ) {
|
|
1372
|
+
if (r = t.charCodeAt(e), r === v)
|
|
1373
|
+
return e + 1;
|
|
1374
|
+
if (r <= 32 || r === R)
|
|
1375
|
+
return -1;
|
|
1376
|
+
e++;
|
|
1377
|
+
}
|
|
1378
|
+
return -1;
|
|
1379
|
+
}
|
|
1380
|
+
// html helpers
|
|
1381
|
+
/**
|
|
1382
|
+
* check if character code is a valid tag name start (letter or underscore).
|
|
1383
|
+
*/
|
|
1384
|
+
is_tag_name_start(s) {
|
|
1385
|
+
return s >= 65 && s <= 90 || s >= 97 && s <= 122 || s === C;
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* check if character code is a valid tag name continuation
|
|
1389
|
+
* (letter, digit, hyphen, dot, colon, underscore).
|
|
1390
|
+
*/
|
|
1391
|
+
is_tag_name_char(s) {
|
|
1392
|
+
return s >= 65 && s <= 90 || s >= 97 && s <= 122 || s >= 48 && s <= 57 || s === A || s === M || s === x || s === C;
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* check if character is valid in an unquoted attribute value.
|
|
1396
|
+
* invalid: whitespace, ", ', =, <, >, `
|
|
1397
|
+
*/
|
|
1398
|
+
is_unquoted_attr_char(s) {
|
|
1399
|
+
return s > 32 && s !== Q && s !== X && s !== W && s !== R && s !== v && s !== b;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* returns true for html "raw text" elements whose content should not be
|
|
1403
|
+
* parsed - just scanned for the matching close tag.
|
|
1404
|
+
*/
|
|
1405
|
+
is_raw_text_tag(s) {
|
|
1406
|
+
return s === "script" || s === "style";
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* html void elements - never have content or a close tag.
|
|
1410
|
+
* matches the html living standard set.
|
|
1411
|
+
*/
|
|
1412
|
+
is_void_tag(s) {
|
|
1413
|
+
switch (s) {
|
|
1414
|
+
case "area":
|
|
1415
|
+
case "base":
|
|
1416
|
+
case "br":
|
|
1417
|
+
case "col":
|
|
1418
|
+
case "embed":
|
|
1419
|
+
case "hr":
|
|
1420
|
+
case "img":
|
|
1421
|
+
case "input":
|
|
1422
|
+
case "link":
|
|
1423
|
+
case "meta":
|
|
1424
|
+
case "source":
|
|
1425
|
+
case "track":
|
|
1426
|
+
case "wbr":
|
|
1427
|
+
return !0;
|
|
1428
|
+
default:
|
|
1429
|
+
return !1;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* html block-level tags. an opening (or closing) tag from this set at
|
|
1434
|
+
* the start of a line interrupts an open paragraph - matches commonmark
|
|
1435
|
+
* "html block type 6". keeps wrapping markup like `<ul>` from being
|
|
1436
|
+
* absorbed into a preceding paragraph and producing a `<p><ul>...</p>`
|
|
1437
|
+
* tree that downstream renderers (e.g. svelte) reject.
|
|
1438
|
+
*/
|
|
1439
|
+
is_block_html_tag(s) {
|
|
1440
|
+
switch (s) {
|
|
1441
|
+
case "address":
|
|
1442
|
+
case "article":
|
|
1443
|
+
case "aside":
|
|
1444
|
+
case "base":
|
|
1445
|
+
case "basefont":
|
|
1446
|
+
case "blockquote":
|
|
1447
|
+
case "body":
|
|
1448
|
+
case "caption":
|
|
1449
|
+
case "center":
|
|
1450
|
+
case "col":
|
|
1451
|
+
case "colgroup":
|
|
1452
|
+
case "dd":
|
|
1453
|
+
case "details":
|
|
1454
|
+
case "dialog":
|
|
1455
|
+
case "dir":
|
|
1456
|
+
case "div":
|
|
1457
|
+
case "dl":
|
|
1458
|
+
case "dt":
|
|
1459
|
+
case "fieldset":
|
|
1460
|
+
case "figcaption":
|
|
1461
|
+
case "figure":
|
|
1462
|
+
case "footer":
|
|
1463
|
+
case "form":
|
|
1464
|
+
case "frame":
|
|
1465
|
+
case "frameset":
|
|
1466
|
+
case "h1":
|
|
1467
|
+
case "h2":
|
|
1468
|
+
case "h3":
|
|
1469
|
+
case "h4":
|
|
1470
|
+
case "h5":
|
|
1471
|
+
case "h6":
|
|
1472
|
+
case "head":
|
|
1473
|
+
case "header":
|
|
1474
|
+
case "hr":
|
|
1475
|
+
case "html":
|
|
1476
|
+
case "iframe":
|
|
1477
|
+
case "legend":
|
|
1478
|
+
case "li":
|
|
1479
|
+
case "link":
|
|
1480
|
+
case "main":
|
|
1481
|
+
case "menu":
|
|
1482
|
+
case "menuitem":
|
|
1483
|
+
case "nav":
|
|
1484
|
+
case "noframes":
|
|
1485
|
+
case "ol":
|
|
1486
|
+
case "optgroup":
|
|
1487
|
+
case "option":
|
|
1488
|
+
case "p":
|
|
1489
|
+
case "param":
|
|
1490
|
+
case "section":
|
|
1491
|
+
case "source":
|
|
1492
|
+
case "summary":
|
|
1493
|
+
case "table":
|
|
1494
|
+
case "tbody":
|
|
1495
|
+
case "td":
|
|
1496
|
+
case "tfoot":
|
|
1497
|
+
case "th":
|
|
1498
|
+
case "thead":
|
|
1499
|
+
case "title":
|
|
1500
|
+
case "tr":
|
|
1501
|
+
case "track":
|
|
1502
|
+
case "ul":
|
|
1503
|
+
return !0;
|
|
1504
|
+
default:
|
|
1505
|
+
return !1;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* scan forward from `pos` for the case-sensitive closing tag `</tag>`.
|
|
1510
|
+
* returns the end position (after `>`) or -1 if not found / input incomplete.
|
|
1511
|
+
*/
|
|
1512
|
+
find_raw_close_tag(s, t) {
|
|
1513
|
+
const n = this.source, e = n.length, r = "</" + t + ">";
|
|
1514
|
+
let o = s;
|
|
1515
|
+
for (; o < e; ) {
|
|
1516
|
+
const h = n.indexOf(r, o);
|
|
1517
|
+
return h === -1 ? null : { content_end: h, end: h + r.length };
|
|
1518
|
+
}
|
|
1519
|
+
return null;
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* try to parse an html opening tag starting at pos (the char after `<`).
|
|
1523
|
+
* returns null if not a valid tag.
|
|
1524
|
+
*/
|
|
1525
|
+
try_parse_html_open_tag(s) {
|
|
1526
|
+
const t = this.source, n = t.length;
|
|
1527
|
+
let e = s;
|
|
1528
|
+
if (e >= n || !this.is_tag_name_start(t.charCodeAt(e)))
|
|
1529
|
+
return null;
|
|
1530
|
+
const r = e;
|
|
1531
|
+
for (e++; e < n && this.is_tag_name_char(t.charCodeAt(e)); )
|
|
1532
|
+
e++;
|
|
1533
|
+
const o = t.slice(r, e), h = {};
|
|
1534
|
+
for (; e < n; ) {
|
|
1535
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f || t.charCodeAt(e) === d); )
|
|
1536
|
+
e++;
|
|
1537
|
+
if (e >= n)
|
|
1538
|
+
return null;
|
|
1539
|
+
if (t.charCodeAt(e) === P)
|
|
1540
|
+
return e + 1 < n && t.charCodeAt(e + 1) === v ? { tag: o, attributes: h, self_closing: !0, end: e + 2 } : null;
|
|
1541
|
+
if (t.charCodeAt(e) === v)
|
|
1542
|
+
return { tag: o, attributes: h, self_closing: !1, end: e + 1 };
|
|
1543
|
+
if (t.charCodeAt(e) === j) {
|
|
1544
|
+
const _ = this.find_matching_brace(e + 1);
|
|
1545
|
+
if (_ === -1)
|
|
1546
|
+
return null;
|
|
1547
|
+
const l = t.slice(e + 1, _ - 1);
|
|
1548
|
+
h[l] = { type: "expression", value: l }, e = _;
|
|
1549
|
+
continue;
|
|
1550
|
+
}
|
|
1551
|
+
const i = e, c = t.charCodeAt(e);
|
|
1552
|
+
if (c === W || c === v || c === P)
|
|
1553
|
+
return null;
|
|
1554
|
+
for (; e < n && t.charCodeAt(e) !== p && t.charCodeAt(e) !== f && t.charCodeAt(e) !== d && t.charCodeAt(e) !== W && t.charCodeAt(e) !== v && t.charCodeAt(e) !== P; )
|
|
1555
|
+
e++;
|
|
1556
|
+
if (e === i)
|
|
1557
|
+
return null;
|
|
1558
|
+
const a = t.slice(i, e);
|
|
1559
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f || t.charCodeAt(e) === d); )
|
|
1560
|
+
e++;
|
|
1561
|
+
if (e < n && t.charCodeAt(e) === W) {
|
|
1562
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f || t.charCodeAt(e) === d); )
|
|
1563
|
+
e++;
|
|
1564
|
+
if (e >= n)
|
|
1565
|
+
return null;
|
|
1566
|
+
const _ = t.charCodeAt(e);
|
|
1567
|
+
if (_ === j) {
|
|
1568
|
+
const l = this.find_matching_brace(e + 1);
|
|
1569
|
+
if (l === -1)
|
|
1570
|
+
return null;
|
|
1571
|
+
h[a] = {
|
|
1572
|
+
type: "expression",
|
|
1573
|
+
value: t.slice(e + 1, l - 1)
|
|
1574
|
+
}, e = l;
|
|
1575
|
+
} else if (_ === Q || _ === X) {
|
|
1576
|
+
e++;
|
|
1577
|
+
const l = e;
|
|
1578
|
+
for (; e < n && t.charCodeAt(e) !== _; )
|
|
1579
|
+
e++;
|
|
1580
|
+
if (e >= n)
|
|
1581
|
+
return null;
|
|
1582
|
+
const u = t.slice(l, e);
|
|
1583
|
+
e++, h[a] = u;
|
|
1584
|
+
} else {
|
|
1585
|
+
const l = e;
|
|
1586
|
+
for (; e < n && this.is_unquoted_attr_char(t.charCodeAt(e)); )
|
|
1587
|
+
e++;
|
|
1588
|
+
if (e === l)
|
|
1589
|
+
return null;
|
|
1590
|
+
h[a] = t.slice(l, e);
|
|
1591
|
+
}
|
|
1592
|
+
} else
|
|
1593
|
+
h[a] = !0;
|
|
1594
|
+
}
|
|
1595
|
+
return null;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* try to parse an html closing tag starting at pos (the char after `<`).
|
|
1599
|
+
* pos should point to the `/` in `</tag>`.
|
|
1600
|
+
* returns the tag name and end position, or null.
|
|
1601
|
+
*/
|
|
1602
|
+
try_parse_html_close_tag(s) {
|
|
1603
|
+
const t = this.source, n = t.length;
|
|
1604
|
+
let e = s;
|
|
1605
|
+
if (e >= n || t.charCodeAt(e) !== P)
|
|
1606
|
+
return null;
|
|
1607
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1608
|
+
e++;
|
|
1609
|
+
if (e >= n || !this.is_tag_name_start(t.charCodeAt(e)))
|
|
1610
|
+
return null;
|
|
1611
|
+
const r = e;
|
|
1612
|
+
for (e++; e < n && this.is_tag_name_char(t.charCodeAt(e)); )
|
|
1613
|
+
e++;
|
|
1614
|
+
const o = t.slice(r, e);
|
|
1615
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1616
|
+
e++;
|
|
1617
|
+
return e >= n || t.charCodeAt(e) !== v ? null : { tag: o, end: e + 1 };
|
|
1618
|
+
}
|
|
1619
|
+
/**
|
|
1620
|
+
* ty to parse an html comment starting at pos (the char after `<`).
|
|
1621
|
+
* pos should point to the `!` in `<!--`.
|
|
1622
|
+
* returns the content start, content end, and end position.
|
|
1623
|
+
*/
|
|
1624
|
+
try_parse_html_comment(s) {
|
|
1625
|
+
const t = this.source, n = t.length;
|
|
1626
|
+
let e = s;
|
|
1627
|
+
if (t.charCodeAt(e) !== F || t.charCodeAt(e + 1) !== A || t.charCodeAt(e + 2) !== A)
|
|
1628
|
+
return e + 2 >= n && !this.finished ? !1 : null;
|
|
1629
|
+
e += 3;
|
|
1630
|
+
const r = e;
|
|
1631
|
+
for (; e + 2 < n; ) {
|
|
1632
|
+
if (t.charCodeAt(e) === A && t.charCodeAt(e + 1) === A && t.charCodeAt(e + 2) === v)
|
|
1633
|
+
return { content_start: r, content_end: e, end: e + 3 };
|
|
1634
|
+
e++;
|
|
1635
|
+
}
|
|
1636
|
+
return this.finished ? null : !1;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* find the matching html opener on the html_tag_stack for a closing tag.
|
|
1640
|
+
* returns the stack index or -1 if not found.
|
|
1641
|
+
*/
|
|
1642
|
+
find_html_opener(s) {
|
|
1643
|
+
for (let t = this.html_tag_stack.length - 1; t >= 0; t--)
|
|
1644
|
+
if (this.html_tag_stack[t].tag === s)
|
|
1645
|
+
return t;
|
|
1646
|
+
return -1;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* close an inline html element by unwinding state/node stacks.
|
|
1650
|
+
*/
|
|
1651
|
+
close_html_inline(s, t) {
|
|
1652
|
+
for (; this.node_stack.length > 1; ) {
|
|
1653
|
+
const n = this.node_stack[this.node_stack.length - 1];
|
|
1654
|
+
if (n === s) {
|
|
1655
|
+
for (this.pending_remove(s), this.emit_close(s, t), this.node_stack.pop(); this.states.length > 0; ) {
|
|
1656
|
+
const e = this.states.pop();
|
|
1657
|
+
if (e === 25)
|
|
1658
|
+
break;
|
|
1659
|
+
if (e === 26) {
|
|
1660
|
+
this.html_block_depth--;
|
|
1661
|
+
break;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
1665
|
+
return;
|
|
1666
|
+
}
|
|
1667
|
+
this.closed_flags[n] || (this.out.set_value_end(n, this.cursor), this.emit_close(n, this.cursor)), this.node_stack.pop(), this.states.pop();
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* try to parse a svelte block token at `pos` (pointing at `{`).
|
|
1672
|
+
* returns null if not a svelte block token.
|
|
1673
|
+
* recognizes: {#tag expr}, {:tag expr}, {/tag}
|
|
1674
|
+
*/
|
|
1675
|
+
try_parse_svelte_block_token(s) {
|
|
1676
|
+
const t = this.source, n = t.length;
|
|
1677
|
+
if (s >= n || t.charCodeAt(s) !== j)
|
|
1678
|
+
return null;
|
|
1679
|
+
let e = s + 1;
|
|
1680
|
+
if (e >= n)
|
|
1681
|
+
return null;
|
|
1682
|
+
const r = t.charCodeAt(e);
|
|
1683
|
+
if (r !== T && r !== x && r !== P)
|
|
1684
|
+
return null;
|
|
1685
|
+
const o = r === T ? "#" : r === x ? ":" : "/";
|
|
1686
|
+
e++;
|
|
1687
|
+
const h = e;
|
|
1688
|
+
for (; e < n && t.charCodeAt(e) !== p && t.charCodeAt(e) !== f && t.charCodeAt(e) !== D; )
|
|
1689
|
+
e++;
|
|
1690
|
+
if (e === h)
|
|
1691
|
+
return null;
|
|
1692
|
+
let i = t.slice(h, e);
|
|
1693
|
+
if (o === ":" && i === "else") {
|
|
1694
|
+
const _ = e;
|
|
1695
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1696
|
+
e++;
|
|
1697
|
+
e + 1 < n && t.charCodeAt(e) === 105 && t.charCodeAt(e + 1) === 102 && (e + 2 >= n || t.charCodeAt(e + 2) === p || t.charCodeAt(e + 2) === f || t.charCodeAt(e + 2) === D) ? (i = "else if", e += 2) : e = _;
|
|
1698
|
+
}
|
|
1699
|
+
if (o === "/") {
|
|
1700
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1701
|
+
e++;
|
|
1702
|
+
return e >= n || t.charCodeAt(e) !== D ? null : { kind: o, tag: i, expr_start: 0, expr_end: 0, end: e + 1 };
|
|
1703
|
+
}
|
|
1704
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1705
|
+
e++;
|
|
1706
|
+
if (e < n && t.charCodeAt(e) === D)
|
|
1707
|
+
return { kind: o, tag: i, expr_start: 0, expr_end: 0, end: e + 1 };
|
|
1708
|
+
const c = e, a = this.find_matching_brace(c);
|
|
1709
|
+
return a === -1 ? null : {
|
|
1710
|
+
kind: o,
|
|
1711
|
+
tag: i,
|
|
1712
|
+
expr_start: c,
|
|
1713
|
+
expr_end: a - 1,
|
|
1714
|
+
end: a
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* check if position starts with a svelte block continuation ({:...}) or
|
|
1719
|
+
* closer ({/...}) that would interrupt the current block content.
|
|
1720
|
+
*/
|
|
1721
|
+
is_svelte_block_boundary(s) {
|
|
1722
|
+
if (this.svelte_block_depth === 0)
|
|
1723
|
+
return !1;
|
|
1724
|
+
const t = this.source;
|
|
1725
|
+
if (s >= t.length || t.charCodeAt(s) !== j)
|
|
1726
|
+
return !1;
|
|
1727
|
+
const n = t.charCodeAt(s + 1);
|
|
1728
|
+
return n === x || n === P;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* find the matching closing brace for a svelte expression.
|
|
1732
|
+
* pos should point to the char after the opening `{`.
|
|
1733
|
+
* tracks nested braces and skips over string literals and template literals.
|
|
1734
|
+
* returns the position just past the closing `}`, or -1 if not found.
|
|
1735
|
+
*/
|
|
1736
|
+
find_matching_brace(s) {
|
|
1737
|
+
const t = this.source, n = t.length;
|
|
1738
|
+
let e = 1, r = s;
|
|
1739
|
+
for (; r < n; ) {
|
|
1740
|
+
const o = t.charCodeAt(r);
|
|
1741
|
+
switch (o) {
|
|
1742
|
+
case j:
|
|
1743
|
+
e++, r++;
|
|
1744
|
+
break;
|
|
1745
|
+
case D:
|
|
1746
|
+
if (e--, e === 0)
|
|
1747
|
+
return r + 1;
|
|
1748
|
+
r++;
|
|
1749
|
+
break;
|
|
1750
|
+
case Q:
|
|
1751
|
+
case X: {
|
|
1752
|
+
for (r++; r < n && t.charCodeAt(r) !== o; )
|
|
1753
|
+
t.charCodeAt(r) === S && r++, r++;
|
|
1754
|
+
r < n && r++;
|
|
1755
|
+
break;
|
|
1756
|
+
}
|
|
1757
|
+
case b: {
|
|
1758
|
+
for (r++; r < n && t.charCodeAt(r) !== b; ) {
|
|
1759
|
+
if (t.charCodeAt(r) === S)
|
|
1760
|
+
r++;
|
|
1761
|
+
else if (t.charCodeAt(r) === 36 && r + 1 < n && t.charCodeAt(r + 1) === j) {
|
|
1762
|
+
r += 2;
|
|
1763
|
+
const h = this.find_matching_brace(r);
|
|
1764
|
+
if (h === -1)
|
|
1765
|
+
return -1;
|
|
1766
|
+
r = h;
|
|
1767
|
+
continue;
|
|
1768
|
+
}
|
|
1769
|
+
r++;
|
|
1770
|
+
}
|
|
1771
|
+
r < n && r++;
|
|
1772
|
+
break;
|
|
1773
|
+
}
|
|
1774
|
+
case P: {
|
|
1775
|
+
if (r + 1 < n && t.charCodeAt(r + 1) === P) {
|
|
1776
|
+
for (r += 2; r < n && t.charCodeAt(r) !== d; )
|
|
1777
|
+
r++;
|
|
1778
|
+
break;
|
|
1779
|
+
}
|
|
1780
|
+
if (r + 1 < n && t.charCodeAt(r + 1) === O) {
|
|
1781
|
+
for (r += 2; r < n; ) {
|
|
1782
|
+
if (t.charCodeAt(r) === O && r + 1 < n && t.charCodeAt(r + 1) === P) {
|
|
1783
|
+
r += 2;
|
|
1784
|
+
break;
|
|
1785
|
+
}
|
|
1786
|
+
r++;
|
|
1787
|
+
}
|
|
1788
|
+
break;
|
|
1789
|
+
}
|
|
1790
|
+
r++;
|
|
1791
|
+
break;
|
|
1792
|
+
}
|
|
1793
|
+
default:
|
|
1794
|
+
r++;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
return -1;
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* try to parse a link reference definition at block level.
|
|
1801
|
+
* syntax: [label]: destination "title"
|
|
1802
|
+
*
|
|
1803
|
+
* returns position after the definition on success, -1 if not a
|
|
1804
|
+
* definition, or -2 if more input is needed (incremental stall).
|
|
1805
|
+
* on success, stores the definition in this.ref_map.
|
|
1806
|
+
*/
|
|
1807
|
+
try_parse_link_ref_definition(s) {
|
|
1808
|
+
if (this.block_quote_depth > 0 || this.list_depth > 0)
|
|
1809
|
+
return -1;
|
|
1810
|
+
const t = this.source, n = t.length;
|
|
1811
|
+
let e = s;
|
|
1812
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1813
|
+
e++;
|
|
1814
|
+
if (e >= n)
|
|
1815
|
+
return this.finished ? -1 : -2;
|
|
1816
|
+
if (t.charCodeAt(e) !== N)
|
|
1817
|
+
return -1;
|
|
1818
|
+
e++;
|
|
1819
|
+
const r = e;
|
|
1820
|
+
for (; e < n; ) {
|
|
1821
|
+
const g = t.charCodeAt(e);
|
|
1822
|
+
if (g === I)
|
|
1823
|
+
break;
|
|
1824
|
+
if (g === d || g === N)
|
|
1825
|
+
return -1;
|
|
1826
|
+
if (g === S && e + 1 < n) {
|
|
1827
|
+
e += 2;
|
|
1828
|
+
continue;
|
|
1829
|
+
}
|
|
1830
|
+
e++;
|
|
1831
|
+
}
|
|
1832
|
+
if (e >= n)
|
|
1833
|
+
return this.finished ? -1 : -2;
|
|
1834
|
+
if (e === r)
|
|
1835
|
+
return -1;
|
|
1836
|
+
const o = t.slice(r, e);
|
|
1837
|
+
if (e++, e >= n)
|
|
1838
|
+
return this.finished ? -1 : -2;
|
|
1839
|
+
if (t.charCodeAt(e) !== x)
|
|
1840
|
+
return -1;
|
|
1841
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1842
|
+
e++;
|
|
1843
|
+
if (e < n && t.charCodeAt(e) === d)
|
|
1844
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1845
|
+
e++;
|
|
1846
|
+
if (e >= n)
|
|
1847
|
+
return this.finished ? -1 : -2;
|
|
1848
|
+
let h, i;
|
|
1849
|
+
const c = t.charCodeAt(e);
|
|
1850
|
+
if (c === R) {
|
|
1851
|
+
for (e++, h = e; e < n; ) {
|
|
1852
|
+
const g = t.charCodeAt(e);
|
|
1853
|
+
if (g === v)
|
|
1854
|
+
break;
|
|
1855
|
+
if (g === d || g === R)
|
|
1856
|
+
return -1;
|
|
1857
|
+
if (g === S && e + 1 < n) {
|
|
1858
|
+
e += 2;
|
|
1859
|
+
continue;
|
|
1860
|
+
}
|
|
1861
|
+
e++;
|
|
1862
|
+
}
|
|
1863
|
+
if (e >= n)
|
|
1864
|
+
return this.finished ? -1 : -2;
|
|
1865
|
+
i = e, e++;
|
|
1866
|
+
} else {
|
|
1867
|
+
if (c === d)
|
|
1868
|
+
return -1;
|
|
1869
|
+
{
|
|
1870
|
+
h = e;
|
|
1871
|
+
let g = 0;
|
|
1872
|
+
for (; e < n; ) {
|
|
1873
|
+
const y = t.charCodeAt(e);
|
|
1874
|
+
if (y <= 32)
|
|
1875
|
+
break;
|
|
1876
|
+
if (y === E) {
|
|
1877
|
+
if (g === 0)
|
|
1878
|
+
break;
|
|
1879
|
+
g--;
|
|
1880
|
+
}
|
|
1881
|
+
if (y === L && g++, y === S && e + 1 < n) {
|
|
1882
|
+
e += 2;
|
|
1883
|
+
continue;
|
|
1884
|
+
}
|
|
1885
|
+
e++;
|
|
1886
|
+
}
|
|
1887
|
+
if (g !== 0 || (i = e, h === i))
|
|
1888
|
+
return -1;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
const a = t.slice(h, i), _ = e;
|
|
1892
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1893
|
+
e++;
|
|
1894
|
+
const l = e > _;
|
|
1895
|
+
let u = "";
|
|
1896
|
+
if (e < n) {
|
|
1897
|
+
const g = t.charCodeAt(e);
|
|
1898
|
+
if (g === d) {
|
|
1899
|
+
const y = e;
|
|
1900
|
+
for (e++; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1901
|
+
e++;
|
|
1902
|
+
if (e < n) {
|
|
1903
|
+
const H = t.charCodeAt(e);
|
|
1904
|
+
if (H === 34 || H === 39 || H === L) {
|
|
1905
|
+
const U = this.parse_ref_title(e);
|
|
1906
|
+
if (U === -2)
|
|
1907
|
+
return -2;
|
|
1908
|
+
U ? (u = U.title, e = U.end) : e = y;
|
|
1909
|
+
} else
|
|
1910
|
+
e = y;
|
|
1911
|
+
} else if (this.finished)
|
|
1912
|
+
e = y;
|
|
1913
|
+
else
|
|
1914
|
+
return -2;
|
|
1915
|
+
} else if ((g === 34 || g === 39 || g === L) && l) {
|
|
1916
|
+
const y = this.parse_ref_title(e);
|
|
1917
|
+
if (y === -2)
|
|
1918
|
+
return -2;
|
|
1919
|
+
if (y)
|
|
1920
|
+
u = y.title, e = y.end;
|
|
1921
|
+
else
|
|
1922
|
+
return -1;
|
|
1923
|
+
}
|
|
1924
|
+
} else if (!this.finished)
|
|
1925
|
+
return -2;
|
|
1926
|
+
for (; e < n && (t.charCodeAt(e) === p || t.charCodeAt(e) === f); )
|
|
1927
|
+
e++;
|
|
1928
|
+
if (e >= n && !this.finished)
|
|
1929
|
+
return -2;
|
|
1930
|
+
if (e < n && t.charCodeAt(e) !== d)
|
|
1931
|
+
return -1;
|
|
1932
|
+
e < n && e++;
|
|
1933
|
+
const k = this.normalize_label(o);
|
|
1934
|
+
return k && !this.ref_map.has(k) && this.ref_map.set(k, { url: a, title: u }), e;
|
|
1935
|
+
}
|
|
1936
|
+
/**
|
|
1937
|
+
* parse a title string starting at pos. handles "...", '...', (...)
|
|
1938
|
+
* including multi-line titles (but not across blank lines).
|
|
1939
|
+
* returns { title, end } or null on failure.
|
|
1940
|
+
*/
|
|
1941
|
+
parse_ref_title(s) {
|
|
1942
|
+
const t = this.source, n = t.length, e = t.charCodeAt(s);
|
|
1943
|
+
if (e !== 34 && e !== 39 && e !== L)
|
|
1944
|
+
return null;
|
|
1945
|
+
const r = e === L ? E : e;
|
|
1946
|
+
let o = s + 1;
|
|
1947
|
+
const h = o;
|
|
1948
|
+
for (; o < n; ) {
|
|
1949
|
+
const i = t.charCodeAt(o);
|
|
1950
|
+
if (i === r)
|
|
1951
|
+
return { title: t.slice(h, o), end: o + 1 };
|
|
1952
|
+
if (i === d) {
|
|
1953
|
+
let c = o + 1;
|
|
1954
|
+
for (; c < n && (t.charCodeAt(c) === p || t.charCodeAt(c) === f); )
|
|
1955
|
+
c++;
|
|
1956
|
+
if (c < n && t.charCodeAt(c) === d)
|
|
1957
|
+
return null;
|
|
1958
|
+
if (c >= n && !this.finished)
|
|
1959
|
+
return -2;
|
|
1960
|
+
}
|
|
1961
|
+
if (i === S && o + 1 < n) {
|
|
1962
|
+
o += 2;
|
|
1963
|
+
continue;
|
|
1964
|
+
}
|
|
1965
|
+
o++;
|
|
1966
|
+
}
|
|
1967
|
+
return this.finished ? null : -2;
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* start a heading from a block dispatch state. validates # count,
|
|
1971
|
+
* emits open(heading), skips whitespace after #, and pushes
|
|
1972
|
+
* heading_marker state for streaming content.
|
|
1973
|
+
*/
|
|
1974
|
+
/**
|
|
1975
|
+
* returns false if we need to hold back (not enough input).
|
|
1976
|
+
*/
|
|
1977
|
+
start_heading(s) {
|
|
1978
|
+
const t = this.source, n = t.length;
|
|
1979
|
+
let e = 1, r = this.cursor + 1;
|
|
1980
|
+
for (; r < n && t.charCodeAt(r) === T; )
|
|
1981
|
+
e++, r++;
|
|
1982
|
+
if (e > 6) {
|
|
1983
|
+
this.states.push(
|
|
1984
|
+
7
|
|
1985
|
+
/* StateKind.paragraph */
|
|
1986
|
+
);
|
|
1987
|
+
const c = this.emit_open(7, this.cursor, s);
|
|
1988
|
+
return this.node_stack.push(c), !0;
|
|
1989
|
+
}
|
|
1990
|
+
if (r >= n && !this.finished)
|
|
1991
|
+
return !1;
|
|
1992
|
+
const o = t.charCodeAt(r);
|
|
1993
|
+
if (r < n && o !== p && o !== f && o !== d) {
|
|
1994
|
+
this.states.push(
|
|
1995
|
+
7
|
|
1996
|
+
/* StateKind.paragraph */
|
|
1997
|
+
);
|
|
1998
|
+
const c = this.emit_open(7, this.cursor, s);
|
|
1999
|
+
return this.node_stack.push(c), !0;
|
|
2000
|
+
}
|
|
2001
|
+
let h = r;
|
|
2002
|
+
if (r < n && (o === p || o === f))
|
|
2003
|
+
for (h++; h < n && (t.charCodeAt(h) === p || t.charCodeAt(h) === f); )
|
|
2004
|
+
h++;
|
|
2005
|
+
if (h >= n && !this.finished)
|
|
2006
|
+
return !1;
|
|
2007
|
+
const i = this.emit_open(3, this.cursor, s, e);
|
|
2008
|
+
return this.out.set_value_start(i, h), this.node_stack.push(i), this.in_heading = !0, this.states.push(
|
|
2009
|
+
2
|
|
2010
|
+
/* StateKind.heading_marker */
|
|
2011
|
+
), this.chomp(h, !0), !0;
|
|
2012
|
+
}
|
|
2013
|
+
// an inline construct that streams nested content (emphasis, strong,
|
|
2014
|
+
// strikethrough, superscript, subscript, link/image/directive text)
|
|
2015
|
+
// opened a span but reached end of input with no matching close. pop the
|
|
2016
|
+
// state and its node, leaving the node pending so _finalize revokes it
|
|
2017
|
+
// into literal text (commonmark degrade behavior). pop the enclosing
|
|
2018
|
+
// inline so the parent block state regains control - mirrors the normal
|
|
2019
|
+
// close path. without this the construct's state and inline ping-pong at
|
|
2020
|
+
// a fixed cursor and trip the no-progress guard.
|
|
2021
|
+
_unwind_unterminated_delimiter() {
|
|
2022
|
+
this.states.pop(), this.node_stack.pop(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2023
|
+
}
|
|
2024
|
+
// returns true when a linefeed inside a delimiter state (emphasis,
|
|
2025
|
+
// strong, strikethrough, superscript, subscript) was consumed by a
|
|
2026
|
+
// block interrupt or blockquote boundary. caller should `continue
|
|
2027
|
+
// main_loop` when true.
|
|
2028
|
+
_delimiter_lf_close(s) {
|
|
2029
|
+
if (this.block_quote_depth > 0) {
|
|
2030
|
+
const t = this.cursor + 1, n = this.skip_bq_markers(t, this.block_quote_depth);
|
|
2031
|
+
if (n !== -1 && !this.is_blank_at_pos(n) && !this.is_heading_start(n) && !this.is_thematic_break_start(n)) {
|
|
2032
|
+
const e = this.emit_open(18, this.cursor, s);
|
|
2033
|
+
this.emit_close(e, this.cursor + 1), this.chomp(n, !0), this.states.push(
|
|
2034
|
+
8
|
|
2035
|
+
/* StateKind.inline */
|
|
2036
|
+
);
|
|
2037
|
+
} else
|
|
2038
|
+
this.states.pop(), this.emit_close(s, this.cursor), this.out.set_value_end(s, this.cursor), this.node_stack.pop();
|
|
2039
|
+
return !0;
|
|
2040
|
+
}
|
|
2041
|
+
return this.is_blank_line_after(this.cursor) || this.is_heading_start(this.cursor + 1) || this.is_thematic_break_start(this.cursor + 1) ? (this.states.pop(), this.emit_close(s, this.cursor), this.out.set_value_end(s, this.cursor), this.node_stack.pop(), !0) : !1;
|
|
2042
|
+
}
|
|
2043
|
+
// main loop
|
|
2044
|
+
_run() {
|
|
2045
|
+
const s = this.source, t = s.length;
|
|
2046
|
+
this.loop_without_progress = 0;
|
|
2047
|
+
let n = 0;
|
|
2048
|
+
t: for (; this.cursor <= t && !(!this.finished && this.cursor >= t); ) {
|
|
2049
|
+
if (this.pending_count > 0) {
|
|
2050
|
+
const h = this.states[this.states.length - 1];
|
|
2051
|
+
if (h === 0 || h === 17 || h === 18) {
|
|
2052
|
+
let i = 0;
|
|
2053
|
+
for (let c = 0; c < this.pending_count; c++) {
|
|
2054
|
+
const a = this.pending_ids[c], _ = this.NodeKind_array[a];
|
|
2055
|
+
if (_ === 7) {
|
|
2056
|
+
this.pending_ids[i] = a, this.pending_starts[i] = this.pending_starts[c], i++;
|
|
2057
|
+
continue;
|
|
2058
|
+
}
|
|
2059
|
+
if (this.node_stack.indexOf(a) !== -1) {
|
|
2060
|
+
this.pending_ids[i] = a, this.pending_starts[i] = this.pending_starts[c], i++;
|
|
2061
|
+
continue;
|
|
2062
|
+
}
|
|
2063
|
+
if (_ === 2) {
|
|
2064
|
+
const l = this.pending_starts[c];
|
|
2065
|
+
let u = l;
|
|
2066
|
+
for (; u < t && s.charCodeAt(u) !== d; )
|
|
2067
|
+
u++;
|
|
2068
|
+
this.out.revoke(a, s.slice(l, u));
|
|
2069
|
+
} else
|
|
2070
|
+
this.out.revoke(a), _ === 30 && this.directive_text_pop(a);
|
|
2071
|
+
}
|
|
2072
|
+
this.pending_count = i;
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
const e = this.states[this.states.length - 1], r = s.charCodeAt(this.cursor), o = this.node_stack[this.node_stack.length - 1];
|
|
2076
|
+
if ((++n & 63) === 0) {
|
|
2077
|
+
if (this.cursor === this.prev_cursor) {
|
|
2078
|
+
if (this.loop_without_progress += 64, this.loop_without_progress > 100) {
|
|
2079
|
+
console.error("Infinite loop detected");
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
} else
|
|
2083
|
+
this.loop_without_progress = 0;
|
|
2084
|
+
this.prev_cursor = this.cursor;
|
|
2085
|
+
}
|
|
2086
|
+
switch (e) {
|
|
2087
|
+
case 0: {
|
|
2088
|
+
if (r !== r) {
|
|
2089
|
+
this.chomp1();
|
|
2090
|
+
continue;
|
|
2091
|
+
}
|
|
2092
|
+
if (this.cursor === 0 && !this.frontmatter_failed && r === A && !this.finished && t < 4 && (t < 2 || s.charCodeAt(1) === A) && (t < 3 || s.charCodeAt(2) === A))
|
|
2093
|
+
break t;
|
|
2094
|
+
if (this.cursor === 0 && !this.frontmatter_failed && r === A && s.charCodeAt(1) === A && s.charCodeAt(2) === A) {
|
|
2095
|
+
const h = s.charCodeAt(3);
|
|
2096
|
+
if (h === d || h !== h) {
|
|
2097
|
+
if (!this.finished && t < 4)
|
|
2098
|
+
break t;
|
|
2099
|
+
this.states.push(
|
|
2100
|
+
29
|
|
2101
|
+
/* StateKind.frontmatter */
|
|
2102
|
+
);
|
|
2103
|
+
const i = this.emit_open(33, 0, o);
|
|
2104
|
+
this.node_stack.push(i);
|
|
2105
|
+
const c = h === d ? 4 : 3;
|
|
2106
|
+
this.out.set_value_start(i, c), this.chomp(c, !0);
|
|
2107
|
+
continue;
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
if (this.imports_allowed && r === 105) {
|
|
2111
|
+
const h = this.try_parse_import(this.cursor);
|
|
2112
|
+
if (h === !1)
|
|
2113
|
+
break t;
|
|
2114
|
+
if (h !== null) {
|
|
2115
|
+
const i = this.emit_open(34, this.cursor, o);
|
|
2116
|
+
this.out.set_value_start(i, h.value_start), this.out.set_value_end(i, h.value_end), this.emit_close(i, h.end), this.chomp(h.end, !0);
|
|
2117
|
+
continue;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
switch (this.imports_allowed && r !== d && r !== p && r !== f && (this.imports_allowed = !1), r) {
|
|
2121
|
+
case d: {
|
|
2122
|
+
const h = this.emit_open(6, this.cursor, o);
|
|
2123
|
+
this.emit_close(h, this.cursor + 1), this.chomp1();
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
case p:
|
|
2127
|
+
case f: {
|
|
2128
|
+
let h = this.cursor;
|
|
2129
|
+
for (; h < t && (s.charCodeAt(h) === p || s.charCodeAt(h) === f); )
|
|
2130
|
+
h++;
|
|
2131
|
+
if (h >= t && !this.finished)
|
|
2132
|
+
break t;
|
|
2133
|
+
if (h < t && s.charCodeAt(h) === d) {
|
|
2134
|
+
const i = this.emit_open(6, this.cursor, o);
|
|
2135
|
+
this.emit_close(i, h + 1), this.chomp(h + 1, !0);
|
|
2136
|
+
continue;
|
|
2137
|
+
}
|
|
2138
|
+
this.chomp1();
|
|
2139
|
+
continue;
|
|
2140
|
+
}
|
|
2141
|
+
case T: {
|
|
2142
|
+
if (!this.start_heading(o))
|
|
2143
|
+
break t;
|
|
2144
|
+
continue;
|
|
2145
|
+
}
|
|
2146
|
+
case b: {
|
|
2147
|
+
this.states.push(
|
|
2148
|
+
3
|
|
2149
|
+
/* StateKind.code_fence_start */
|
|
2150
|
+
), this.extra = 0;
|
|
2151
|
+
continue;
|
|
2152
|
+
}
|
|
2153
|
+
case O:
|
|
2154
|
+
case A:
|
|
2155
|
+
case C: {
|
|
2156
|
+
if (!this.finished) {
|
|
2157
|
+
let i = !0;
|
|
2158
|
+
for (let c = this.cursor + 1; c < t; c++) {
|
|
2159
|
+
const a = s.charCodeAt(c);
|
|
2160
|
+
if (a === d) {
|
|
2161
|
+
i = !1;
|
|
2162
|
+
break;
|
|
2163
|
+
}
|
|
2164
|
+
if (a !== r && a !== p && a !== f) {
|
|
2165
|
+
i = !1;
|
|
2166
|
+
break;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
if (i)
|
|
2170
|
+
break t;
|
|
2171
|
+
}
|
|
2172
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
2173
|
+
let i = this.cursor;
|
|
2174
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
2175
|
+
i++;
|
|
2176
|
+
const c = i < t ? i + 1 : i, a = this.emit_open(11, this.cursor, o);
|
|
2177
|
+
this.emit_close(a, c), this.chomp(c, !0);
|
|
2178
|
+
continue;
|
|
2179
|
+
}
|
|
2180
|
+
if (r !== C) {
|
|
2181
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
2182
|
+
if (i) {
|
|
2183
|
+
this.start_list(i, o);
|
|
2184
|
+
continue;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
this.states.push(
|
|
2188
|
+
7
|
|
2189
|
+
/* StateKind.paragraph */
|
|
2190
|
+
);
|
|
2191
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
2192
|
+
this.node_stack.push(h);
|
|
2193
|
+
continue;
|
|
2194
|
+
}
|
|
2195
|
+
case R: {
|
|
2196
|
+
if (!this.finished && s.indexOf(">", this.cursor + 1) === -1)
|
|
2197
|
+
break t;
|
|
2198
|
+
if (this.try_parse_uri_autolink(this.cursor + 1) !== -1) {
|
|
2199
|
+
this.states.push(
|
|
2200
|
+
7
|
|
2201
|
+
/* StateKind.paragraph */
|
|
2202
|
+
);
|
|
2203
|
+
const _ = this.emit_open(7, this.cursor, o);
|
|
2204
|
+
this.node_stack.push(_);
|
|
2205
|
+
continue;
|
|
2206
|
+
}
|
|
2207
|
+
const i = this.try_parse_html_comment(this.cursor + 1);
|
|
2208
|
+
if (i === !1)
|
|
2209
|
+
break t;
|
|
2210
|
+
if (i) {
|
|
2211
|
+
const _ = this.emit_open(26, this.cursor, o);
|
|
2212
|
+
this.out.text(_, i.content_start, i.content_end), this.emit_close(_, i.end), this.chomp(i.end, !0);
|
|
2213
|
+
continue;
|
|
2214
|
+
}
|
|
2215
|
+
const c = this.try_parse_html_open_tag(this.cursor + 1);
|
|
2216
|
+
if (c) {
|
|
2217
|
+
if (c.self_closing || this.is_void_tag(c.tag)) {
|
|
2218
|
+
const _ = this.emit_open(2, this.cursor, o);
|
|
2219
|
+
this.out.attr(_, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(_, "attributes", c.attributes), this.out.attr(_, "self_closing", !0), this.emit_close(_, c.end), this.chomp(c.end, !0);
|
|
2220
|
+
} else if (this.is_raw_text_tag(c.tag)) {
|
|
2221
|
+
const _ = this.find_raw_close_tag(c.end, c.tag);
|
|
2222
|
+
if (_) {
|
|
2223
|
+
const l = this.emit_open(2, this.cursor, o);
|
|
2224
|
+
this.out.attr(l, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(l, "attributes", c.attributes), this.out.set_value_start(l, c.end), this.out.set_value_end(l, _.content_end), this.emit_close(l, _.end), this.chomp(_.end, !0);
|
|
2225
|
+
} else {
|
|
2226
|
+
if (!this.finished)
|
|
2227
|
+
break t;
|
|
2228
|
+
const l = this.emit_open(2, this.cursor, o);
|
|
2229
|
+
this.out.attr(l, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(l, "attributes", c.attributes), this.out.set_value_start(l, c.end), this.out.set_value_end(l, t), this.emit_close(l, t), this.chomp(t, !0);
|
|
2230
|
+
}
|
|
2231
|
+
} else {
|
|
2232
|
+
const _ = this.emit_open(2, this.cursor, o, 0, !0);
|
|
2233
|
+
this.out.attr(_, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(_, "attributes", c.attributes), this.html_tag_stack.push({ id: _, tag: c.tag }), this.node_stack.push(_), this.states.push(
|
|
2234
|
+
26
|
|
2235
|
+
/* StateKind.html_block_element */
|
|
2236
|
+
), this.html_block_depth++, this.chomp(c.end, !0);
|
|
2237
|
+
}
|
|
2238
|
+
continue;
|
|
2239
|
+
}
|
|
2240
|
+
this.states.push(
|
|
2241
|
+
7
|
|
2242
|
+
/* StateKind.paragraph */
|
|
2243
|
+
);
|
|
2244
|
+
const a = this.emit_open(7, this.cursor, o);
|
|
2245
|
+
this.node_stack.push(a);
|
|
2246
|
+
continue;
|
|
2247
|
+
}
|
|
2248
|
+
case v: {
|
|
2249
|
+
let h = this.cursor + 1;
|
|
2250
|
+
h < t && s.charCodeAt(h) === p && h++, this.block_quote_depth++;
|
|
2251
|
+
const i = this.emit_open(14, this.cursor, o);
|
|
2252
|
+
this.node_stack.push(i), this.states.push(
|
|
2253
|
+
17
|
|
2254
|
+
/* StateKind.block_quote */
|
|
2255
|
+
), this.chomp(h, !0);
|
|
2256
|
+
continue;
|
|
2257
|
+
}
|
|
2258
|
+
case q: {
|
|
2259
|
+
const h = this.try_start_table(o);
|
|
2260
|
+
if (h === !1)
|
|
2261
|
+
break t;
|
|
2262
|
+
if (h === !0)
|
|
2263
|
+
continue;
|
|
2264
|
+
this.states.push(
|
|
2265
|
+
7
|
|
2266
|
+
/* StateKind.paragraph */
|
|
2267
|
+
);
|
|
2268
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
2269
|
+
this.node_stack.push(i);
|
|
2270
|
+
continue;
|
|
2271
|
+
}
|
|
2272
|
+
case j: {
|
|
2273
|
+
if (!this.finished && this.find_matching_brace(this.cursor + 1) === -1)
|
|
2274
|
+
break t;
|
|
2275
|
+
const h = this.try_parse_svelte_block_token(this.cursor);
|
|
2276
|
+
if (h && h.kind === "#") {
|
|
2277
|
+
this.start_svelte_block(h, o);
|
|
2278
|
+
continue;
|
|
2279
|
+
}
|
|
2280
|
+
this.states.push(
|
|
2281
|
+
7
|
|
2282
|
+
/* StateKind.paragraph */
|
|
2283
|
+
);
|
|
2284
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
2285
|
+
this.node_stack.push(i);
|
|
2286
|
+
continue;
|
|
2287
|
+
}
|
|
2288
|
+
case N: {
|
|
2289
|
+
if (!this.finished && s.indexOf(`
|
|
2290
|
+
`, this.cursor) === -1)
|
|
2291
|
+
break t;
|
|
2292
|
+
const h = this.try_parse_link_ref_definition(this.cursor);
|
|
2293
|
+
if (h === -2)
|
|
2294
|
+
break t;
|
|
2295
|
+
if (h >= 0) {
|
|
2296
|
+
this.chomp(h, !0);
|
|
2297
|
+
continue;
|
|
2298
|
+
}
|
|
2299
|
+
this.states.push(
|
|
2300
|
+
7
|
|
2301
|
+
/* StateKind.paragraph */
|
|
2302
|
+
);
|
|
2303
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
2304
|
+
this.node_stack.push(i);
|
|
2305
|
+
continue;
|
|
2306
|
+
}
|
|
2307
|
+
case x: {
|
|
2308
|
+
const h = this.try_parse_block_directive(this.cursor);
|
|
2309
|
+
if (h === !1)
|
|
2310
|
+
break t;
|
|
2311
|
+
if (h !== null) {
|
|
2312
|
+
this.start_block_directive(h, o);
|
|
2313
|
+
continue;
|
|
2314
|
+
}
|
|
2315
|
+
this.states.push(
|
|
2316
|
+
7
|
|
2317
|
+
/* StateKind.paragraph */
|
|
2318
|
+
);
|
|
2319
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
2320
|
+
this.node_stack.push(i);
|
|
2321
|
+
continue;
|
|
2322
|
+
}
|
|
2323
|
+
default: {
|
|
2324
|
+
if (r === K || r >= 48 && r <= 57) {
|
|
2325
|
+
if (!this.finished) {
|
|
2326
|
+
let c = this.cursor + 1;
|
|
2327
|
+
if (r !== K) {
|
|
2328
|
+
for (; c < t && s.charCodeAt(c) >= 48 && s.charCodeAt(c) <= 57; )
|
|
2329
|
+
c++;
|
|
2330
|
+
if (c >= t)
|
|
2331
|
+
break t;
|
|
2332
|
+
const a = s.charCodeAt(c);
|
|
2333
|
+
(a === M || a === E) && c++;
|
|
2334
|
+
}
|
|
2335
|
+
if (c >= t)
|
|
2336
|
+
break t;
|
|
2337
|
+
}
|
|
2338
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
2339
|
+
if (i) {
|
|
2340
|
+
this.start_list(i, o);
|
|
2341
|
+
continue;
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
this.states.push(
|
|
2345
|
+
7
|
|
2346
|
+
/* StateKind.paragraph */
|
|
2347
|
+
);
|
|
2348
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
2349
|
+
this.node_stack.push(h);
|
|
2350
|
+
continue;
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
case 7: {
|
|
2355
|
+
const h = 1 + this.block_quote_depth + this.list_depth * 2 + this.html_block_depth + this.svelte_block_depth * 2 + this.directive_colon_counts.length;
|
|
2356
|
+
if (!r) {
|
|
2357
|
+
if (!this.finished)
|
|
2358
|
+
break t;
|
|
2359
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2360
|
+
continue;
|
|
2361
|
+
}
|
|
2362
|
+
if (r === d && !this.finished && !this.can_decide_after_lf(this.cursor))
|
|
2363
|
+
break t;
|
|
2364
|
+
if (r === d) {
|
|
2365
|
+
const i = this.cursor + 1;
|
|
2366
|
+
if (this.block_quote_depth > 0) {
|
|
2367
|
+
const a = this.skip_bq_markers(i, this.block_quote_depth);
|
|
2368
|
+
if (a === -1) {
|
|
2369
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2370
|
+
continue;
|
|
2371
|
+
}
|
|
2372
|
+
if (this.is_blank_at_pos(a) || this.is_heading_start(a) || this.is_thematic_break_start(a) || s.charCodeAt(a) === b && s.charCodeAt(a + 1) === b && s.charCodeAt(a + 2) === b) {
|
|
2373
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2374
|
+
continue;
|
|
2375
|
+
}
|
|
2376
|
+
if (this.list_depth > 0) {
|
|
2377
|
+
const { columns: l } = this.count_indent(a), u = l >= this.list_content_offset ? this.skip_columns(a, this.list_content_offset) : a;
|
|
2378
|
+
if (u < t && this.try_parse_list_marker(u) !== null) {
|
|
2379
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2380
|
+
continue;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
const _ = this.emit_open(18, this.cursor, o);
|
|
2384
|
+
this.emit_close(_, this.cursor + 1), this.chomp(a, !0), this.states.push(
|
|
2385
|
+
8
|
|
2386
|
+
/* StateKind.inline */
|
|
2387
|
+
);
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
if (this.is_block_interrupt(i)) {
|
|
2391
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2392
|
+
continue;
|
|
2393
|
+
}
|
|
2394
|
+
if (this.list_depth > 0) {
|
|
2395
|
+
const { columns: a } = this.count_indent(i);
|
|
2396
|
+
if (a >= this.list_content_offset) {
|
|
2397
|
+
const _ = this.skip_columns(i, this.list_content_offset);
|
|
2398
|
+
if (_ < t && this.try_parse_list_marker(_) !== null) {
|
|
2399
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.length = h;
|
|
2400
|
+
continue;
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
const c = this.emit_open(18, this.cursor, o);
|
|
2405
|
+
for (this.emit_close(c, this.cursor + 1), this.chomp1(); this.cursor < t && s.charCodeAt(this.cursor) === p; )
|
|
2406
|
+
this.chomp1();
|
|
2407
|
+
this.states.push(
|
|
2408
|
+
8
|
|
2409
|
+
/* StateKind.inline */
|
|
2410
|
+
);
|
|
2411
|
+
continue;
|
|
2412
|
+
} else {
|
|
2413
|
+
this.states.push(
|
|
2414
|
+
8
|
|
2415
|
+
/* StateKind.inline */
|
|
2416
|
+
);
|
|
2417
|
+
continue;
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
case 3:
|
|
2421
|
+
if (r === b) {
|
|
2422
|
+
this.extra += 1, this.chomp1();
|
|
2423
|
+
continue;
|
|
2424
|
+
} else if (this.extra >= 3) {
|
|
2425
|
+
if (this.block_quote_depth > 0) {
|
|
2426
|
+
let i = this.cursor;
|
|
2427
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
2428
|
+
i++;
|
|
2429
|
+
if (i >= t && !this.finished)
|
|
2430
|
+
break t;
|
|
2431
|
+
const c = this.bq_fence_scan(i + 1, this.extra, this.block_quote_depth);
|
|
2432
|
+
if (c === 0)
|
|
2433
|
+
break t;
|
|
2434
|
+
if (c === -1) {
|
|
2435
|
+
this.states.pop();
|
|
2436
|
+
const a = this.emit_open(7, this.cursor - this.extra, o);
|
|
2437
|
+
this.node_stack.push(a);
|
|
2438
|
+
const _ = this.emit_open(1, this.cursor - this.extra, a);
|
|
2439
|
+
this.out.set_value_start(_, this.cursor - this.extra), this.out.set_value_end(_, this.cursor), this.emit_close(_, this.cursor), this.states.push(
|
|
2440
|
+
7
|
|
2441
|
+
/* StateKind.paragraph */
|
|
2442
|
+
);
|
|
2443
|
+
continue;
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
this.states.pop(), this.states.push(
|
|
2447
|
+
4
|
|
2448
|
+
/* StateKind.code_fence_info */
|
|
2449
|
+
);
|
|
2450
|
+
const h = this.emit_open(5, this.cursor - this.extra, o);
|
|
2451
|
+
this.node_stack.push(h), this.info_start_pos = this.cursor;
|
|
2452
|
+
continue;
|
|
2453
|
+
} else {
|
|
2454
|
+
this.states.pop();
|
|
2455
|
+
const h = this.emit_open(7, this.cursor - this.extra, o);
|
|
2456
|
+
this.node_stack.push(h), this.states.push(
|
|
2457
|
+
7
|
|
2458
|
+
/* StateKind.paragraph */
|
|
2459
|
+
), this.chomp(this.cursor - this.extra, !0);
|
|
2460
|
+
continue;
|
|
2461
|
+
}
|
|
2462
|
+
case 4: {
|
|
2463
|
+
if (!r && this.finished) {
|
|
2464
|
+
this.states.pop(), this.emit_close(o, t), this.out.set_value_start(o, t), this.out.set_value_end(o, t);
|
|
2465
|
+
break;
|
|
2466
|
+
} else if (r) {
|
|
2467
|
+
if (this.cursor + 1 >= t && this.finished) {
|
|
2468
|
+
this.emit_close(o, t), this.out.set_value_end(o, t), this.states.pop();
|
|
2469
|
+
continue;
|
|
2470
|
+
} else if (this.cursor + 1 >= t)
|
|
2471
|
+
break t;
|
|
2472
|
+
} else break t;
|
|
2473
|
+
if (r !== d) {
|
|
2474
|
+
this.chomp1();
|
|
2475
|
+
continue;
|
|
2476
|
+
} else if (this.cursor >= t && this.finished) {
|
|
2477
|
+
this.emit_close(o, t), this.out.set_value_end(o, t), this.states.pop();
|
|
2478
|
+
continue;
|
|
2479
|
+
} else {
|
|
2480
|
+
if (this.cursor >= t)
|
|
2481
|
+
break t;
|
|
2482
|
+
this.info_end_pos = this.cursor, this.states.pop(), this.states.push(
|
|
2483
|
+
5
|
|
2484
|
+
/* StateKind.code_fence_content */
|
|
2485
|
+
), this.out.attr(o, "info_start", this.info_start_pos), this.out.attr(o, "info_end", this.cursor), this.chomp1(), this.out.set_value_start(o, this.cursor);
|
|
2486
|
+
continue;
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
case 5: {
|
|
2490
|
+
const h = this.extra;
|
|
2491
|
+
let i = this.cursor, c = -1, a = -1;
|
|
2492
|
+
{
|
|
2493
|
+
let l = i;
|
|
2494
|
+
for (; l < t && (s.charCodeAt(l) === p || s.charCodeAt(l) === f); )
|
|
2495
|
+
l++;
|
|
2496
|
+
const u = l;
|
|
2497
|
+
for (; l < t && s.charCodeAt(l) === b; )
|
|
2498
|
+
l++;
|
|
2499
|
+
l - u >= h && (c = u, a = this.cursor > 0 ? this.cursor - 1 : this.cursor);
|
|
2500
|
+
}
|
|
2501
|
+
if (c === -1)
|
|
2502
|
+
for (; i < t; ) {
|
|
2503
|
+
const l = s.indexOf(`
|
|
2504
|
+
`, i);
|
|
2505
|
+
if (l === -1)
|
|
2506
|
+
break;
|
|
2507
|
+
let u = l + 1;
|
|
2508
|
+
for (; u < t && (s.charCodeAt(u) === p || s.charCodeAt(u) === f); )
|
|
2509
|
+
u++;
|
|
2510
|
+
const k = u;
|
|
2511
|
+
for (; u < t && s.charCodeAt(u) === b; )
|
|
2512
|
+
u++;
|
|
2513
|
+
if (u - k >= h) {
|
|
2514
|
+
c = k, a = l;
|
|
2515
|
+
break;
|
|
2516
|
+
}
|
|
2517
|
+
i = l + 1;
|
|
2518
|
+
}
|
|
2519
|
+
if (c === -1) {
|
|
2520
|
+
if (!this.finished)
|
|
2521
|
+
break t;
|
|
2522
|
+
this.out.set_value_end(o, t), this.states.pop(), this.states.push(
|
|
2523
|
+
6
|
|
2524
|
+
/* StateKind.code_fence_text_end */
|
|
2525
|
+
), this.chomp(t, !0);
|
|
2526
|
+
continue;
|
|
2527
|
+
}
|
|
2528
|
+
let _ = c;
|
|
2529
|
+
for (; _ < t && s.charCodeAt(_) === b; )
|
|
2530
|
+
_++;
|
|
2531
|
+
this.states.pop(), this.states.push(
|
|
2532
|
+
6
|
|
2533
|
+
/* StateKind.code_fence_text_end */
|
|
2534
|
+
), this.out.set_value_end(o, a), this.chomp(_, !0);
|
|
2535
|
+
continue;
|
|
2536
|
+
}
|
|
2537
|
+
case 6: {
|
|
2538
|
+
if (this.cursor >= t && !this.finished)
|
|
2539
|
+
break t;
|
|
2540
|
+
if (this.cursor >= t || r === d) {
|
|
2541
|
+
this.emit_close(o, this.cursor), this.node_stack.pop(), this.states.pop(), this.chomp1();
|
|
2542
|
+
continue;
|
|
2543
|
+
}
|
|
2544
|
+
if (r === b) {
|
|
2545
|
+
this.chomp1();
|
|
2546
|
+
continue;
|
|
2547
|
+
}
|
|
2548
|
+
{
|
|
2549
|
+
let h = this.cursor;
|
|
2550
|
+
for (; h < t && s.charCodeAt(h) !== d; )
|
|
2551
|
+
h++;
|
|
2552
|
+
if (h >= t && !this.finished)
|
|
2553
|
+
break t;
|
|
2554
|
+
this.emit_close(o, this.cursor), this.node_stack.pop(), this.states.pop(), this.chomp(h, !0);
|
|
2555
|
+
continue;
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
case 2: {
|
|
2559
|
+
if (r === d || r !== r) {
|
|
2560
|
+
if (!this.finished && r !== r)
|
|
2561
|
+
break t;
|
|
2562
|
+
let h = this.cursor;
|
|
2563
|
+
for (; h > 0 && (s.charCodeAt(h - 1) === p || s.charCodeAt(h - 1) === f); )
|
|
2564
|
+
h--;
|
|
2565
|
+
this.out.set_value_end(o, h), this.emit_close(o, this.cursor), this.in_heading = !1, this.node_stack.pop(), this.states.pop();
|
|
2566
|
+
continue;
|
|
2567
|
+
}
|
|
2568
|
+
this.states.push(
|
|
2569
|
+
8
|
|
2570
|
+
/* StateKind.inline */
|
|
2571
|
+
);
|
|
2572
|
+
continue;
|
|
2573
|
+
}
|
|
2574
|
+
case 14: {
|
|
2575
|
+
if (!r) {
|
|
2576
|
+
this._unwind_unterminated_delimiter();
|
|
2577
|
+
continue;
|
|
2578
|
+
}
|
|
2579
|
+
if (r === O && !this.finished && this.cursor + 1 >= t)
|
|
2580
|
+
break t;
|
|
2581
|
+
if (r === O && this.prev & 6 && this.next_class & 3) {
|
|
2582
|
+
const h = this.node_stack[this.node_stack.length - 1];
|
|
2583
|
+
if (!this.emphasis_has_content) {
|
|
2584
|
+
this.out.revoke(h), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2585
|
+
continue;
|
|
2586
|
+
}
|
|
2587
|
+
this.out.set_value_end(h, this.cursor), this.emit_close(h, this.cursor + 1), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.chomp1(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2588
|
+
} else {
|
|
2589
|
+
if (r === d && this._delimiter_lf_close(o))
|
|
2590
|
+
continue;
|
|
2591
|
+
this.emphasis_has_content = !0, this.states.push(
|
|
2592
|
+
8
|
|
2593
|
+
/* StateKind.inline */
|
|
2594
|
+
);
|
|
2595
|
+
}
|
|
2596
|
+
continue;
|
|
2597
|
+
}
|
|
2598
|
+
case 15: {
|
|
2599
|
+
if (!r) {
|
|
2600
|
+
this._unwind_unterminated_delimiter();
|
|
2601
|
+
continue;
|
|
2602
|
+
}
|
|
2603
|
+
if (r === C && !this.finished && this.cursor + 1 >= t)
|
|
2604
|
+
break t;
|
|
2605
|
+
if (r === C && this.prev & 6 && this.next_class & 3) {
|
|
2606
|
+
const h = this.node_stack[this.node_stack.length - 1];
|
|
2607
|
+
if (!this.emphasis_has_content) {
|
|
2608
|
+
this.out.revoke(h), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2609
|
+
continue;
|
|
2610
|
+
}
|
|
2611
|
+
this.out.set_value_end(h, this.cursor), this.emit_close(h, this.cursor + 1), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.chomp1(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2612
|
+
} else {
|
|
2613
|
+
if (r === d && this._delimiter_lf_close(o))
|
|
2614
|
+
continue;
|
|
2615
|
+
this.emphasis_has_content = !0, this.states.push(
|
|
2616
|
+
8
|
|
2617
|
+
/* StateKind.inline */
|
|
2618
|
+
);
|
|
2619
|
+
}
|
|
2620
|
+
continue;
|
|
2621
|
+
}
|
|
2622
|
+
case 19: {
|
|
2623
|
+
if (!r) {
|
|
2624
|
+
this._unwind_unterminated_delimiter();
|
|
2625
|
+
continue;
|
|
2626
|
+
}
|
|
2627
|
+
if (r === B && !this.finished && this.cursor + 1 >= t)
|
|
2628
|
+
break t;
|
|
2629
|
+
if (r === B && s.charCodeAt(this.cursor + 1) === B && this.prev & 6 && w(s.charCodeAt(this.cursor + 2)) & 3) {
|
|
2630
|
+
const h = this.node_stack[this.node_stack.length - 1];
|
|
2631
|
+
this.out.set_value_end(h, this.cursor), this.emit_close(h, this.cursor + 2), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.chomp(2), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2632
|
+
} else {
|
|
2633
|
+
if (r === d && this._delimiter_lf_close(o))
|
|
2634
|
+
continue;
|
|
2635
|
+
this.states.push(
|
|
2636
|
+
8
|
|
2637
|
+
/* StateKind.inline */
|
|
2638
|
+
);
|
|
2639
|
+
}
|
|
2640
|
+
continue;
|
|
2641
|
+
}
|
|
2642
|
+
case 20: {
|
|
2643
|
+
if (!r) {
|
|
2644
|
+
this._unwind_unterminated_delimiter();
|
|
2645
|
+
continue;
|
|
2646
|
+
}
|
|
2647
|
+
if (r === Y && this.prev & 6) {
|
|
2648
|
+
const h = this.node_stack[this.node_stack.length - 1];
|
|
2649
|
+
this.out.set_value_end(h, this.cursor), this.emit_close(h, this.cursor + 1), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.chomp1(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2650
|
+
} else {
|
|
2651
|
+
if (r === d && this._delimiter_lf_close(o))
|
|
2652
|
+
continue;
|
|
2653
|
+
this.states.push(
|
|
2654
|
+
8
|
|
2655
|
+
/* StateKind.inline */
|
|
2656
|
+
);
|
|
2657
|
+
}
|
|
2658
|
+
continue;
|
|
2659
|
+
}
|
|
2660
|
+
case 21: {
|
|
2661
|
+
if (!r) {
|
|
2662
|
+
this._unwind_unterminated_delimiter();
|
|
2663
|
+
continue;
|
|
2664
|
+
}
|
|
2665
|
+
if (r === B && s.charCodeAt(this.cursor + 1) !== B && this.prev & 6) {
|
|
2666
|
+
const h = this.node_stack[this.node_stack.length - 1];
|
|
2667
|
+
this.out.set_value_end(h, this.cursor), this.emit_close(h, this.cursor + 1), this.pending_remove(h), this.states.pop(), this.node_stack.pop(), this.chomp1(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2668
|
+
} else {
|
|
2669
|
+
if (r === d && this._delimiter_lf_close(o))
|
|
2670
|
+
continue;
|
|
2671
|
+
this.states.push(
|
|
2672
|
+
8
|
|
2673
|
+
/* StateKind.inline */
|
|
2674
|
+
);
|
|
2675
|
+
}
|
|
2676
|
+
continue;
|
|
2677
|
+
}
|
|
2678
|
+
case 22: {
|
|
2679
|
+
if (!r) {
|
|
2680
|
+
this._unwind_unterminated_delimiter();
|
|
2681
|
+
continue;
|
|
2682
|
+
}
|
|
2683
|
+
if (r === I) {
|
|
2684
|
+
if (this.NodeKind_array[o] === 30) {
|
|
2685
|
+
const i = this.directive_text_brackets.length - 1;
|
|
2686
|
+
if (this.directive_text_brackets[i] > 0) {
|
|
2687
|
+
this.states.push(
|
|
2688
|
+
8
|
|
2689
|
+
/* StateKind.inline */
|
|
2690
|
+
);
|
|
2691
|
+
continue;
|
|
2692
|
+
}
|
|
2693
|
+
const c = this.cursor + 1;
|
|
2694
|
+
if (c >= t && !this.finished)
|
|
2695
|
+
break t;
|
|
2696
|
+
let a = c;
|
|
2697
|
+
if (c < t && s.charCodeAt(c) === L) {
|
|
2698
|
+
const _ = this.try_parse_directive_args(c);
|
|
2699
|
+
if (_ === !1)
|
|
2700
|
+
break t;
|
|
2701
|
+
_ !== null && (_.args && this.out.attr(o, "args", _.args), a = _.end);
|
|
2702
|
+
}
|
|
2703
|
+
this.out.set_value_end(o, this.cursor), this.pending_remove(o), this.emit_close(o, a), this.node_stack.pop(), this.states.pop(), this.directive_text_pop(o), this.states[this.states.length - 1] === 8 && this.states.pop(), this.chomp(a, !0);
|
|
2704
|
+
continue;
|
|
2705
|
+
}
|
|
2706
|
+
const h = this.cursor + 1;
|
|
2707
|
+
if (h >= t && !this.finished)
|
|
2708
|
+
break t;
|
|
2709
|
+
if (h < t && s.charCodeAt(h) === L) {
|
|
2710
|
+
let i = h + 1;
|
|
2711
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
2712
|
+
i++;
|
|
2713
|
+
let c = i, a = i;
|
|
2714
|
+
if (i < t && s.charCodeAt(i) === R) {
|
|
2715
|
+
for (i++, c = i; i < t && s.charCodeAt(i) !== v && s.charCodeAt(i) !== d; )
|
|
2716
|
+
i++;
|
|
2717
|
+
i < t && s.charCodeAt(i) === v && (a = i, i++);
|
|
2718
|
+
} else if (i < t && s.charCodeAt(i) === E)
|
|
2719
|
+
c = i, a = i;
|
|
2720
|
+
else {
|
|
2721
|
+
c = i;
|
|
2722
|
+
let u = 0;
|
|
2723
|
+
for (; i < t; ) {
|
|
2724
|
+
const k = s.charCodeAt(i);
|
|
2725
|
+
if (k <= 32)
|
|
2726
|
+
break;
|
|
2727
|
+
if (k === E) {
|
|
2728
|
+
if (u === 0)
|
|
2729
|
+
break;
|
|
2730
|
+
u--;
|
|
2731
|
+
}
|
|
2732
|
+
if (k === L && u++, k === S && i + 1 < t) {
|
|
2733
|
+
i += 2;
|
|
2734
|
+
continue;
|
|
2735
|
+
}
|
|
2736
|
+
i++;
|
|
2737
|
+
}
|
|
2738
|
+
a = i;
|
|
2739
|
+
}
|
|
2740
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
2741
|
+
i++;
|
|
2742
|
+
let _ = -1, l = -1;
|
|
2743
|
+
if (i < t) {
|
|
2744
|
+
const u = s.charCodeAt(i);
|
|
2745
|
+
if (u === 34 || u === 39 || u === L) {
|
|
2746
|
+
const k = u === L ? E : u;
|
|
2747
|
+
for (i++, _ = i; i < t && s.charCodeAt(i) !== k && s.charCodeAt(i) !== d; ) {
|
|
2748
|
+
if (s.charCodeAt(i) === S && i + 1 < t) {
|
|
2749
|
+
i += 2;
|
|
2750
|
+
continue;
|
|
2751
|
+
}
|
|
2752
|
+
i++;
|
|
2753
|
+
}
|
|
2754
|
+
i < t && s.charCodeAt(i) === k && (l = i, i++);
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
2758
|
+
i++;
|
|
2759
|
+
if (i < t && s.charCodeAt(i) === E) {
|
|
2760
|
+
i++;
|
|
2761
|
+
const u = o, k = s.slice(c, a), g = this.NodeKind_array[u] === 13;
|
|
2762
|
+
this.out.attr(u, g ? "src" : "href", k), _ >= 0 && l >= 0 && this.out.attr(u, "title", s.slice(_, l)), this.out.set_value_end(u, this.cursor), this.pending_remove(u), this.emit_close(u, i), this.node_stack.pop(), this.states.pop(), this.states[this.states.length - 1] === 8 && this.states.pop(), this.chomp(i, !0);
|
|
2763
|
+
continue;
|
|
2764
|
+
}
|
|
2765
|
+
if (!this.finished && i >= t)
|
|
2766
|
+
break t;
|
|
2767
|
+
}
|
|
2768
|
+
if (h < t && s.charCodeAt(h) === N) {
|
|
2769
|
+
let i = h + 1;
|
|
2770
|
+
if (i >= t && !this.finished)
|
|
2771
|
+
break t;
|
|
2772
|
+
if (i < t && s.charCodeAt(i) === I) {
|
|
2773
|
+
const a = s.slice(this.link_text_start, this.cursor), _ = this.normalize_label(a), l = this.ref_map.get(_);
|
|
2774
|
+
if (l) {
|
|
2775
|
+
const u = this.NodeKind_array[o] === 13;
|
|
2776
|
+
this.out.attr(o, u ? "src" : "href", l.url), l.title && this.out.attr(o, "title", l.title), this.out.set_value_end(o, this.cursor), this.pending_remove(o), this.emit_close(o, i + 1), this.node_stack.pop(), this.states.pop(), this.states[this.states.length - 1] === 8 && this.states.pop(), this.chomp(i + 1, !0);
|
|
2777
|
+
continue;
|
|
2778
|
+
}
|
|
2779
|
+
this.out.revoke(o), this.node_stack.pop(), this.states.pop();
|
|
2780
|
+
continue;
|
|
2781
|
+
}
|
|
2782
|
+
const c = i;
|
|
2783
|
+
for (; i < t; ) {
|
|
2784
|
+
const a = s.charCodeAt(i);
|
|
2785
|
+
if (a === I || a === N || a === d)
|
|
2786
|
+
break;
|
|
2787
|
+
if (a === S && i + 1 < t) {
|
|
2788
|
+
i += 2;
|
|
2789
|
+
continue;
|
|
2790
|
+
}
|
|
2791
|
+
i++;
|
|
2792
|
+
}
|
|
2793
|
+
if (i >= t && !this.finished)
|
|
2794
|
+
break t;
|
|
2795
|
+
if (i < t && s.charCodeAt(i) === I && i > c) {
|
|
2796
|
+
const a = s.slice(c, i), _ = this.normalize_label(a), l = this.ref_map.get(_);
|
|
2797
|
+
if (l) {
|
|
2798
|
+
const u = this.NodeKind_array[o] === 13;
|
|
2799
|
+
this.out.attr(o, u ? "src" : "href", l.url), l.title && this.out.attr(o, "title", l.title), this.out.set_value_end(o, this.cursor), this.pending_remove(o), this.emit_close(o, i + 1), this.node_stack.pop(), this.states.pop(), this.states[this.states.length - 1] === 8 && this.states.pop(), this.chomp(i + 1, !0);
|
|
2800
|
+
continue;
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
this.out.revoke(o), this.node_stack.pop(), this.states.pop();
|
|
2805
|
+
continue;
|
|
2806
|
+
}
|
|
2807
|
+
if (r === d && this.is_blank_line_after(this.cursor)) {
|
|
2808
|
+
this.out.revoke(o), this.directive_text_pop(o), this.node_stack.pop(), this.states.pop();
|
|
2809
|
+
continue;
|
|
2810
|
+
}
|
|
2811
|
+
this.states.push(
|
|
2812
|
+
8
|
|
2813
|
+
/* StateKind.inline */
|
|
2814
|
+
);
|
|
2815
|
+
continue;
|
|
2816
|
+
}
|
|
2817
|
+
case 25: {
|
|
2818
|
+
if (r === R) {
|
|
2819
|
+
if (!this.finished && s.indexOf(">", this.cursor + 1) === -1)
|
|
2820
|
+
break t;
|
|
2821
|
+
const h = this.try_parse_html_close_tag(this.cursor + 1);
|
|
2822
|
+
if (h) {
|
|
2823
|
+
const i = this.find_html_opener(h.tag);
|
|
2824
|
+
if (i !== -1 && this.html_tag_stack[i].id === o) {
|
|
2825
|
+
for (; this.html_tag_stack.length > i + 1; ) {
|
|
2826
|
+
const c = this.html_tag_stack.pop();
|
|
2827
|
+
this.close_html_inline(c.id, this.cursor);
|
|
2828
|
+
}
|
|
2829
|
+
this.html_tag_stack.pop(), this.pending_remove(o), this.emit_close(o, h.end), this.node_stack.pop(), this.states.pop(), this.chomp(h.end, !0), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
2830
|
+
continue;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
if (r === d && this.is_block_interrupt(this.cursor + 1)) {
|
|
2835
|
+
this.html_tag_stack.length > 0 && this.html_tag_stack[this.html_tag_stack.length - 1].id === o && this.html_tag_stack.pop(), this.states.pop(), this.node_stack.pop();
|
|
2836
|
+
continue;
|
|
2837
|
+
}
|
|
2838
|
+
if (!r) {
|
|
2839
|
+
if (!this.finished)
|
|
2840
|
+
break t;
|
|
2841
|
+
this.html_tag_stack.length > 0 && this.html_tag_stack[this.html_tag_stack.length - 1].id === o && this.html_tag_stack.pop(), this.states.pop(), this.node_stack.pop();
|
|
2842
|
+
continue;
|
|
2843
|
+
}
|
|
2844
|
+
this.states.push(
|
|
2845
|
+
8
|
|
2846
|
+
/* StateKind.inline */
|
|
2847
|
+
);
|
|
2848
|
+
continue;
|
|
2849
|
+
}
|
|
2850
|
+
case 26: {
|
|
2851
|
+
if (!r) {
|
|
2852
|
+
if (!this.finished)
|
|
2853
|
+
break t;
|
|
2854
|
+
this.html_tag_stack.length > 0 && this.html_tag_stack[this.html_tag_stack.length - 1].id === o && this.html_tag_stack.pop(), this.html_block_depth--, this.states.pop(), this.node_stack.pop();
|
|
2855
|
+
continue;
|
|
2856
|
+
}
|
|
2857
|
+
if (r === R) {
|
|
2858
|
+
if (!this.finished && s.indexOf(">", this.cursor + 1) === -1)
|
|
2859
|
+
break t;
|
|
2860
|
+
const i = this.try_parse_html_close_tag(this.cursor + 1);
|
|
2861
|
+
if (i) {
|
|
2862
|
+
const c = this.find_html_opener(i.tag);
|
|
2863
|
+
if (c !== -1 && this.html_tag_stack[c].id === o) {
|
|
2864
|
+
for (; this.html_tag_stack.length > c + 1; ) {
|
|
2865
|
+
const a = this.html_tag_stack.pop();
|
|
2866
|
+
this.closed_flags[a.id] || this.emit_close(a.id, this.cursor);
|
|
2867
|
+
}
|
|
2868
|
+
this.html_tag_stack.pop(), this.pending_remove(o), this.emit_close(o, i.end), this.html_block_depth--, this.node_stack.pop(), this.states.pop(), this.chomp(i.end, !0);
|
|
2869
|
+
continue;
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
if (r === d) {
|
|
2874
|
+
const i = this.emit_open(6, this.cursor, o);
|
|
2875
|
+
this.emit_close(i, this.cursor + 1), this.chomp1();
|
|
2876
|
+
continue;
|
|
2877
|
+
}
|
|
2878
|
+
if (r === p || r === f) {
|
|
2879
|
+
let i = this.cursor;
|
|
2880
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
2881
|
+
i++;
|
|
2882
|
+
if (i < t && s.charCodeAt(i) === d) {
|
|
2883
|
+
const c = this.emit_open(6, this.cursor, o);
|
|
2884
|
+
this.emit_close(c, i + 1), this.chomp(i + 1, !0);
|
|
2885
|
+
continue;
|
|
2886
|
+
}
|
|
2887
|
+
this.chomp1();
|
|
2888
|
+
continue;
|
|
2889
|
+
}
|
|
2890
|
+
if (r === T) {
|
|
2891
|
+
if (!this.start_heading(o))
|
|
2892
|
+
break t;
|
|
2893
|
+
continue;
|
|
2894
|
+
}
|
|
2895
|
+
if (r === b) {
|
|
2896
|
+
this.states.push(
|
|
2897
|
+
3
|
|
2898
|
+
/* StateKind.code_fence_start */
|
|
2899
|
+
), this.extra = 0;
|
|
2900
|
+
continue;
|
|
2901
|
+
}
|
|
2902
|
+
if (r === R) {
|
|
2903
|
+
const i = this.try_parse_html_comment(this.cursor + 1);
|
|
2904
|
+
if (i === !1)
|
|
2905
|
+
break t;
|
|
2906
|
+
if (i) {
|
|
2907
|
+
const a = this.emit_open(26, this.cursor, o);
|
|
2908
|
+
this.out.text(a, i.content_start, i.content_end), this.emit_close(a, i.end), this.chomp(i.end, !0);
|
|
2909
|
+
continue;
|
|
2910
|
+
}
|
|
2911
|
+
const c = this.try_parse_html_open_tag(this.cursor + 1);
|
|
2912
|
+
if (c) {
|
|
2913
|
+
if (c.self_closing || this.is_void_tag(c.tag)) {
|
|
2914
|
+
const a = this.emit_open(2, this.cursor, o);
|
|
2915
|
+
this.out.attr(a, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(a, "attributes", c.attributes), this.out.attr(a, "self_closing", !0), this.emit_close(a, c.end), this.chomp(c.end, !0);
|
|
2916
|
+
} else if (this.is_raw_text_tag(c.tag)) {
|
|
2917
|
+
const a = this.find_raw_close_tag(c.end, c.tag);
|
|
2918
|
+
if (a) {
|
|
2919
|
+
const _ = this.emit_open(2, this.cursor, o);
|
|
2920
|
+
this.out.attr(_, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(_, "attributes", c.attributes), this.out.set_value_start(_, c.end), this.out.set_value_end(_, a.content_end), this.emit_close(_, a.end), this.chomp(a.end, !0);
|
|
2921
|
+
} else {
|
|
2922
|
+
if (!this.finished)
|
|
2923
|
+
break t;
|
|
2924
|
+
const _ = this.emit_open(2, this.cursor, o);
|
|
2925
|
+
this.out.attr(_, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(_, "attributes", c.attributes), this.out.set_value_start(_, c.end), this.out.set_value_end(_, t), this.emit_close(_, t), this.chomp(t, !0);
|
|
2926
|
+
}
|
|
2927
|
+
} else {
|
|
2928
|
+
const a = this.emit_open(2, this.cursor, o, 0, !0);
|
|
2929
|
+
this.out.attr(a, "tag", c.tag), Object.keys(c.attributes).length > 0 && this.out.attr(a, "attributes", c.attributes), this.html_tag_stack.push({ id: a, tag: c.tag }), this.node_stack.push(a), this.states.push(
|
|
2930
|
+
26
|
|
2931
|
+
/* StateKind.html_block_element */
|
|
2932
|
+
), this.html_block_depth++, this.chomp(c.end, !0);
|
|
2933
|
+
}
|
|
2934
|
+
continue;
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
if (r === j) {
|
|
2938
|
+
if (!this.finished && this.find_matching_brace(this.cursor + 1) === -1)
|
|
2939
|
+
break t;
|
|
2940
|
+
const i = this.try_parse_svelte_block_token(this.cursor);
|
|
2941
|
+
if (i && i.kind === "#") {
|
|
2942
|
+
this.start_svelte_block(i, o);
|
|
2943
|
+
continue;
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
if (r === O || r === A || r === C) {
|
|
2947
|
+
if (!this.finished && this.cursor + 2 >= t)
|
|
2948
|
+
break t;
|
|
2949
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
2950
|
+
let i = this.cursor;
|
|
2951
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
2952
|
+
i++;
|
|
2953
|
+
const c = this.emit_open(11, this.cursor, o);
|
|
2954
|
+
this.emit_close(c, i), this.chomp(i, !0);
|
|
2955
|
+
continue;
|
|
2956
|
+
}
|
|
2957
|
+
if (r !== C) {
|
|
2958
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
2959
|
+
if (i) {
|
|
2960
|
+
this.start_list(i, o);
|
|
2961
|
+
continue;
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
if (r === K || r >= 48 && r <= 57) {
|
|
2966
|
+
if (!this.finished) {
|
|
2967
|
+
let c = this.cursor + 1;
|
|
2968
|
+
if (r !== K) {
|
|
2969
|
+
for (; c < t && s.charCodeAt(c) >= 48 && s.charCodeAt(c) <= 57; )
|
|
2970
|
+
c++;
|
|
2971
|
+
if (c >= t)
|
|
2972
|
+
break t;
|
|
2973
|
+
const a = s.charCodeAt(c);
|
|
2974
|
+
(a === M || a === E) && c++;
|
|
2975
|
+
}
|
|
2976
|
+
if (c >= t)
|
|
2977
|
+
break t;
|
|
2978
|
+
}
|
|
2979
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
2980
|
+
if (i) {
|
|
2981
|
+
this.start_list(i, o);
|
|
2982
|
+
continue;
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
if (r === q) {
|
|
2986
|
+
const i = this.try_start_table(o);
|
|
2987
|
+
if (i === !1)
|
|
2988
|
+
break t;
|
|
2989
|
+
if (i === !0)
|
|
2990
|
+
continue;
|
|
2991
|
+
}
|
|
2992
|
+
this.states.push(
|
|
2993
|
+
7
|
|
2994
|
+
/* StateKind.paragraph */
|
|
2995
|
+
);
|
|
2996
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
2997
|
+
this.node_stack.push(h);
|
|
2998
|
+
continue;
|
|
2999
|
+
}
|
|
3000
|
+
case 27: {
|
|
3001
|
+
if (!r) {
|
|
3002
|
+
if (!this.finished)
|
|
3003
|
+
break t;
|
|
3004
|
+
if (this.emit_close(this.svelte_branch_id, this.cursor), this.node_stack.pop(), this.emit_close(this.svelte_block_id, this.cursor), this.node_stack.pop(), this.states.pop(), this.svelte_block_depth--, this.svelte_block_depth > 0 && this.svelte_block_stack.length > 0) {
|
|
3005
|
+
const i = this.svelte_block_stack.pop();
|
|
3006
|
+
this.svelte_block_id = i.block_id, this.svelte_branch_id = i.branch_id, this.svelte_block_tag = i.tag;
|
|
3007
|
+
}
|
|
3008
|
+
continue;
|
|
3009
|
+
}
|
|
3010
|
+
if (r === j) {
|
|
3011
|
+
if (!this.finished && this.find_matching_brace(this.cursor + 1) === -1)
|
|
3012
|
+
break t;
|
|
3013
|
+
const i = this.try_parse_svelte_block_token(this.cursor);
|
|
3014
|
+
if (i) {
|
|
3015
|
+
if (i.kind === ":") {
|
|
3016
|
+
this.emit_close(this.svelte_branch_id, this.cursor), this.node_stack.pop();
|
|
3017
|
+
const c = this.emit_open(29, this.cursor, this.svelte_block_id);
|
|
3018
|
+
this.out.attr(c, "tag", i.tag), (i.expr_start !== 0 || i.expr_end !== 0) && (this.out.set_value_start(c, i.expr_start), this.out.set_value_end(c, i.expr_end)), this.svelte_branch_id = c, this.node_stack.push(c), this.chomp(i.end, !0);
|
|
3019
|
+
continue;
|
|
3020
|
+
}
|
|
3021
|
+
if (i.kind === "/") {
|
|
3022
|
+
if (this.emit_close(this.svelte_branch_id, this.cursor), this.node_stack.pop(), this.emit_close(this.svelte_block_id, i.end), this.node_stack.pop(), this.states.pop(), this.svelte_block_depth--, this.svelte_block_depth > 0 && this.svelte_block_stack.length > 0) {
|
|
3023
|
+
const c = this.svelte_block_stack.pop();
|
|
3024
|
+
this.svelte_block_id = c.block_id, this.svelte_branch_id = c.branch_id, this.svelte_block_tag = c.tag;
|
|
3025
|
+
}
|
|
3026
|
+
this.chomp(i.end, !0);
|
|
3027
|
+
continue;
|
|
3028
|
+
}
|
|
3029
|
+
if (i.kind === "#") {
|
|
3030
|
+
this.start_svelte_block(i, o);
|
|
3031
|
+
continue;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
if (r === d) {
|
|
3036
|
+
const i = this.emit_open(6, this.cursor, o);
|
|
3037
|
+
this.emit_close(i, this.cursor + 1), this.chomp1();
|
|
3038
|
+
continue;
|
|
3039
|
+
}
|
|
3040
|
+
if (r === p || r === f) {
|
|
3041
|
+
let i = this.cursor;
|
|
3042
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
3043
|
+
i++;
|
|
3044
|
+
if (i < t && s.charCodeAt(i) === d) {
|
|
3045
|
+
const c = this.emit_open(6, this.cursor, o);
|
|
3046
|
+
this.emit_close(c, i + 1), this.chomp(i + 1, !0);
|
|
3047
|
+
continue;
|
|
3048
|
+
}
|
|
3049
|
+
this.chomp1();
|
|
3050
|
+
continue;
|
|
3051
|
+
}
|
|
3052
|
+
if (r === T) {
|
|
3053
|
+
if (!this.start_heading(o))
|
|
3054
|
+
break t;
|
|
3055
|
+
continue;
|
|
3056
|
+
}
|
|
3057
|
+
if (r === b) {
|
|
3058
|
+
this.states.push(
|
|
3059
|
+
3
|
|
3060
|
+
/* StateKind.code_fence_start */
|
|
3061
|
+
), this.extra = 0;
|
|
3062
|
+
continue;
|
|
3063
|
+
}
|
|
3064
|
+
if (r === v) {
|
|
3065
|
+
let i = this.cursor + 1;
|
|
3066
|
+
i < t && s.charCodeAt(i) === p && i++, this.block_quote_depth++;
|
|
3067
|
+
const c = this.emit_open(14, this.cursor, o);
|
|
3068
|
+
this.node_stack.push(c), this.states.push(
|
|
3069
|
+
17
|
|
3070
|
+
/* StateKind.block_quote */
|
|
3071
|
+
), this.chomp(i, !0);
|
|
3072
|
+
continue;
|
|
3073
|
+
}
|
|
3074
|
+
if (r === R) {
|
|
3075
|
+
if (!this.finished && s.indexOf(">", this.cursor + 1) === -1)
|
|
3076
|
+
break t;
|
|
3077
|
+
const i = this.try_parse_html_open_tag(this.cursor + 1);
|
|
3078
|
+
if (i) {
|
|
3079
|
+
if (i.self_closing || this.is_void_tag(i.tag)) {
|
|
3080
|
+
const c = this.emit_open(2, this.cursor, o);
|
|
3081
|
+
this.out.attr(c, "tag", i.tag), Object.keys(i.attributes).length > 0 && this.out.attr(c, "attributes", i.attributes), this.out.attr(c, "self_closing", !0), this.emit_close(c, i.end), this.chomp(i.end, !0);
|
|
3082
|
+
} else if (this.is_raw_text_tag(i.tag)) {
|
|
3083
|
+
const c = this.find_raw_close_tag(i.end, i.tag);
|
|
3084
|
+
if (c) {
|
|
3085
|
+
const a = this.emit_open(2, this.cursor, o);
|
|
3086
|
+
this.out.attr(a, "tag", i.tag), Object.keys(i.attributes).length > 0 && this.out.attr(a, "attributes", i.attributes), this.out.set_value_start(a, i.end), this.out.set_value_end(a, c.content_end), this.emit_close(a, c.end), this.chomp(c.end, !0);
|
|
3087
|
+
} else {
|
|
3088
|
+
if (!this.finished)
|
|
3089
|
+
break t;
|
|
3090
|
+
const a = this.emit_open(2, this.cursor, o);
|
|
3091
|
+
this.out.attr(a, "tag", i.tag), Object.keys(i.attributes).length > 0 && this.out.attr(a, "attributes", i.attributes), this.out.set_value_start(a, i.end), this.out.set_value_end(a, t), this.emit_close(a, t), this.chomp(t, !0);
|
|
3092
|
+
}
|
|
3093
|
+
} else {
|
|
3094
|
+
const c = this.emit_open(2, this.cursor, o, 0, !0);
|
|
3095
|
+
this.out.attr(c, "tag", i.tag), Object.keys(i.attributes).length > 0 && this.out.attr(c, "attributes", i.attributes), this.html_tag_stack.push({ id: c, tag: i.tag }), this.node_stack.push(c), this.states.push(
|
|
3096
|
+
26
|
|
3097
|
+
/* StateKind.html_block_element */
|
|
3098
|
+
), this.html_block_depth++, this.chomp(i.end, !0);
|
|
3099
|
+
}
|
|
3100
|
+
continue;
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
if (r === O || r === A || r === C) {
|
|
3104
|
+
if (!this.finished && this.cursor + 2 >= t)
|
|
3105
|
+
break t;
|
|
3106
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
3107
|
+
let i = this.cursor;
|
|
3108
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
3109
|
+
i++;
|
|
3110
|
+
const c = this.emit_open(11, this.cursor, o);
|
|
3111
|
+
this.emit_close(c, i), this.chomp(i, !0);
|
|
3112
|
+
continue;
|
|
3113
|
+
}
|
|
3114
|
+
if (r !== C) {
|
|
3115
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
3116
|
+
if (i) {
|
|
3117
|
+
this.start_list(i, o);
|
|
3118
|
+
continue;
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
if (r === K || r >= 48 && r <= 57) {
|
|
3123
|
+
if (!this.finished) {
|
|
3124
|
+
let c = this.cursor + 1;
|
|
3125
|
+
if (r !== K) {
|
|
3126
|
+
for (; c < t && s.charCodeAt(c) >= 48 && s.charCodeAt(c) <= 57; )
|
|
3127
|
+
c++;
|
|
3128
|
+
if (c >= t)
|
|
3129
|
+
break t;
|
|
3130
|
+
const a = s.charCodeAt(c);
|
|
3131
|
+
(a === M || a === E) && c++;
|
|
3132
|
+
}
|
|
3133
|
+
if (c >= t)
|
|
3134
|
+
break t;
|
|
3135
|
+
}
|
|
3136
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
3137
|
+
if (i) {
|
|
3138
|
+
this.start_list(i, o);
|
|
3139
|
+
continue;
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
if (r === N) {
|
|
3143
|
+
const i = this.try_parse_link_ref_definition(this.cursor);
|
|
3144
|
+
if (i === -2)
|
|
3145
|
+
break t;
|
|
3146
|
+
if (i >= 0) {
|
|
3147
|
+
this.chomp(i, !0);
|
|
3148
|
+
continue;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
if (r === x) {
|
|
3152
|
+
const i = this.try_parse_block_directive(this.cursor);
|
|
3153
|
+
if (i === !1)
|
|
3154
|
+
break t;
|
|
3155
|
+
if (i !== null) {
|
|
3156
|
+
this.start_block_directive(i, o);
|
|
3157
|
+
continue;
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
if (r === q) {
|
|
3161
|
+
const i = this.try_start_table(o);
|
|
3162
|
+
if (i === !1)
|
|
3163
|
+
break t;
|
|
3164
|
+
if (i === !0)
|
|
3165
|
+
continue;
|
|
3166
|
+
}
|
|
3167
|
+
this.states.push(
|
|
3168
|
+
7
|
|
3169
|
+
/* StateKind.paragraph */
|
|
3170
|
+
);
|
|
3171
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
3172
|
+
this.node_stack.push(h);
|
|
3173
|
+
continue;
|
|
3174
|
+
}
|
|
3175
|
+
case 17: {
|
|
3176
|
+
if (!r) {
|
|
3177
|
+
if (!this.finished)
|
|
3178
|
+
break t;
|
|
3179
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.pop(), this.block_quote_depth--;
|
|
3180
|
+
continue;
|
|
3181
|
+
}
|
|
3182
|
+
switch (r) {
|
|
3183
|
+
case d: {
|
|
3184
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor))
|
|
3185
|
+
break t;
|
|
3186
|
+
const h = this.cursor + 1, i = this.skip_bq_markers(h, 1);
|
|
3187
|
+
if (i !== -1) {
|
|
3188
|
+
if (this.is_blank_at_pos(i)) {
|
|
3189
|
+
const c = this.emit_open(6, this.cursor, o);
|
|
3190
|
+
this.emit_close(c, i), this.chomp(i, !0);
|
|
3191
|
+
continue;
|
|
3192
|
+
}
|
|
3193
|
+
this.chomp(i, !0);
|
|
3194
|
+
continue;
|
|
3195
|
+
}
|
|
3196
|
+
this.emit_close(o, this.cursor), this.states.pop(), this.node_stack.pop(), this.block_quote_depth--;
|
|
3197
|
+
continue;
|
|
3198
|
+
}
|
|
3199
|
+
case p:
|
|
3200
|
+
case f: {
|
|
3201
|
+
this.chomp1();
|
|
3202
|
+
continue;
|
|
3203
|
+
}
|
|
3204
|
+
case T: {
|
|
3205
|
+
if (!this.start_heading(o))
|
|
3206
|
+
break t;
|
|
3207
|
+
continue;
|
|
3208
|
+
}
|
|
3209
|
+
case b: {
|
|
3210
|
+
this.states.push(
|
|
3211
|
+
3
|
|
3212
|
+
/* StateKind.code_fence_start */
|
|
3213
|
+
), this.extra = 0;
|
|
3214
|
+
continue;
|
|
3215
|
+
}
|
|
3216
|
+
case O:
|
|
3217
|
+
case A:
|
|
3218
|
+
case C: {
|
|
3219
|
+
if (!this.finished && s.indexOf(`
|
|
3220
|
+
`, this.cursor) === -1)
|
|
3221
|
+
break t;
|
|
3222
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
3223
|
+
let i = this.cursor;
|
|
3224
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
3225
|
+
i++;
|
|
3226
|
+
const c = (i < t, i), a = this.emit_open(11, this.cursor, o);
|
|
3227
|
+
this.emit_close(a, c), this.chomp(c, !0);
|
|
3228
|
+
continue;
|
|
3229
|
+
}
|
|
3230
|
+
if (r !== C) {
|
|
3231
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
3232
|
+
if (i) {
|
|
3233
|
+
this.start_list(i, o);
|
|
3234
|
+
continue;
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
this.states.push(
|
|
3238
|
+
7
|
|
3239
|
+
/* StateKind.paragraph */
|
|
3240
|
+
);
|
|
3241
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
3242
|
+
this.node_stack.push(h);
|
|
3243
|
+
continue;
|
|
3244
|
+
}
|
|
3245
|
+
case v: {
|
|
3246
|
+
let h = this.cursor + 1;
|
|
3247
|
+
h < t && s.charCodeAt(h) === p && h++, this.block_quote_depth++;
|
|
3248
|
+
const i = this.emit_open(14, this.cursor, o);
|
|
3249
|
+
this.node_stack.push(i), this.states.push(
|
|
3250
|
+
17
|
|
3251
|
+
/* StateKind.block_quote */
|
|
3252
|
+
), this.chomp(h, !0);
|
|
3253
|
+
continue;
|
|
3254
|
+
}
|
|
3255
|
+
case q: {
|
|
3256
|
+
const h = this.try_start_table(o);
|
|
3257
|
+
if (h === !1)
|
|
3258
|
+
break t;
|
|
3259
|
+
if (h === !0)
|
|
3260
|
+
continue;
|
|
3261
|
+
this.states.push(
|
|
3262
|
+
7
|
|
3263
|
+
/* StateKind.paragraph */
|
|
3264
|
+
);
|
|
3265
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
3266
|
+
this.node_stack.push(i);
|
|
3267
|
+
continue;
|
|
3268
|
+
}
|
|
3269
|
+
case N: {
|
|
3270
|
+
const h = this.try_parse_link_ref_definition(this.cursor);
|
|
3271
|
+
if (h === -2)
|
|
3272
|
+
break t;
|
|
3273
|
+
if (h >= 0) {
|
|
3274
|
+
this.chomp(h, !0);
|
|
3275
|
+
continue;
|
|
3276
|
+
}
|
|
3277
|
+
this.states.push(
|
|
3278
|
+
7
|
|
3279
|
+
/* StateKind.paragraph */
|
|
3280
|
+
);
|
|
3281
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
3282
|
+
this.node_stack.push(i);
|
|
3283
|
+
continue;
|
|
3284
|
+
}
|
|
3285
|
+
case x: {
|
|
3286
|
+
const h = this.try_parse_block_directive(this.cursor);
|
|
3287
|
+
if (h === !1)
|
|
3288
|
+
break t;
|
|
3289
|
+
if (h !== null) {
|
|
3290
|
+
this.start_block_directive(h, o);
|
|
3291
|
+
continue;
|
|
3292
|
+
}
|
|
3293
|
+
this.states.push(
|
|
3294
|
+
7
|
|
3295
|
+
/* StateKind.paragraph */
|
|
3296
|
+
);
|
|
3297
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
3298
|
+
this.node_stack.push(i);
|
|
3299
|
+
continue;
|
|
3300
|
+
}
|
|
3301
|
+
default: {
|
|
3302
|
+
if (r === K || r >= 48 && r <= 57) {
|
|
3303
|
+
if (!this.finished) {
|
|
3304
|
+
let c = this.cursor + 1;
|
|
3305
|
+
if (r !== K) {
|
|
3306
|
+
for (; c < t && s.charCodeAt(c) >= 48 && s.charCodeAt(c) <= 57; )
|
|
3307
|
+
c++;
|
|
3308
|
+
if (c >= t)
|
|
3309
|
+
break t;
|
|
3310
|
+
const a = s.charCodeAt(c);
|
|
3311
|
+
(a === M || a === E) && c++;
|
|
3312
|
+
}
|
|
3313
|
+
if (c >= t)
|
|
3314
|
+
break t;
|
|
3315
|
+
}
|
|
3316
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
3317
|
+
if (i) {
|
|
3318
|
+
this.start_list(i, o);
|
|
3319
|
+
continue;
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
this.states.push(
|
|
3323
|
+
7
|
|
3324
|
+
/* StateKind.paragraph */
|
|
3325
|
+
);
|
|
3326
|
+
const h = this.emit_open(7, this.cursor, o);
|
|
3327
|
+
this.node_stack.push(h);
|
|
3328
|
+
continue;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
case 18: {
|
|
3333
|
+
if (!r) {
|
|
3334
|
+
if (!this.finished)
|
|
3335
|
+
break t;
|
|
3336
|
+
this.end_list();
|
|
3337
|
+
continue;
|
|
3338
|
+
}
|
|
3339
|
+
switch (r) {
|
|
3340
|
+
case d: {
|
|
3341
|
+
const h = this.cursor + 1;
|
|
3342
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor))
|
|
3343
|
+
break t;
|
|
3344
|
+
let i = h;
|
|
3345
|
+
if (this.block_quote_depth > 0) {
|
|
3346
|
+
const _ = this.skip_bq_markers(h, this.block_quote_depth);
|
|
3347
|
+
if (_ === -1) {
|
|
3348
|
+
this.end_list();
|
|
3349
|
+
continue;
|
|
3350
|
+
}
|
|
3351
|
+
i = _;
|
|
3352
|
+
}
|
|
3353
|
+
const c = this.cursor === 0 || s.charCodeAt(this.cursor - 1) === d;
|
|
3354
|
+
if (i >= t || c || this.is_blank_at_pos(i)) {
|
|
3355
|
+
let _ = i;
|
|
3356
|
+
for (; _ < t && this.is_blank_at_pos(_); ) {
|
|
3357
|
+
for (; _ < t && s.charCodeAt(_) !== d; )
|
|
3358
|
+
_++;
|
|
3359
|
+
if (_ < t && _++, this.block_quote_depth > 0 && _ < t) {
|
|
3360
|
+
if (!this.finished) {
|
|
3361
|
+
let u = _;
|
|
3362
|
+
for (; u < t && s.charCodeAt(u) !== d; )
|
|
3363
|
+
u++;
|
|
3364
|
+
if (u >= t)
|
|
3365
|
+
break t;
|
|
3366
|
+
}
|
|
3367
|
+
const l = this.skip_bq_markers(_, this.block_quote_depth);
|
|
3368
|
+
if (l === -1) {
|
|
3369
|
+
this.end_list();
|
|
3370
|
+
continue t;
|
|
3371
|
+
}
|
|
3372
|
+
_ = l;
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
if (!this.finished) {
|
|
3376
|
+
if (_ >= t)
|
|
3377
|
+
break t;
|
|
3378
|
+
let l = _;
|
|
3379
|
+
for (; l < t && (s.charCodeAt(l) === p || s.charCodeAt(l) === f); )
|
|
3380
|
+
l++;
|
|
3381
|
+
if (l >= t)
|
|
3382
|
+
break t;
|
|
3383
|
+
const u = s.charCodeAt(l);
|
|
3384
|
+
if (u === A || u === O || u === K) {
|
|
3385
|
+
if (u !== K) {
|
|
3386
|
+
let k = l + 1, g = !1;
|
|
3387
|
+
for (; k < t; ) {
|
|
3388
|
+
const y = s.charCodeAt(k);
|
|
3389
|
+
if (y === d) {
|
|
3390
|
+
g = !0;
|
|
3391
|
+
break;
|
|
3392
|
+
}
|
|
3393
|
+
if (y !== u && y !== p && y !== f) {
|
|
3394
|
+
g = !0;
|
|
3395
|
+
break;
|
|
3396
|
+
}
|
|
3397
|
+
k++;
|
|
3398
|
+
}
|
|
3399
|
+
if (!g)
|
|
3400
|
+
break t;
|
|
3401
|
+
} else if (l + 1 >= t)
|
|
3402
|
+
break t;
|
|
3403
|
+
} else if (u >= 48 && u <= 57) {
|
|
3404
|
+
let k = l + 1;
|
|
3405
|
+
for (; k < t && s.charCodeAt(k) >= 48 && s.charCodeAt(k) <= 57; )
|
|
3406
|
+
k++;
|
|
3407
|
+
if (k >= t)
|
|
3408
|
+
break t;
|
|
3409
|
+
const g = s.charCodeAt(k);
|
|
3410
|
+
if ((g === M || g === E) && k++, k >= t)
|
|
3411
|
+
break t;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
if (_ < t) {
|
|
3415
|
+
const l = this.try_parse_list_marker(_);
|
|
3416
|
+
if (l) {
|
|
3417
|
+
if (l.indent >= this.list_content_offset) {
|
|
3418
|
+
this.list_is_loose = !0, this.chomp(_, !0), this.start_list(l, o);
|
|
3419
|
+
continue;
|
|
3420
|
+
}
|
|
3421
|
+
if (l.indent >= this.list_marker_indent && l.ordered === this.list_ordered && l.marker_char === this.list_marker) {
|
|
3422
|
+
this.list_is_loose = !0, this.emit_close(o, this.cursor), this.node_stack.pop();
|
|
3423
|
+
const g = this.emit_open(16, _, this.list_node_id);
|
|
3424
|
+
this.node_stack.push(g), this.list_content_offset = l.content_offset, this.chomp(l.content_start, !0);
|
|
3425
|
+
continue;
|
|
3426
|
+
}
|
|
3427
|
+
this.end_list();
|
|
3428
|
+
continue;
|
|
3429
|
+
}
|
|
3430
|
+
const { columns: u, end: k } = this.count_indent(_);
|
|
3431
|
+
if (u >= this.list_content_offset && k < t && s.charCodeAt(k) !== d) {
|
|
3432
|
+
this.list_is_loose = !0, this.chomp(this.skip_columns(_, this.list_content_offset), !0);
|
|
3433
|
+
continue;
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
this.end_list();
|
|
3437
|
+
continue;
|
|
3438
|
+
}
|
|
3439
|
+
if (this.is_thematic_break_start(i)) {
|
|
3440
|
+
this.end_list();
|
|
3441
|
+
continue;
|
|
3442
|
+
}
|
|
3443
|
+
const a = this.try_parse_list_marker(i);
|
|
3444
|
+
if (a) {
|
|
3445
|
+
if (a.indent >= this.list_content_offset) {
|
|
3446
|
+
this.chomp(i, !0), this.start_list(a, o);
|
|
3447
|
+
continue;
|
|
3448
|
+
}
|
|
3449
|
+
if (a.indent >= this.list_marker_indent && a.ordered === this.list_ordered && a.marker_char === this.list_marker) {
|
|
3450
|
+
this.emit_close(o, this.cursor), this.node_stack.pop();
|
|
3451
|
+
const _ = this.emit_open(16, i, this.list_node_id);
|
|
3452
|
+
this.node_stack.push(_), this.list_content_offset = a.content_offset, this.chomp(a.content_start, !0);
|
|
3453
|
+
continue;
|
|
3454
|
+
}
|
|
3455
|
+
this.end_list();
|
|
3456
|
+
continue;
|
|
3457
|
+
}
|
|
3458
|
+
{
|
|
3459
|
+
const { columns: _, end: l } = this.count_indent(i);
|
|
3460
|
+
if (_ >= this.list_content_offset && l < t && s.charCodeAt(l) !== d) {
|
|
3461
|
+
this.chomp(this.skip_columns(i, this.list_content_offset), !0);
|
|
3462
|
+
continue;
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
if (this.is_heading_start(i) || this.is_thematic_break_start(i) || this.is_block_quote_start(i)) {
|
|
3466
|
+
this.end_list();
|
|
3467
|
+
continue;
|
|
3468
|
+
}
|
|
3469
|
+
this.end_list();
|
|
3470
|
+
continue;
|
|
3471
|
+
}
|
|
3472
|
+
case p:
|
|
3473
|
+
case f: {
|
|
3474
|
+
this.chomp1();
|
|
3475
|
+
continue;
|
|
3476
|
+
}
|
|
3477
|
+
case T: {
|
|
3478
|
+
if (!this.start_heading(o))
|
|
3479
|
+
break t;
|
|
3480
|
+
continue;
|
|
3481
|
+
}
|
|
3482
|
+
case b: {
|
|
3483
|
+
this.states.push(
|
|
3484
|
+
3
|
|
3485
|
+
/* StateKind.code_fence_start */
|
|
3486
|
+
), this.extra = 0;
|
|
3487
|
+
continue;
|
|
3488
|
+
}
|
|
3489
|
+
case O:
|
|
3490
|
+
case A:
|
|
3491
|
+
case C: {
|
|
3492
|
+
if (!this.finished) {
|
|
3493
|
+
let i = !0;
|
|
3494
|
+
for (let c = this.cursor + 1; c < t; c++) {
|
|
3495
|
+
const a = s.charCodeAt(c);
|
|
3496
|
+
if (a === d) {
|
|
3497
|
+
i = !1;
|
|
3498
|
+
break;
|
|
3499
|
+
}
|
|
3500
|
+
if (a !== r && a !== p && a !== f) {
|
|
3501
|
+
i = !1;
|
|
3502
|
+
break;
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
if (i)
|
|
3506
|
+
break t;
|
|
3507
|
+
}
|
|
3508
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
3509
|
+
let i = this.cursor;
|
|
3510
|
+
for (; i < t && s.charCodeAt(i) !== d; )
|
|
3511
|
+
i++;
|
|
3512
|
+
const c = i < t ? i + 1 : i, a = this.emit_open(11, this.cursor, o);
|
|
3513
|
+
this.emit_close(a, c), this.chomp(c, !0);
|
|
3514
|
+
continue;
|
|
3515
|
+
}
|
|
3516
|
+
if (r !== C) {
|
|
3517
|
+
const i = this.try_parse_list_marker(this.cursor);
|
|
3518
|
+
if (i) {
|
|
3519
|
+
if (i.indent >= this.list_content_offset)
|
|
3520
|
+
this.start_list(i, o);
|
|
3521
|
+
else if (i.indent >= this.list_marker_indent && i.ordered === this.list_ordered && i.marker_char === this.list_marker) {
|
|
3522
|
+
this.emit_close(o, this.cursor), this.node_stack.pop();
|
|
3523
|
+
const c = this.emit_open(16, this.cursor, this.list_node_id);
|
|
3524
|
+
this.node_stack.push(c), this.list_content_offset = i.content_offset, this.chomp(i.content_start, !0);
|
|
3525
|
+
} else
|
|
3526
|
+
this.end_list();
|
|
3527
|
+
continue;
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
this.states.push(
|
|
3531
|
+
7
|
|
3532
|
+
/* StateKind.paragraph */
|
|
3533
|
+
);
|
|
3534
|
+
const h = this.emit_open(7, this.cursor, o, 0, !0);
|
|
3535
|
+
this.track_list_pending_para(h), this.node_stack.push(h);
|
|
3536
|
+
continue;
|
|
3537
|
+
}
|
|
3538
|
+
case v: {
|
|
3539
|
+
let h = this.cursor + 1;
|
|
3540
|
+
h < t && s.charCodeAt(h) === p && h++, this.block_quote_depth++;
|
|
3541
|
+
const i = this.emit_open(14, this.cursor, o);
|
|
3542
|
+
this.node_stack.push(i), this.states.push(
|
|
3543
|
+
17
|
|
3544
|
+
/* StateKind.block_quote */
|
|
3545
|
+
), this.chomp(h, !0);
|
|
3546
|
+
continue;
|
|
3547
|
+
}
|
|
3548
|
+
case q: {
|
|
3549
|
+
const h = this.try_start_table(o);
|
|
3550
|
+
if (h === !1)
|
|
3551
|
+
break t;
|
|
3552
|
+
if (h === !0)
|
|
3553
|
+
continue;
|
|
3554
|
+
this.states.push(
|
|
3555
|
+
7
|
|
3556
|
+
/* StateKind.paragraph */
|
|
3557
|
+
);
|
|
3558
|
+
const i = this.emit_open(7, this.cursor, o, 0, !0);
|
|
3559
|
+
this.track_list_pending_para(i), this.node_stack.push(i);
|
|
3560
|
+
continue;
|
|
3561
|
+
}
|
|
3562
|
+
case N: {
|
|
3563
|
+
const h = this.try_parse_link_ref_definition(this.cursor);
|
|
3564
|
+
if (h === -2)
|
|
3565
|
+
break t;
|
|
3566
|
+
if (h >= 0) {
|
|
3567
|
+
this.chomp(h, !0);
|
|
3568
|
+
continue;
|
|
3569
|
+
}
|
|
3570
|
+
this.states.push(
|
|
3571
|
+
7
|
|
3572
|
+
/* StateKind.paragraph */
|
|
3573
|
+
);
|
|
3574
|
+
const i = this.emit_open(7, this.cursor, o, 0, !0);
|
|
3575
|
+
this.track_list_pending_para(i), this.node_stack.push(i);
|
|
3576
|
+
continue;
|
|
3577
|
+
}
|
|
3578
|
+
case x: {
|
|
3579
|
+
const h = this.try_parse_block_directive(this.cursor);
|
|
3580
|
+
if (h === !1)
|
|
3581
|
+
break t;
|
|
3582
|
+
if (h !== null) {
|
|
3583
|
+
this.start_block_directive(h, o);
|
|
3584
|
+
continue;
|
|
3585
|
+
}
|
|
3586
|
+
this.states.push(
|
|
3587
|
+
7
|
|
3588
|
+
/* StateKind.paragraph */
|
|
3589
|
+
);
|
|
3590
|
+
const i = this.emit_open(7, this.cursor, o, 0, !0);
|
|
3591
|
+
this.track_list_pending_para(i), this.node_stack.push(i);
|
|
3592
|
+
continue;
|
|
3593
|
+
}
|
|
3594
|
+
default: {
|
|
3595
|
+
if (!this.finished && (r === K || r >= 48 && r <= 57)) {
|
|
3596
|
+
let c = this.cursor + 1;
|
|
3597
|
+
if (r !== K) {
|
|
3598
|
+
for (; c < t && s.charCodeAt(c) >= 48 && s.charCodeAt(c) <= 57; )
|
|
3599
|
+
c++;
|
|
3600
|
+
if (c >= t)
|
|
3601
|
+
break t;
|
|
3602
|
+
const a = s.charCodeAt(c);
|
|
3603
|
+
(a === M || a === E) && c++;
|
|
3604
|
+
}
|
|
3605
|
+
if (c >= t)
|
|
3606
|
+
break t;
|
|
3607
|
+
}
|
|
3608
|
+
const h = this.try_parse_list_marker(this.cursor);
|
|
3609
|
+
if (h) {
|
|
3610
|
+
if (h.indent >= this.list_content_offset)
|
|
3611
|
+
this.start_list(h, o);
|
|
3612
|
+
else if (h.indent >= this.list_marker_indent && h.ordered === this.list_ordered && h.marker_char === this.list_marker) {
|
|
3613
|
+
this.emit_close(o, this.cursor), this.node_stack.pop();
|
|
3614
|
+
const c = this.emit_open(16, this.cursor, this.list_node_id);
|
|
3615
|
+
this.node_stack.push(c), this.list_content_offset = h.content_offset, this.chomp(h.content_start, !0);
|
|
3616
|
+
} else
|
|
3617
|
+
this.end_list();
|
|
3618
|
+
continue;
|
|
3619
|
+
}
|
|
3620
|
+
this.states.push(
|
|
3621
|
+
7
|
|
3622
|
+
/* StateKind.paragraph */
|
|
3623
|
+
);
|
|
3624
|
+
const i = this.emit_open(7, this.cursor, o, 0, !0);
|
|
3625
|
+
this.track_list_pending_para(i), this.node_stack.push(i);
|
|
3626
|
+
continue;
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
case 28: {
|
|
3631
|
+
if (!r) {
|
|
3632
|
+
if (!this.finished)
|
|
3633
|
+
break t;
|
|
3634
|
+
this.emit_close(o, this.cursor), this.node_stack.pop(), this.states.pop(), this.directive_colon_counts.pop();
|
|
3635
|
+
continue;
|
|
3636
|
+
}
|
|
3637
|
+
const h = this.directive_colon_counts[this.directive_colon_counts.length - 1];
|
|
3638
|
+
switch (r) {
|
|
3639
|
+
case d: {
|
|
3640
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor))
|
|
3641
|
+
break t;
|
|
3642
|
+
const i = this.emit_open(6, this.cursor, o);
|
|
3643
|
+
this.emit_close(i, this.cursor + 1), this.chomp1();
|
|
3644
|
+
continue;
|
|
3645
|
+
}
|
|
3646
|
+
case p:
|
|
3647
|
+
case f: {
|
|
3648
|
+
let i = this.cursor;
|
|
3649
|
+
for (; i < t && (s.charCodeAt(i) === p || s.charCodeAt(i) === f); )
|
|
3650
|
+
i++;
|
|
3651
|
+
if (i >= t && !this.finished)
|
|
3652
|
+
break t;
|
|
3653
|
+
if (i < t && s.charCodeAt(i) === d) {
|
|
3654
|
+
const c = this.emit_open(6, this.cursor, o);
|
|
3655
|
+
this.emit_close(c, i + 1), this.chomp(i + 1, !0);
|
|
3656
|
+
continue;
|
|
3657
|
+
}
|
|
3658
|
+
this.chomp1();
|
|
3659
|
+
continue;
|
|
3660
|
+
}
|
|
3661
|
+
case x: {
|
|
3662
|
+
const i = this.try_parse_directive_close(this.cursor, h);
|
|
3663
|
+
if (i === -2)
|
|
3664
|
+
break t;
|
|
3665
|
+
if (i >= 0) {
|
|
3666
|
+
this.emit_close(o, i), this.node_stack.pop(), this.states.pop(), this.directive_colon_counts.pop(), this.chomp(i, !0);
|
|
3667
|
+
continue;
|
|
3668
|
+
}
|
|
3669
|
+
const c = this.try_parse_block_directive(this.cursor);
|
|
3670
|
+
if (c === !1)
|
|
3671
|
+
break t;
|
|
3672
|
+
if (c !== null) {
|
|
3673
|
+
this.start_block_directive(c, o);
|
|
3674
|
+
continue;
|
|
3675
|
+
}
|
|
3676
|
+
this.states.push(
|
|
3677
|
+
7
|
|
3678
|
+
/* StateKind.paragraph */
|
|
3679
|
+
);
|
|
3680
|
+
const a = this.emit_open(7, this.cursor, o);
|
|
3681
|
+
this.node_stack.push(a);
|
|
3682
|
+
continue;
|
|
3683
|
+
}
|
|
3684
|
+
case T: {
|
|
3685
|
+
if (!this.start_heading(o))
|
|
3686
|
+
break t;
|
|
3687
|
+
continue;
|
|
3688
|
+
}
|
|
3689
|
+
case b: {
|
|
3690
|
+
this.states.push(
|
|
3691
|
+
3
|
|
3692
|
+
/* StateKind.code_fence_start */
|
|
3693
|
+
), this.extra = 0;
|
|
3694
|
+
continue;
|
|
3695
|
+
}
|
|
3696
|
+
case O:
|
|
3697
|
+
case A:
|
|
3698
|
+
case C: {
|
|
3699
|
+
if (!this.finished && this.cursor + 2 >= t)
|
|
3700
|
+
break t;
|
|
3701
|
+
if (this.is_thematic_break_start(this.cursor)) {
|
|
3702
|
+
let c = this.cursor;
|
|
3703
|
+
for (; c < t && s.charCodeAt(c) !== d; )
|
|
3704
|
+
c++;
|
|
3705
|
+
const a = this.emit_open(11, this.cursor, o);
|
|
3706
|
+
this.emit_close(a, c), this.chomp(c, !0);
|
|
3707
|
+
continue;
|
|
3708
|
+
}
|
|
3709
|
+
this.states.push(
|
|
3710
|
+
7
|
|
3711
|
+
/* StateKind.paragraph */
|
|
3712
|
+
);
|
|
3713
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
3714
|
+
this.node_stack.push(i);
|
|
3715
|
+
continue;
|
|
3716
|
+
}
|
|
3717
|
+
case v: {
|
|
3718
|
+
let i = this.cursor + 1;
|
|
3719
|
+
i < t && s.charCodeAt(i) === p && i++, this.block_quote_depth++;
|
|
3720
|
+
const c = this.emit_open(14, this.cursor, o);
|
|
3721
|
+
this.node_stack.push(c), this.states.push(
|
|
3722
|
+
17
|
|
3723
|
+
/* StateKind.block_quote */
|
|
3724
|
+
), this.chomp(i, !0);
|
|
3725
|
+
continue;
|
|
3726
|
+
}
|
|
3727
|
+
case q: {
|
|
3728
|
+
const i = this.try_start_table(o);
|
|
3729
|
+
if (i === !1)
|
|
3730
|
+
break t;
|
|
3731
|
+
if (i === !0)
|
|
3732
|
+
continue;
|
|
3733
|
+
this.states.push(
|
|
3734
|
+
7
|
|
3735
|
+
/* StateKind.paragraph */
|
|
3736
|
+
);
|
|
3737
|
+
const c = this.emit_open(7, this.cursor, o);
|
|
3738
|
+
this.node_stack.push(c);
|
|
3739
|
+
continue;
|
|
3740
|
+
}
|
|
3741
|
+
case N: {
|
|
3742
|
+
const i = this.try_parse_link_ref_definition(this.cursor);
|
|
3743
|
+
if (i === -2)
|
|
3744
|
+
break t;
|
|
3745
|
+
if (i >= 0) {
|
|
3746
|
+
this.chomp(i, !0);
|
|
3747
|
+
continue;
|
|
3748
|
+
}
|
|
3749
|
+
this.states.push(
|
|
3750
|
+
7
|
|
3751
|
+
/* StateKind.paragraph */
|
|
3752
|
+
);
|
|
3753
|
+
const c = this.emit_open(7, this.cursor, o);
|
|
3754
|
+
this.node_stack.push(c);
|
|
3755
|
+
continue;
|
|
3756
|
+
}
|
|
3757
|
+
default: {
|
|
3758
|
+
this.states.push(
|
|
3759
|
+
7
|
|
3760
|
+
/* StateKind.paragraph */
|
|
3761
|
+
);
|
|
3762
|
+
const i = this.emit_open(7, this.cursor, o);
|
|
3763
|
+
this.node_stack.push(i);
|
|
3764
|
+
continue;
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
case 8: {
|
|
3769
|
+
if (this.in_table && (r === q || r === d || !r)) {
|
|
3770
|
+
this.states.pop();
|
|
3771
|
+
continue;
|
|
3772
|
+
}
|
|
3773
|
+
if (this.in_heading && (r === d || !r)) {
|
|
3774
|
+
this.states.pop();
|
|
3775
|
+
continue;
|
|
3776
|
+
}
|
|
3777
|
+
switch (r) {
|
|
3778
|
+
case b: {
|
|
3779
|
+
this.states.push(
|
|
3780
|
+
9
|
|
3781
|
+
/* StateKind.code_span_start */
|
|
3782
|
+
), this.extra = 0;
|
|
3783
|
+
continue;
|
|
3784
|
+
}
|
|
3785
|
+
case d: {
|
|
3786
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor))
|
|
3787
|
+
break t;
|
|
3788
|
+
if (this.block_quote_depth > 0) {
|
|
3789
|
+
this.states.pop();
|
|
3790
|
+
continue;
|
|
3791
|
+
}
|
|
3792
|
+
if (this.is_block_interrupt(this.cursor + 1)) {
|
|
3793
|
+
this.states.pop();
|
|
3794
|
+
continue;
|
|
3795
|
+
} else if (this.list_depth > 0) {
|
|
3796
|
+
const h = this.cursor + 1, { columns: i } = this.count_indent(h);
|
|
3797
|
+
if (i >= this.list_content_offset) {
|
|
3798
|
+
const a = this.skip_columns(h, this.list_content_offset);
|
|
3799
|
+
if (a < t && this.try_parse_list_marker(a) !== null) {
|
|
3800
|
+
this.states.pop();
|
|
3801
|
+
continue;
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
const c = this.emit_open(18, this.cursor, o);
|
|
3805
|
+
this.emit_close(c, this.cursor + 1), this.chomp1();
|
|
3806
|
+
continue;
|
|
3807
|
+
} else {
|
|
3808
|
+
const h = this.emit_open(18, this.cursor, o);
|
|
3809
|
+
for (this.emit_close(h, this.cursor + 1), this.chomp1(); this.cursor < t && s.charCodeAt(this.cursor) === p; )
|
|
3810
|
+
this.chomp1();
|
|
3811
|
+
continue;
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
case O: {
|
|
3815
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
3816
|
+
break t;
|
|
3817
|
+
if (this.prev & 3 && this.next_class & 6) {
|
|
3818
|
+
const h = this.emit_open(10, this.cursor, o, 0, !0);
|
|
3819
|
+
this.out.set_value_start(h, this.cursor + 1), this.node_stack.push(h), this.emphasis_has_content = !1, this.states.push(
|
|
3820
|
+
14
|
|
3821
|
+
/* StateKind.strong_emphasis */
|
|
3822
|
+
);
|
|
3823
|
+
} else {
|
|
3824
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3825
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
3826
|
+
1
|
|
3827
|
+
/* StateKind.text */
|
|
3828
|
+
);
|
|
3829
|
+
}
|
|
3830
|
+
this.chomp1();
|
|
3831
|
+
continue;
|
|
3832
|
+
}
|
|
3833
|
+
case C: {
|
|
3834
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
3835
|
+
break t;
|
|
3836
|
+
if (this.prev & 3 && this.next_class & 6) {
|
|
3837
|
+
const h = this.emit_open(9, this.cursor, o, 0, !0);
|
|
3838
|
+
this.out.set_value_start(h, this.cursor + 1), this.node_stack.push(h), this.emphasis_has_content = !1, this.states.push(
|
|
3839
|
+
15
|
|
3840
|
+
/* StateKind.emphasis */
|
|
3841
|
+
);
|
|
3842
|
+
} else {
|
|
3843
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3844
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
3845
|
+
1
|
|
3846
|
+
/* StateKind.text */
|
|
3847
|
+
);
|
|
3848
|
+
}
|
|
3849
|
+
this.chomp1();
|
|
3850
|
+
continue;
|
|
3851
|
+
}
|
|
3852
|
+
case B: {
|
|
3853
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
3854
|
+
break t;
|
|
3855
|
+
if (s.charCodeAt(this.cursor + 1) === B && this.prev & 3 && w(s.charCodeAt(this.cursor + 2)) & 6) {
|
|
3856
|
+
const h = this.emit_open(19, this.cursor, o, 0, !0);
|
|
3857
|
+
this.out.set_value_start(h, this.cursor + 2), this.node_stack.push(h), this.states.push(
|
|
3858
|
+
19
|
|
3859
|
+
/* StateKind.strikethrough */
|
|
3860
|
+
), this.chomp(2);
|
|
3861
|
+
} else if (
|
|
3862
|
+
// subscript: single ~ with next char word/punctuation
|
|
3863
|
+
s.charCodeAt(this.cursor + 1) !== B && this.next_class & 6
|
|
3864
|
+
) {
|
|
3865
|
+
const h = this.emit_open(21, this.cursor, o, 0, !0);
|
|
3866
|
+
this.out.set_value_start(h, this.cursor + 1), this.node_stack.push(h), this.states.push(
|
|
3867
|
+
21
|
|
3868
|
+
/* StateKind.subscript */
|
|
3869
|
+
), this.chomp1();
|
|
3870
|
+
} else {
|
|
3871
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3872
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
3873
|
+
1
|
|
3874
|
+
/* StateKind.text */
|
|
3875
|
+
), this.chomp1();
|
|
3876
|
+
}
|
|
3877
|
+
continue;
|
|
3878
|
+
}
|
|
3879
|
+
case Y: {
|
|
3880
|
+
if (this.next_class & 6) {
|
|
3881
|
+
const h = this.emit_open(20, this.cursor, o, 0, !0);
|
|
3882
|
+
this.out.set_value_start(h, this.cursor + 1), this.node_stack.push(h), this.states.push(
|
|
3883
|
+
20
|
|
3884
|
+
/* StateKind.superscript */
|
|
3885
|
+
);
|
|
3886
|
+
} else {
|
|
3887
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3888
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
3889
|
+
1
|
|
3890
|
+
/* StateKind.text */
|
|
3891
|
+
);
|
|
3892
|
+
}
|
|
3893
|
+
this.chomp1();
|
|
3894
|
+
continue;
|
|
3895
|
+
}
|
|
3896
|
+
case I: {
|
|
3897
|
+
if (this.states.length >= 2 && this.states[this.states.length - 2] === 22) {
|
|
3898
|
+
const i = this.directive_text_ids.length - 1;
|
|
3899
|
+
if (i >= 0 && this.directive_text_ids[i] === o && this.directive_text_brackets[i] > 0)
|
|
3900
|
+
this.directive_text_brackets[i]--;
|
|
3901
|
+
else {
|
|
3902
|
+
this.states.pop();
|
|
3903
|
+
continue;
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3907
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
3908
|
+
1
|
|
3909
|
+
/* StateKind.text */
|
|
3910
|
+
), this.chomp1();
|
|
3911
|
+
continue;
|
|
3912
|
+
}
|
|
3913
|
+
case S: {
|
|
3914
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
3915
|
+
break t;
|
|
3916
|
+
const h = s.charCodeAt(this.cursor + 1);
|
|
3917
|
+
if (h === d) {
|
|
3918
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor + 1))
|
|
3919
|
+
break t;
|
|
3920
|
+
if (this.block_quote_depth > 0 && this.skip_bq_markers(this.cursor + 2, this.block_quote_depth) === -1) {
|
|
3921
|
+
const a = this.emit_open(17, this.cursor, o);
|
|
3922
|
+
this.emit_close(a, this.cursor + 2), this.chomp1(), this.states.pop();
|
|
3923
|
+
continue;
|
|
3924
|
+
}
|
|
3925
|
+
const i = this.emit_open(17, this.cursor, o);
|
|
3926
|
+
if (this.emit_close(i, this.cursor + 2), this.chomp(2), this.block_quote_depth > 0) {
|
|
3927
|
+
const c = this.skip_bq_markers(this.cursor, this.block_quote_depth);
|
|
3928
|
+
c !== -1 && this.chomp(c, !0);
|
|
3929
|
+
}
|
|
3930
|
+
for (; this.cursor < t && s.charCodeAt(this.cursor) === p; )
|
|
3931
|
+
this.chomp1();
|
|
3932
|
+
continue;
|
|
3933
|
+
}
|
|
3934
|
+
if (this.is_ascii_punctuation(h)) {
|
|
3935
|
+
const i = this.emit_open(1, this.cursor + 1, o);
|
|
3936
|
+
this.out.set_value_start(i, this.cursor + 1), this.node_stack.push(i), this.states.push(
|
|
3937
|
+
1
|
|
3938
|
+
/* StateKind.text */
|
|
3939
|
+
), this.chomp(2);
|
|
3940
|
+
} else {
|
|
3941
|
+
const i = this.emit_open(1, this.cursor, o);
|
|
3942
|
+
this.out.set_value_start(i, this.cursor), this.node_stack.push(i), this.states.push(
|
|
3943
|
+
1
|
|
3944
|
+
/* StateKind.text */
|
|
3945
|
+
), this.chomp1();
|
|
3946
|
+
}
|
|
3947
|
+
continue;
|
|
3948
|
+
}
|
|
3949
|
+
case N: {
|
|
3950
|
+
if (this.directive_text_ids.length > 0) {
|
|
3951
|
+
const i = this.directive_text_ids.length - 1;
|
|
3952
|
+
this.directive_text_ids[i] === o && this.directive_text_brackets[i]++;
|
|
3953
|
+
const c = this.emit_open(1, this.cursor, o);
|
|
3954
|
+
this.out.set_value_start(c, this.cursor), this.node_stack.push(c), this.states.push(
|
|
3955
|
+
1
|
|
3956
|
+
/* StateKind.text */
|
|
3957
|
+
), this.chomp1();
|
|
3958
|
+
continue;
|
|
3959
|
+
}
|
|
3960
|
+
const h = this.emit_open(12, this.cursor, o, 0, !0);
|
|
3961
|
+
this.node_stack.push(h), this.states.push(
|
|
3962
|
+
22
|
|
3963
|
+
/* StateKind.link_text */
|
|
3964
|
+
), this.link_text_start = this.cursor + 1, this.chomp1();
|
|
3965
|
+
continue;
|
|
3966
|
+
}
|
|
3967
|
+
case F: {
|
|
3968
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
3969
|
+
break t;
|
|
3970
|
+
if (s.charCodeAt(this.cursor + 1) === N && this.directive_text_ids.length === 0) {
|
|
3971
|
+
const i = this.emit_open(13, this.cursor, o, 0, !0);
|
|
3972
|
+
this.node_stack.push(i), this.states.push(
|
|
3973
|
+
22
|
|
3974
|
+
/* StateKind.link_text */
|
|
3975
|
+
), this.link_text_start = this.cursor + 2, this.chomp(2);
|
|
3976
|
+
continue;
|
|
3977
|
+
}
|
|
3978
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
3979
|
+
this.node_stack.push(h), this.out.set_value_start(h, this.cursor), this.states.push(
|
|
3980
|
+
1
|
|
3981
|
+
/* StateKind.text */
|
|
3982
|
+
), this.chomp1();
|
|
3983
|
+
continue;
|
|
3984
|
+
}
|
|
3985
|
+
case R: {
|
|
3986
|
+
if (!this.finished && s.indexOf(">", this.cursor + 1) === -1)
|
|
3987
|
+
break t;
|
|
3988
|
+
const h = this.directive_text_ids.length > 0 ? -1 : this.try_parse_uri_autolink(this.cursor + 1);
|
|
3989
|
+
if (h !== -1) {
|
|
3990
|
+
const l = s.slice(this.cursor + 1, h - 1), u = this.emit_open(12, this.cursor, o);
|
|
3991
|
+
this.out.set_value_start(u, this.cursor + 1), this.out.set_value_end(u, h - 1), this.emit_close(u, h), this.out.attr(u, "href", l);
|
|
3992
|
+
const k = this.emit_open(1, this.cursor + 1, u);
|
|
3993
|
+
this.out.set_value_start(k, this.cursor + 1), this.out.set_value_end(k, h - 1), this.emit_close(k, h - 1), this.chomp(h, !0), this.states.pop();
|
|
3994
|
+
continue;
|
|
3995
|
+
}
|
|
3996
|
+
const i = this.try_parse_html_comment(this.cursor + 1);
|
|
3997
|
+
if (i === !1)
|
|
3998
|
+
break t;
|
|
3999
|
+
if (i) {
|
|
4000
|
+
const l = this.emit_open(26, this.cursor, o);
|
|
4001
|
+
this.out.text(l, i.content_start, i.content_end), this.emit_close(l, i.end), this.chomp(i.end, !0), this.states.pop();
|
|
4002
|
+
continue;
|
|
4003
|
+
}
|
|
4004
|
+
const c = this.try_parse_html_close_tag(this.cursor + 1);
|
|
4005
|
+
if (c) {
|
|
4006
|
+
const l = this.find_html_opener(c.tag);
|
|
4007
|
+
if (l !== -1) {
|
|
4008
|
+
for (; this.html_tag_stack.length > l + 1; ) {
|
|
4009
|
+
const k = this.html_tag_stack.pop();
|
|
4010
|
+
this.close_html_inline(k.id, this.cursor);
|
|
4011
|
+
}
|
|
4012
|
+
const u = this.html_tag_stack.pop();
|
|
4013
|
+
this.close_html_inline(u.id, c.end), this.chomp(c.end, !0);
|
|
4014
|
+
continue;
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
const a = this.try_parse_html_open_tag(this.cursor + 1);
|
|
4018
|
+
if (a) {
|
|
4019
|
+
if (a.self_closing || this.is_void_tag(a.tag)) {
|
|
4020
|
+
const l = this.emit_open(2, this.cursor, o);
|
|
4021
|
+
this.out.attr(l, "tag", a.tag), Object.keys(a.attributes).length > 0 && this.out.attr(l, "attributes", a.attributes), this.out.attr(l, "self_closing", !0), this.emit_close(l, a.end), this.chomp(a.end, !0), this.states.pop();
|
|
4022
|
+
} else if (this.is_raw_text_tag(a.tag)) {
|
|
4023
|
+
const l = this.find_raw_close_tag(a.end, a.tag);
|
|
4024
|
+
if (l) {
|
|
4025
|
+
const u = this.emit_open(2, this.cursor, o);
|
|
4026
|
+
this.out.attr(u, "tag", a.tag), Object.keys(a.attributes).length > 0 && this.out.attr(u, "attributes", a.attributes), this.out.set_value_start(u, a.end), this.out.set_value_end(u, l.content_end), this.emit_close(u, l.end), this.chomp(l.end, !0);
|
|
4027
|
+
} else {
|
|
4028
|
+
if (!this.finished)
|
|
4029
|
+
break t;
|
|
4030
|
+
const u = this.emit_open(2, this.cursor, o);
|
|
4031
|
+
this.out.attr(u, "tag", a.tag), Object.keys(a.attributes).length > 0 && this.out.attr(u, "attributes", a.attributes), this.out.set_value_start(u, a.end), this.out.set_value_end(u, t), this.emit_close(u, t), this.chomp(t, !0);
|
|
4032
|
+
}
|
|
4033
|
+
this.states.pop();
|
|
4034
|
+
} else {
|
|
4035
|
+
const l = this.emit_open(2, this.cursor, o, 0, !0);
|
|
4036
|
+
this.out.attr(l, "tag", a.tag), Object.keys(a.attributes).length > 0 && this.out.attr(l, "attributes", a.attributes), this.html_tag_stack.push({ id: l, tag: a.tag }), this.node_stack.push(l), this.states.push(
|
|
4037
|
+
25
|
|
4038
|
+
/* StateKind.html_element */
|
|
4039
|
+
), this.chomp(a.end, !0);
|
|
4040
|
+
}
|
|
4041
|
+
continue;
|
|
4042
|
+
}
|
|
4043
|
+
const _ = this.emit_open(1, this.cursor, o);
|
|
4044
|
+
this.node_stack.push(_), this.out.set_value_start(_, this.cursor), this.states.push(
|
|
4045
|
+
1
|
|
4046
|
+
/* StateKind.text */
|
|
4047
|
+
), this.chomp1();
|
|
4048
|
+
continue;
|
|
4049
|
+
}
|
|
4050
|
+
case j: {
|
|
4051
|
+
if (!this.finished && this.find_matching_brace(this.cursor + 1) === -1)
|
|
4052
|
+
break t;
|
|
4053
|
+
const h = this.find_matching_brace(this.cursor + 1);
|
|
4054
|
+
if (h !== -1) {
|
|
4055
|
+
if (s.charCodeAt(this.cursor + 1) === Tt) {
|
|
4056
|
+
let a = this.cursor + 2;
|
|
4057
|
+
for (; a < h - 1 && s.charCodeAt(a) !== p && s.charCodeAt(a) !== f && s.charCodeAt(a) !== d && s.charCodeAt(a) !== D; )
|
|
4058
|
+
a++;
|
|
4059
|
+
const _ = s.slice(this.cursor + 2, a);
|
|
4060
|
+
if (_.length > 0) {
|
|
4061
|
+
const l = this.emit_open(27, this.cursor, o);
|
|
4062
|
+
for (this.out.attr(l, "tag", _); a < h - 1 && (s.charCodeAt(a) === p || s.charCodeAt(a) === f); )
|
|
4063
|
+
a++;
|
|
4064
|
+
a < h - 1 && (this.out.set_value_start(l, a), this.out.set_value_end(l, h - 1)), this.emit_close(l, h), this.chomp(h, !0);
|
|
4065
|
+
continue;
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
const c = this.emit_open(4, this.cursor, o);
|
|
4069
|
+
this.out.set_value_start(c, this.cursor + 1), this.out.set_value_end(c, h - 1), this.emit_close(c, h), this.chomp(h, !0);
|
|
4070
|
+
continue;
|
|
4071
|
+
}
|
|
4072
|
+
const i = this.emit_open(1, this.cursor, o);
|
|
4073
|
+
this.out.set_value_start(i, this.cursor), this.node_stack.push(i), this.states.push(
|
|
4074
|
+
1
|
|
4075
|
+
/* StateKind.text */
|
|
4076
|
+
), this.chomp1();
|
|
4077
|
+
continue;
|
|
4078
|
+
}
|
|
4079
|
+
case x: {
|
|
4080
|
+
if (!this.finished && this.cursor + 2 >= t)
|
|
4081
|
+
break t;
|
|
4082
|
+
const h = this.cursor + 1, i = h < t ? s.charCodeAt(h) : 0;
|
|
4083
|
+
if (i >= 97 && i <= 122 || i >= 65 && i <= 90) {
|
|
4084
|
+
let a = h;
|
|
4085
|
+
for (; a < t && this.is_directive_name_char(s.charCodeAt(a)); )
|
|
4086
|
+
a++;
|
|
4087
|
+
if (a >= t && !this.finished)
|
|
4088
|
+
break t;
|
|
4089
|
+
if (a < t && s.charCodeAt(a) === N) {
|
|
4090
|
+
const _ = s.slice(h, a), l = this.emit_open(30, this.cursor, o, 0, !0);
|
|
4091
|
+
this.out.attr(l, "name", _), this.node_stack.push(l), this.states.push(
|
|
4092
|
+
22
|
|
4093
|
+
/* StateKind.link_text */
|
|
4094
|
+
), this.directive_text_ids.push(l), this.directive_text_brackets.push(0), this.link_text_start = a + 1, this.chomp(a + 1, !0);
|
|
4095
|
+
continue;
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
const c = this.emit_open(1, this.cursor, o);
|
|
4099
|
+
this.out.set_value_start(c, this.cursor), this.node_stack.push(c), this.states.push(
|
|
4100
|
+
1
|
|
4101
|
+
/* StateKind.text */
|
|
4102
|
+
), this.chomp1();
|
|
4103
|
+
continue;
|
|
4104
|
+
}
|
|
4105
|
+
case q:
|
|
4106
|
+
if (!this.in_table) {
|
|
4107
|
+
this.chomp1();
|
|
4108
|
+
continue;
|
|
4109
|
+
}
|
|
4110
|
+
// falls through
|
|
4111
|
+
default: {
|
|
4112
|
+
if (!r) {
|
|
4113
|
+
this.states.pop();
|
|
4114
|
+
continue;
|
|
4115
|
+
}
|
|
4116
|
+
const h = this.emit_open(1, this.cursor, o);
|
|
4117
|
+
this.out.set_value_start(h, this.cursor), this.node_stack.push(h), this.states.push(
|
|
4118
|
+
1
|
|
4119
|
+
/* StateKind.text */
|
|
4120
|
+
), this.chomp1();
|
|
4121
|
+
continue;
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4125
|
+
case 1: {
|
|
4126
|
+
if (this.in_table && (r === q || r === d || !r)) {
|
|
4127
|
+
this.unwind_inline_for_table();
|
|
4128
|
+
continue;
|
|
4129
|
+
}
|
|
4130
|
+
if (this.in_heading && (r === d || !r)) {
|
|
4131
|
+
let h = this.cursor;
|
|
4132
|
+
for (; h > 0 && (s.charCodeAt(h - 1) === p || s.charCodeAt(h - 1) === f); )
|
|
4133
|
+
h--;
|
|
4134
|
+
this.states.pop(), this.emit_close(o, h), this.out.set_value_end(o, h), this.node_stack.pop();
|
|
4135
|
+
continue;
|
|
4136
|
+
}
|
|
4137
|
+
if (r === q && !this.in_table) {
|
|
4138
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4139
|
+
continue;
|
|
4140
|
+
}
|
|
4141
|
+
if (r === S) {
|
|
4142
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
4143
|
+
break t;
|
|
4144
|
+
const h = s.charCodeAt(this.cursor + 1);
|
|
4145
|
+
if (h === d) {
|
|
4146
|
+
if (!this.finished && !this.can_decide_after_lf(this.cursor + 1))
|
|
4147
|
+
break t;
|
|
4148
|
+
if (this.block_quote_depth > 0 && this.skip_bq_markers(this.cursor + 2, this.block_quote_depth) === -1) {
|
|
4149
|
+
this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop(), this.states.pop();
|
|
4150
|
+
const _ = this.node_stack[this.node_stack.length - 1], l = this.emit_open(17, this.cursor, _);
|
|
4151
|
+
this.emit_close(l, this.cursor + 2), this.chomp1(), this.states[this.states.length - 1] === 8 && this.states.pop();
|
|
4152
|
+
continue;
|
|
4153
|
+
}
|
|
4154
|
+
this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop(), this.states.pop();
|
|
4155
|
+
const i = this.node_stack[this.node_stack.length - 1], c = this.emit_open(17, this.cursor, i);
|
|
4156
|
+
if (this.emit_close(c, this.cursor + 2), this.chomp(2), this.block_quote_depth > 0) {
|
|
4157
|
+
const a = this.skip_bq_markers(this.cursor, this.block_quote_depth);
|
|
4158
|
+
a !== -1 && this.chomp(a, !0);
|
|
4159
|
+
}
|
|
4160
|
+
for (; this.cursor < t && s.charCodeAt(this.cursor) === p; )
|
|
4161
|
+
this.chomp1();
|
|
4162
|
+
continue;
|
|
4163
|
+
}
|
|
4164
|
+
if (this.is_ascii_punctuation(h)) {
|
|
4165
|
+
this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4166
|
+
const i = this.node_stack[this.node_stack.length - 1], c = this.emit_open(1, this.cursor + 1, i);
|
|
4167
|
+
this.out.set_value_start(c, this.cursor + 1), this.node_stack.push(c), this.chomp(2);
|
|
4168
|
+
continue;
|
|
4169
|
+
}
|
|
4170
|
+
}
|
|
4171
|
+
if (r === d && !this.finished && !this.can_decide_after_lf(this.cursor) || !r && !this.finished)
|
|
4172
|
+
break t;
|
|
4173
|
+
if (r === d && this.block_quote_depth > 0) {
|
|
4174
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4175
|
+
continue;
|
|
4176
|
+
}
|
|
4177
|
+
if (!r || r === d && this.is_block_interrupt(this.cursor + 1)) {
|
|
4178
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4179
|
+
continue;
|
|
4180
|
+
} else if (r === d && this.list_depth > 0) {
|
|
4181
|
+
const h = this.cursor + 1, { columns: i } = this.count_indent(h);
|
|
4182
|
+
if (i >= this.list_content_offset) {
|
|
4183
|
+
const c = this.skip_columns(h, this.list_content_offset);
|
|
4184
|
+
if (c < t && this.try_parse_list_marker(c) !== null) {
|
|
4185
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4186
|
+
continue;
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4190
|
+
continue;
|
|
4191
|
+
} else if (r === d) {
|
|
4192
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop();
|
|
4193
|
+
continue;
|
|
4194
|
+
} else if (r === x) {
|
|
4195
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
4196
|
+
break t;
|
|
4197
|
+
const h = s.charCodeAt(this.cursor + 1);
|
|
4198
|
+
if (h >= 97 && h <= 122 || h >= 65 && h <= 90) {
|
|
4199
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop(), this.states.pop();
|
|
4200
|
+
continue;
|
|
4201
|
+
}
|
|
4202
|
+
this.chomp1();
|
|
4203
|
+
continue;
|
|
4204
|
+
} else if (r === O || r === C || r === B || r === Y || r === R || r === N || r === I || r === F || r === b || r === j) {
|
|
4205
|
+
this.states.pop(), this.emit_close(o, this.cursor), this.out.set_value_end(o, this.cursor), this.node_stack.pop(), this.states.pop();
|
|
4206
|
+
continue;
|
|
4207
|
+
}
|
|
4208
|
+
{
|
|
4209
|
+
let h = this.cursor + 1;
|
|
4210
|
+
for (; h < t; ) {
|
|
4211
|
+
const i = s.charCodeAt(h);
|
|
4212
|
+
if (z[i])
|
|
4213
|
+
break;
|
|
4214
|
+
h++;
|
|
4215
|
+
}
|
|
4216
|
+
this.cursor = h, this.prev = w(s.charCodeAt(h - 1)), this.current = w(s.charCodeAt(h)), this.next_class = w(s.charCodeAt(h + 1));
|
|
4217
|
+
}
|
|
4218
|
+
continue;
|
|
4219
|
+
}
|
|
4220
|
+
case 9: {
|
|
4221
|
+
if (this.extra > 2) {
|
|
4222
|
+
this.states.pop(), this.states.push(
|
|
4223
|
+
1
|
|
4224
|
+
/* StateKind.text */
|
|
4225
|
+
);
|
|
4226
|
+
const h = this.emit_open(1, this.cursor - this.extra, o);
|
|
4227
|
+
this.node_stack.push(h), this.out.set_value_start(h, this.cursor);
|
|
4228
|
+
continue;
|
|
4229
|
+
}
|
|
4230
|
+
switch (r) {
|
|
4231
|
+
case b: {
|
|
4232
|
+
this.checkpoint_cursor = this.cursor, this.extra += 1, this.chomp1();
|
|
4233
|
+
continue;
|
|
4234
|
+
}
|
|
4235
|
+
case T: {
|
|
4236
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
4237
|
+
break t;
|
|
4238
|
+
if (s.charCodeAt(this.cursor + 1) === F) {
|
|
4239
|
+
this.chomp(2), this.states.pop(), this.states.push(
|
|
4240
|
+
10
|
|
4241
|
+
/* StateKind.code_span_info */
|
|
4242
|
+
), this.info_start_pos = this.cursor;
|
|
4243
|
+
continue;
|
|
4244
|
+
}
|
|
4245
|
+
this.states.pop(), this.states.push(
|
|
4246
|
+
13
|
|
4247
|
+
/* StateKind.code_span_end */
|
|
4248
|
+
);
|
|
4249
|
+
const h = this.emit_open(8, this.cursor - this.extra, o);
|
|
4250
|
+
this.node_stack.push(h), this.out.set_value_start(h, this.cursor);
|
|
4251
|
+
continue;
|
|
4252
|
+
}
|
|
4253
|
+
case p: {
|
|
4254
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
4255
|
+
break t;
|
|
4256
|
+
this.checkpoint_cursor = this.cursor, this.states.pop(), this.states.push(
|
|
4257
|
+
11
|
|
4258
|
+
/* StateKind.code_span_content_leading_space */
|
|
4259
|
+
);
|
|
4260
|
+
const h = this.emit_open(8, this.cursor - this.extra, o);
|
|
4261
|
+
this.node_stack.push(h), this.chomp(2);
|
|
4262
|
+
continue;
|
|
4263
|
+
}
|
|
4264
|
+
default: {
|
|
4265
|
+
this.states.pop(), this.states.push(
|
|
4266
|
+
13
|
|
4267
|
+
/* StateKind.code_span_end */
|
|
4268
|
+
);
|
|
4269
|
+
const h = this.emit_open(8, this.cursor - this.extra, o);
|
|
4270
|
+
this.node_stack.push(h), this.out.set_value_start(h, this.cursor);
|
|
4271
|
+
continue;
|
|
4272
|
+
}
|
|
4273
|
+
}
|
|
4274
|
+
}
|
|
4275
|
+
case 10:
|
|
4276
|
+
switch (r) {
|
|
4277
|
+
case p: {
|
|
4278
|
+
if (!this.finished && this.cursor + 1 >= t)
|
|
4279
|
+
break t;
|
|
4280
|
+
this.info_end_pos = this.cursor, this.checkpoint_cursor = this.cursor + 1, this.states.pop(), s.charCodeAt(this.cursor + 1) === p ? (this.states.push(
|
|
4281
|
+
11
|
|
4282
|
+
/* StateKind.code_span_content_leading_space */
|
|
4283
|
+
), this.chomp(2)) : (this.states.push(
|
|
4284
|
+
13
|
|
4285
|
+
/* StateKind.code_span_end */
|
|
4286
|
+
), this.chomp1());
|
|
4287
|
+
const h = this.emit_open(8, this.info_start_pos - 2 - this.extra, o);
|
|
4288
|
+
this.node_stack.push(h), this.out.attr(h, "info_start", this.info_start_pos), this.out.attr(h, "info_end", this.info_end_pos), s.charCodeAt(this.cursor - 2) !== p && this.out.set_value_start(h, this.cursor);
|
|
4289
|
+
continue;
|
|
4290
|
+
}
|
|
4291
|
+
default: {
|
|
4292
|
+
this.chomp1();
|
|
4293
|
+
continue;
|
|
4294
|
+
}
|
|
4295
|
+
}
|
|
4296
|
+
case 11: {
|
|
4297
|
+
if (!this.finished && (r === p || r === b) && this.cursor + this.extra >= t)
|
|
4298
|
+
break t;
|
|
4299
|
+
if (r === p && s.charCodeAt(this.cursor + 1) === b) {
|
|
4300
|
+
this.chomp1(), this.states.pop(), this.states.push(
|
|
4301
|
+
12
|
|
4302
|
+
/* StateKind.code_span_leading_space_end */
|
|
4303
|
+
);
|
|
4304
|
+
continue;
|
|
4305
|
+
} else if (r === b && s.charCodeAt(this.cursor - 1) !== b) {
|
|
4306
|
+
if (this.extra === 1 && s.charCodeAt(this.cursor + 1) !== b || this.extra === 2 && s.charCodeAt(this.cursor + 1) === b && s.charCodeAt(this.cursor + 2) !== b) {
|
|
4307
|
+
this.out.set_value_start(o, this.checkpoint_cursor), this.out.set_value_end(o, this.cursor), this.emit_close(o, this.cursor + this.extra), this.node_stack.pop(), this.states.pop(), this.chomp(this.extra);
|
|
4308
|
+
continue;
|
|
4309
|
+
}
|
|
4310
|
+
this.chomp1();
|
|
4311
|
+
continue;
|
|
4312
|
+
} else if (r === d) {
|
|
4313
|
+
this.out.set_value_start(o, this.checkpoint_cursor), this.chomp(this.cursor, !0), this.states.pop(), this.states.push(
|
|
4314
|
+
13
|
|
4315
|
+
/* StateKind.code_span_end */
|
|
4316
|
+
);
|
|
4317
|
+
continue;
|
|
4318
|
+
} else {
|
|
4319
|
+
this.chomp1();
|
|
4320
|
+
continue;
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
case 12: {
|
|
4324
|
+
if (!this.finished && r === b && this.cursor + this.extra >= t)
|
|
4325
|
+
break t;
|
|
4326
|
+
this.extra === 1 && r === b && s.charCodeAt(this.cursor + 1) !== b ? (this.states.pop(), this.out.set_value_start(o, this.checkpoint_cursor + 1), this.emit_close(o, this.cursor + this.extra), this.out.set_value_end(o, this.cursor - 1), this.node_stack.pop()) : this.extra === 2 && r === b && s.charCodeAt(this.cursor + 1) === b && s.charCodeAt(this.cursor + 2) !== b ? (this.states.pop(), this.out.set_value_start(o, this.checkpoint_cursor + 1), this.emit_close(o, this.cursor + this.extra), this.out.set_value_end(o, this.cursor - 1), this.node_stack.pop()) : (this.states.pop(), this.states.push(
|
|
4327
|
+
11
|
|
4328
|
+
/* StateKind.code_span_content_leading_space */
|
|
4329
|
+
)), this.chomp(this.extra);
|
|
4330
|
+
continue;
|
|
4331
|
+
}
|
|
4332
|
+
case 13: {
|
|
4333
|
+
if (this.in_table && (r === q || r === d)) {
|
|
4334
|
+
this.unwind_inline_for_table();
|
|
4335
|
+
continue;
|
|
4336
|
+
}
|
|
4337
|
+
if (r === b) {
|
|
4338
|
+
let h = 1;
|
|
4339
|
+
for (; this.cursor + h < t && s.charCodeAt(this.cursor + h) === b; )
|
|
4340
|
+
h++;
|
|
4341
|
+
if (!this.finished && this.cursor + h >= t)
|
|
4342
|
+
break t;
|
|
4343
|
+
if (h === this.extra) {
|
|
4344
|
+
this.out.set_value_end(o, this.cursor), this.states.pop(), this.emit_close(o, this.cursor + this.extra), this.node_stack.pop(), this.chomp(this.extra);
|
|
4345
|
+
continue;
|
|
4346
|
+
}
|
|
4347
|
+
this.cursor += h, this.prev = w(s.charCodeAt(this.cursor - 1)), this.current = w(s.charCodeAt(this.cursor)), this.next_class = w(s.charCodeAt(this.cursor + 1));
|
|
4348
|
+
continue;
|
|
4349
|
+
}
|
|
4350
|
+
if (r === d && this.is_blank_line_after(this.cursor) || r !== r) {
|
|
4351
|
+
this.chomp(this.checkpoint_cursor + this.extra, !0), this.out.revoke(this.node_stack[this.node_stack.length - 1]), this.node_stack.pop(), this.states.pop();
|
|
4352
|
+
continue;
|
|
4353
|
+
}
|
|
4354
|
+
this.chomp1();
|
|
4355
|
+
continue;
|
|
4356
|
+
}
|
|
4357
|
+
case 23: {
|
|
4358
|
+
if (!r) {
|
|
4359
|
+
if (!this.finished)
|
|
4360
|
+
break t;
|
|
4361
|
+
this.end_table();
|
|
4362
|
+
continue;
|
|
4363
|
+
}
|
|
4364
|
+
if (r === d) {
|
|
4365
|
+
this.end_table();
|
|
4366
|
+
continue;
|
|
4367
|
+
}
|
|
4368
|
+
if (r === T && this.is_heading_start(this.cursor)) {
|
|
4369
|
+
this.end_table();
|
|
4370
|
+
continue;
|
|
4371
|
+
}
|
|
4372
|
+
if (r === b && this.cursor + 2 < t && s.charCodeAt(this.cursor + 1) === b && s.charCodeAt(this.cursor + 2) === b) {
|
|
4373
|
+
this.end_table();
|
|
4374
|
+
continue;
|
|
4375
|
+
}
|
|
4376
|
+
if (r === v) {
|
|
4377
|
+
this.end_table();
|
|
4378
|
+
continue;
|
|
4379
|
+
}
|
|
4380
|
+
if ((r === O || r === A || r === C) && this.is_thematic_break_start(this.cursor)) {
|
|
4381
|
+
this.end_table();
|
|
4382
|
+
continue;
|
|
4383
|
+
}
|
|
4384
|
+
this.table_row_id = this.emit_open(24, this.cursor, this.table_node_id), this.table_cell_col = 0, r === q && this.chomp1(), this.table_cell_id = this.emit_open(25, this.cursor, this.table_row_id, this.table_cell_col), this.table_cell_has_content = !1, this.node_stack.push(this.table_cell_id), this.states.push(
|
|
4385
|
+
24
|
|
4386
|
+
/* StateKind.table_row_content */
|
|
4387
|
+
);
|
|
4388
|
+
continue;
|
|
4389
|
+
}
|
|
4390
|
+
case 24: {
|
|
4391
|
+
if (this.inline_range_parse && !r)
|
|
4392
|
+
break t;
|
|
4393
|
+
if (!r) {
|
|
4394
|
+
if (!this.finished)
|
|
4395
|
+
break t;
|
|
4396
|
+
this.table_cell_col < this.table_col_count && (this.close_table_cell(), this.table_cell_col++), this.pad_and_close_row(), this.states.pop();
|
|
4397
|
+
continue;
|
|
4398
|
+
}
|
|
4399
|
+
if (r === q) {
|
|
4400
|
+
this.table_cell_col < this.table_col_count && this.close_table_cell(), this.table_cell_col++, this.chomp1(), this.table_cell_col < this.table_col_count && (this.table_cell_id = this.emit_open(25, this.cursor, this.table_row_id, this.table_cell_col), this.table_cell_has_content = !1, this.node_stack.push(this.table_cell_id));
|
|
4401
|
+
continue;
|
|
4402
|
+
}
|
|
4403
|
+
if (r === d) {
|
|
4404
|
+
this.table_cell_col < this.table_col_count && (this.close_table_cell(), this.table_cell_col++), this.pad_and_close_row(), this.states.pop(), this.chomp1();
|
|
4405
|
+
continue;
|
|
4406
|
+
}
|
|
4407
|
+
if (!this.table_cell_has_content && (r === p || r === f)) {
|
|
4408
|
+
this.chomp1();
|
|
4409
|
+
continue;
|
|
4410
|
+
}
|
|
4411
|
+
this.table_cell_has_content = !0, this.states.push(
|
|
4412
|
+
8
|
|
4413
|
+
/* StateKind.inline */
|
|
4414
|
+
);
|
|
4415
|
+
continue;
|
|
4416
|
+
}
|
|
4417
|
+
case 29: {
|
|
4418
|
+
const h = this.cursor > 0 ? this.cursor - 1 : 0, i = s.indexOf(`
|
|
4419
|
+
---`, h);
|
|
4420
|
+
if (i === -1) {
|
|
4421
|
+
if (!this.finished)
|
|
4422
|
+
break t;
|
|
4423
|
+
this.frontmatter_failed = !0;
|
|
4424
|
+
const _ = this.node_stack.pop();
|
|
4425
|
+
this.states.pop(), this.out.revoke(_), this.chomp(0, !0);
|
|
4426
|
+
continue;
|
|
4427
|
+
}
|
|
4428
|
+
const c = i + 4;
|
|
4429
|
+
if (c >= t && !this.finished)
|
|
4430
|
+
break t;
|
|
4431
|
+
const a = s.charCodeAt(c);
|
|
4432
|
+
if (a === d || a !== a) {
|
|
4433
|
+
const _ = o, l = a === d ? c + 1 : c;
|
|
4434
|
+
this.out.set_value_end(_, i + 1), this.emit_close(_, l), this.node_stack.pop(), this.states.pop(), this.chomp(l, !0);
|
|
4435
|
+
continue;
|
|
4436
|
+
}
|
|
4437
|
+
this.chomp(c, !0);
|
|
4438
|
+
continue;
|
|
4439
|
+
}
|
|
4440
|
+
default: {
|
|
4441
|
+
this.chomp1();
|
|
4442
|
+
continue;
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
// table helpers
|
|
4448
|
+
/**
|
|
4449
|
+
* try to start a table at the current cursor position.
|
|
4450
|
+
* requires seeing the full header row + full delimiter row.
|
|
4451
|
+
* @returns true = table started, false = hold back, null = not a table
|
|
4452
|
+
*/
|
|
4453
|
+
try_start_table(s) {
|
|
4454
|
+
const t = this.source, n = t.length;
|
|
4455
|
+
let e = this.cursor;
|
|
4456
|
+
for (; e < n && t.charCodeAt(e) !== d; )
|
|
4457
|
+
e++;
|
|
4458
|
+
if (e >= n && !this.finished)
|
|
4459
|
+
return !1;
|
|
4460
|
+
const r = this.parse_table_row_cells(this.cursor, e);
|
|
4461
|
+
if (r.length === 0)
|
|
4462
|
+
return null;
|
|
4463
|
+
const o = e + 1;
|
|
4464
|
+
if (o >= n && !this.finished)
|
|
4465
|
+
return !1;
|
|
4466
|
+
let h = o;
|
|
4467
|
+
for (; h < n && t.charCodeAt(h) !== d; )
|
|
4468
|
+
h++;
|
|
4469
|
+
if (h >= n && !this.finished)
|
|
4470
|
+
return !1;
|
|
4471
|
+
const i = this.parse_delimiter_row(o, h);
|
|
4472
|
+
if (!i || i.length !== r.length)
|
|
4473
|
+
return null;
|
|
4474
|
+
const c = r.length, a = this.emit_open(22, this.cursor, s);
|
|
4475
|
+
this.out.attr(a, "alignments", i), this.out.attr(a, "col_count", c), this.table_col_count = c, this.table_node_id = a, this.in_table = !0;
|
|
4476
|
+
const _ = this.emit_open(23, this.cursor, a);
|
|
4477
|
+
for (let u = 0; u < r.length; u++) {
|
|
4478
|
+
const k = r[u], g = this.trim_cell_range(k.start, k.end);
|
|
4479
|
+
this.table_cell_id = this.emit_open(25, k.start, _, u), g.start < g.end && (this.node_stack.push(this.table_cell_id), this.parse_inline_range(g.start, g.end), this.node_stack.pop()), this.emit_close(this.table_cell_id, k.end);
|
|
4480
|
+
}
|
|
4481
|
+
this.emit_close(_, e), this.node_stack.push(a), this.states.push(
|
|
4482
|
+
23
|
|
4483
|
+
/* StateKind.table_body */
|
|
4484
|
+
);
|
|
4485
|
+
const l = h < n ? h + 1 : h;
|
|
4486
|
+
return this.chomp(l, !0), !0;
|
|
4487
|
+
}
|
|
4488
|
+
/**
|
|
4489
|
+
* parse cells from a table row between start and end positions.
|
|
4490
|
+
* handles leading/trailing pipes and escaped pipes.
|
|
4491
|
+
*/
|
|
4492
|
+
parse_table_row_cells(s, t) {
|
|
4493
|
+
const n = this.source;
|
|
4494
|
+
let e = s;
|
|
4495
|
+
for (; e < t && (n.charCodeAt(e) === p || n.charCodeAt(e) === f); )
|
|
4496
|
+
e++;
|
|
4497
|
+
e < t && n.charCodeAt(e) === q && e++;
|
|
4498
|
+
const o = [];
|
|
4499
|
+
let h = e;
|
|
4500
|
+
for (; e < t; ) {
|
|
4501
|
+
const i = n.charCodeAt(e);
|
|
4502
|
+
if (i === S && e + 1 < t) {
|
|
4503
|
+
e += 2;
|
|
4504
|
+
continue;
|
|
4505
|
+
}
|
|
4506
|
+
i === q && (o.push({ start: h, end: e }), h = e + 1), e++;
|
|
4507
|
+
}
|
|
4508
|
+
if (h < t) {
|
|
4509
|
+
let i = !0;
|
|
4510
|
+
for (let c = h; c < t; c++) {
|
|
4511
|
+
const a = n.charCodeAt(c);
|
|
4512
|
+
if (a !== p && a !== f) {
|
|
4513
|
+
i = !1;
|
|
4514
|
+
break;
|
|
4515
|
+
}
|
|
4516
|
+
}
|
|
4517
|
+
i || o.push({ start: h, end: t });
|
|
4518
|
+
}
|
|
4519
|
+
return o;
|
|
4520
|
+
}
|
|
4521
|
+
/**
|
|
4522
|
+
* parse a delimiter row. returns alignment array or null if invalid.
|
|
4523
|
+
*/
|
|
4524
|
+
parse_delimiter_row(s, t) {
|
|
4525
|
+
const n = this.source;
|
|
4526
|
+
let e = s;
|
|
4527
|
+
for (; e < t && (n.charCodeAt(e) === p || n.charCodeAt(e) === f); )
|
|
4528
|
+
e++;
|
|
4529
|
+
e < t && n.charCodeAt(e) === q && e++;
|
|
4530
|
+
const r = [];
|
|
4531
|
+
for (; e < t; ) {
|
|
4532
|
+
for (; e < t && n.charCodeAt(e) === p; )
|
|
4533
|
+
e++;
|
|
4534
|
+
if (e >= t || n.charCodeAt(e) === q && e + 1 >= t)
|
|
4535
|
+
break;
|
|
4536
|
+
let o = !1;
|
|
4537
|
+
n.charCodeAt(e) === x && (o = !0, e++);
|
|
4538
|
+
let h = 0;
|
|
4539
|
+
for (; e < t && n.charCodeAt(e) === A; )
|
|
4540
|
+
h++, e++;
|
|
4541
|
+
if (h === 0)
|
|
4542
|
+
return null;
|
|
4543
|
+
let i = !1;
|
|
4544
|
+
for (e < t && n.charCodeAt(e) === x && (i = !0, e++); e < t && n.charCodeAt(e) === p; )
|
|
4545
|
+
e++;
|
|
4546
|
+
if (e < t)
|
|
4547
|
+
if (n.charCodeAt(e) === q)
|
|
4548
|
+
e++;
|
|
4549
|
+
else
|
|
4550
|
+
return null;
|
|
4551
|
+
o && i ? r.push("center") : i ? r.push("right") : o ? r.push("left") : r.push("none");
|
|
4552
|
+
}
|
|
4553
|
+
return r.length > 0 ? r : null;
|
|
4554
|
+
}
|
|
4555
|
+
/**
|
|
4556
|
+
* trim whitespace from cell content range.
|
|
4557
|
+
*/
|
|
4558
|
+
trim_cell_range(s, t) {
|
|
4559
|
+
const n = this.source;
|
|
4560
|
+
let e = s, r = t;
|
|
4561
|
+
for (; e < r && (n.charCodeAt(e) === p || n.charCodeAt(e) === f); )
|
|
4562
|
+
e++;
|
|
4563
|
+
for (; r > e && (n.charCodeAt(r - 1) === p || n.charCodeAt(r - 1) === f); )
|
|
4564
|
+
r--;
|
|
4565
|
+
return { start: e, end: r };
|
|
4566
|
+
}
|
|
4567
|
+
/**
|
|
4568
|
+
* emit a data row with cells, padding/truncating to table_col_count.
|
|
4569
|
+
*/
|
|
4570
|
+
emit_table_row(s, t, n) {
|
|
4571
|
+
const e = this.parse_table_row_cells(s, t), r = this.emit_open(24, s, n);
|
|
4572
|
+
for (let o = 0; o < this.table_col_count; o++)
|
|
4573
|
+
if (o < e.length) {
|
|
4574
|
+
const h = e[o], i = this.trim_cell_range(h.start, h.end), c = this.emit_open(25, h.start, r, o);
|
|
4575
|
+
i.start < i.end && this.out.text(c, i.start, i.end), this.emit_close(c, h.end);
|
|
4576
|
+
} else {
|
|
4577
|
+
const h = this.emit_open(25, t, r, o);
|
|
4578
|
+
this.emit_close(h, t);
|
|
4579
|
+
}
|
|
4580
|
+
this.emit_close(r, t);
|
|
4581
|
+
}
|
|
4582
|
+
/**
|
|
4583
|
+
* parse inline content for a specific byte range. used for header cells
|
|
4584
|
+
* where the full content is available atomically.
|
|
4585
|
+
* saves/restores parser state, uses a sentinel state to prevent leaking
|
|
4586
|
+
* into block-level parsing.
|
|
4587
|
+
*/
|
|
4588
|
+
parse_inline_range(s, t) {
|
|
4589
|
+
const n = this.cursor, e = this.finished, r = this.prev;
|
|
4590
|
+
this.cursor = s, this.finished = !0, this.prev = 1, this.current = w(this.source.charCodeAt(s)), this.next_class = w(this.source.charCodeAt(s + 1));
|
|
4591
|
+
const o = this.states.length;
|
|
4592
|
+
this.states.push(
|
|
4593
|
+
24
|
|
4594
|
+
/* StateKind.table_row_content */
|
|
4595
|
+
), this.states.push(
|
|
4596
|
+
8
|
|
4597
|
+
/* StateKind.inline */
|
|
4598
|
+
);
|
|
4599
|
+
const h = this.source;
|
|
4600
|
+
for (this.source = this.source.slice(0, t), this.inline_range_parse = !0, this._run(), this.source = h, this.inline_range_parse = !1; this.states.length > o; ) {
|
|
4601
|
+
const i = this.states[this.states.length - 1];
|
|
4602
|
+
if (i === 1 || i === 15 || i === 14 || i === 19 || i === 20 || i === 21 || i === 22) {
|
|
4603
|
+
const c = this.node_stack[this.node_stack.length - 1];
|
|
4604
|
+
this.out.set_value_end(c, t), this.emit_close(c, t), this.NodeKind_array[c] === 30 && this.directive_text_pop(c), this.node_stack.pop();
|
|
4605
|
+
}
|
|
4606
|
+
this.states.pop();
|
|
4607
|
+
}
|
|
4608
|
+
this.cursor = n, this.finished = e, this.prev = r, this.current = w(this.source.charCodeAt(this.cursor)), this.next_class = w(this.source.charCodeAt(this.cursor + 1));
|
|
4609
|
+
}
|
|
4610
|
+
/**
|
|
4611
|
+
* unwind all inline states back to table_row_content.
|
|
4612
|
+
* called when `|` or `\n` is encountered inside inline content within a table cell.
|
|
4613
|
+
* closes text nodes, pops inline states, closes pending inline constructs.
|
|
4614
|
+
*/
|
|
4615
|
+
unwind_inline_for_table() {
|
|
4616
|
+
for (; this.states.length > 0; ) {
|
|
4617
|
+
const s = this.states[this.states.length - 1];
|
|
4618
|
+
if (s === 24)
|
|
4619
|
+
break;
|
|
4620
|
+
if (s === 1) {
|
|
4621
|
+
const t = this.node_stack[this.node_stack.length - 1];
|
|
4622
|
+
let n = this.cursor;
|
|
4623
|
+
for (; n > 0 && (this.source.charCodeAt(n - 1) === p || this.source.charCodeAt(n - 1) === f); )
|
|
4624
|
+
n--;
|
|
4625
|
+
this.out.set_value_end(t, n), this.emit_close(t, this.cursor), this.node_stack.pop(), this.states.pop();
|
|
4626
|
+
} else if (s === 8)
|
|
4627
|
+
this.states.pop();
|
|
4628
|
+
else if (s === 13 || s === 9 || s === 11 || s === 12 || s === 10) {
|
|
4629
|
+
const t = this.node_stack[this.node_stack.length - 1];
|
|
4630
|
+
this.out.revoke(t), this.node_stack.pop(), this.states.pop();
|
|
4631
|
+
const n = this.node_stack[this.node_stack.length - 1], e = this.emit_open(1, this.checkpoint_cursor, n);
|
|
4632
|
+
this.out.set_value_start(e, this.checkpoint_cursor), this.out.set_value_end(e, this.cursor), this.emit_close(e, this.cursor);
|
|
4633
|
+
} else {
|
|
4634
|
+
const t = this.node_stack[this.node_stack.length - 1];
|
|
4635
|
+
this.pending_has(t) ? (this.out.revoke(t), this.pending_remove(t)) : (this.out.set_value_end(t, this.cursor), this.emit_close(t, this.cursor)), this.NodeKind_array[t] === 30 && this.directive_text_pop(t), this.node_stack.pop(), this.states.pop();
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4638
|
+
}
|
|
4639
|
+
/**
|
|
4640
|
+
* close the current table cell. pops cell from node_stack.
|
|
4641
|
+
*/
|
|
4642
|
+
close_table_cell() {
|
|
4643
|
+
this.emit_close(this.table_cell_id, this.cursor), this.node_stack[this.node_stack.length - 1] === this.table_cell_id && this.node_stack.pop();
|
|
4644
|
+
}
|
|
4645
|
+
/**
|
|
4646
|
+
* pad remaining columns with empty cells and close the current row.
|
|
4647
|
+
*/
|
|
4648
|
+
pad_and_close_row() {
|
|
4649
|
+
for (let s = this.table_cell_col; s < this.table_col_count; s++) {
|
|
4650
|
+
const t = this.emit_open(25, this.cursor, this.table_row_id, s);
|
|
4651
|
+
this.emit_close(t, this.cursor);
|
|
4652
|
+
}
|
|
4653
|
+
this.emit_close(this.table_row_id, this.cursor);
|
|
4654
|
+
}
|
|
4655
|
+
/**
|
|
4656
|
+
* close the current table and pop state.
|
|
4657
|
+
*/
|
|
4658
|
+
end_table() {
|
|
4659
|
+
this.emit_close(this.table_node_id, this.cursor), this.states.pop(), this.node_stack.pop(), this.table_col_count = 0, this.table_node_id = 0, this.table_row_id = 0, this.table_cell_id = 0, this.table_cell_col = 0, this.in_table = !1;
|
|
4660
|
+
}
|
|
4661
|
+
_finalize() {
|
|
4662
|
+
const s = this.source.length;
|
|
4663
|
+
for (let t = 0; t < this.node_stack.length; t++) {
|
|
4664
|
+
const n = this.node_stack[t];
|
|
4665
|
+
!this.closed_flags[n] && !this.pending_has(n) && (this.out.set_value_end(n, s - 1), this.emit_close(n, s - 1));
|
|
4666
|
+
}
|
|
4667
|
+
for (let t = 0; t < this.pending_count; t++) {
|
|
4668
|
+
const n = this.pending_ids[t];
|
|
4669
|
+
if (this.NodeKind_array[n] === 2) {
|
|
4670
|
+
const r = this.pending_starts[t];
|
|
4671
|
+
let o = r;
|
|
4672
|
+
for (; o < s && this.source.charCodeAt(o) !== d; )
|
|
4673
|
+
o++;
|
|
4674
|
+
this.out.revoke(n, this.source.slice(r, o));
|
|
4675
|
+
} else
|
|
4676
|
+
this.out.revoke(n);
|
|
4677
|
+
}
|
|
4678
|
+
this.pending_count = 0;
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4681
|
+
function Vt(m, s = {}) {
|
|
4682
|
+
const t = rt(m);
|
|
4683
|
+
let n;
|
|
4684
|
+
if (s.plugins && s.plugins.length > 0) {
|
|
4685
|
+
const h = new St(t);
|
|
4686
|
+
n = new Mt(s.plugins, h);
|
|
4687
|
+
}
|
|
4688
|
+
const e = new Et(t.length >> 3 || 128, n), r = new Qt(e, s.tab_size), { errors: o } = r.parse(t);
|
|
4689
|
+
return n && n.run_sequential(e.get_buffer()), { nodes: e.get_buffer(), errors: o, source: t };
|
|
4690
|
+
}
|
|
4691
|
+
export {
|
|
4692
|
+
Zt as NodeBuffer,
|
|
4693
|
+
Qt as PFMParser,
|
|
4694
|
+
Mt as PluginDispatcher,
|
|
4695
|
+
St as SourceTextSource,
|
|
4696
|
+
Gt as WireEmitter,
|
|
4697
|
+
ts as WireTextSource,
|
|
4698
|
+
Vt as parse_markdown_svelte
|
|
4699
|
+
};
|