@e-llm-studio/citation 0.0.92 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js +2 -0
- package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/ccount/index.js +2 -0
- package/dist/cjs/node_modules/ccount/index.js.map +1 -0
- package/dist/cjs/node_modules/longest-streak/index.js +2 -0
- package/dist/cjs/node_modules/longest-streak/index.js.map +1 -0
- package/dist/cjs/node_modules/markdown-table/index.js +2 -0
- package/dist/cjs/node_modules/markdown-table/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-phrasing/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/break.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/code.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/definition.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/heading.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/html.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/root.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/strong.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-space/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-chunked/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-resolve-all/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/cjs/node_modules/remark-gfm/lib/index.js +2 -0
- package/dist/cjs/node_modules/remark-gfm/lib/index.js.map +1 -0
- package/dist/features/CitationRenderer/MarkdownRenderer.js +2 -0
- package/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/node_modules/ccount/index.js +2 -0
- package/dist/node_modules/ccount/index.js.map +1 -0
- package/dist/node_modules/longest-streak/index.js +2 -0
- package/dist/node_modules/longest-streak/index.js.map +1 -0
- package/dist/node_modules/markdown-table/index.js +2 -0
- package/dist/node_modules/markdown-table/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-phrasing/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-factory-space/index.js +2 -0
- package/dist/node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-chunked/index.js +2 -0
- package/dist/node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +2 -0
- package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +2 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +2 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +2 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/node_modules/remark-gfm/lib/index.js +2 -0
- package/dist/node_modules/remark-gfm/lib/index.js.map +1 -0
- package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts +9 -0
- package/dist/types/src/features/CitationRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/root.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Root} from 'mdast'\n */\n\nimport {phrasing} from 'mdast-util-phrasing'\n\n/**\n * @param {Root} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function root(node, _, state, info) {\n // Note: `html` nodes are ambiguous.\n const hasPhrasing = node.children.some(function (d) {\n return phrasing(d)\n })\n\n const container = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return container.call(state, node, info)\n}\n"],"names":["node","_","state","info","children","some","d","phrasing","containerPhrasing","containerFlow","call"],"mappings":"4IAcO,SAAcA,EAAMC,EAAGC,EAAOC,GAOnC,OALoBH,EAAKI,SAASC,MAAK,SAAUC,GAC/C,OAAOC,EAAAA,SAASD,EACpB,IAEkCJ,EAAMM,kBAAoBN,EAAMO,eAC/CC,KAAKR,EAAOF,EAAMG,EACrC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-strong.js"),r=require("../util/encode-character-reference.js"),t=require("../util/encode-info.js");function n(n,o,c,i){const s=e.checkStrong(c),a=c.enter("strong"),d=c.createTracker(i),u=d.move(s+s);let f=d.move(c.containerPhrasing(n,{after:s,before:u,...d.current()}));const h=f.charCodeAt(0),l=t.encodeInfo(i.before.charCodeAt(i.before.length-1),h,s);l.inside&&(f=r.encodeCharacterReference(h)+f.slice(1));const g=f.charCodeAt(f.length-1),C=t.encodeInfo(i.after.charCodeAt(0),g,s);C.inside&&(f=f.slice(0,-1)+r.encodeCharacterReference(g));const b=d.move(s+s);return a(),c.attentionEncodeSurroundingInfo={after:C.outside,before:l.outside},u+f+b}n.peek=function(e,r,t){return t.options.strong||"*"},exports.strong=n;
|
|
2
|
+
//# sourceMappingURL=strong.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strong.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/strong.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Strong} from 'mdast'\n */\n\nimport {checkStrong} from '../util/check-strong.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nstrong.peek = strongPeek\n\n/**\n * @param {Strong} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function strong(node, _, state, info) {\n const marker = checkStrong(state)\n const exit = state.enter('strong')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker + marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker + marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Strong} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction strongPeek(_, _1, state) {\n return state.options.strong || '*'\n}\n"],"names":["strong","node","_","state","info","marker","checkStrong","exit","enter","tracker","createTracker","before","move","between","containerPhrasing","after","current","betweenHead","charCodeAt","open","encodeInfo","length","inside","encodeCharacterReference","slice","betweenTail","close","attentionEncodeSurroundingInfo","outside","peek","_1","options"],"mappings":"oMAkBO,SAASA,EAAOC,EAAMC,EAAGC,EAAOC,GACrC,MAAMC,EAASC,EAAWA,YAACH,GACrBI,EAAOJ,EAAMK,MAAM,UACnBC,EAAUN,EAAMO,cAAcN,GAC9BO,EAASF,EAAQG,KAAKP,EAASA,GAErC,IAAIQ,EAAUJ,EAAQG,KACpBT,EAAMW,kBAAkBb,EAAM,CAC5Bc,MAAOV,EACPM,YACGF,EAAQO,aAGf,MAAMC,EAAcJ,EAAQK,WAAW,GACjCC,EAAOC,EAAUA,WACrBhB,EAAKO,OAAOO,WAAWd,EAAKO,OAAOU,OAAS,GAC5CJ,EACAZ,GAGEc,EAAKG,SACPT,EAAUU,EAAwBA,yBAACN,GAAeJ,EAAQW,MAAM,IAGlE,MAAMC,EAAcZ,EAAQK,WAAWL,EAAQQ,OAAS,GAClDK,EAAQN,EAAUA,WAAChB,EAAKW,MAAMG,WAAW,GAAIO,EAAapB,GAE5DqB,EAAMJ,SACRT,EAAUA,EAAQW,MAAM,GAAI,GAAKD,EAAwBA,yBAACE,IAG5D,MAAMV,EAAQN,EAAQG,KAAKP,EAASA,GAQpC,OANAE,IAEAJ,EAAMwB,+BAAiC,CACrCZ,MAAOW,EAAME,QACbjB,OAAQQ,EAAKS,SAERjB,EAASE,EAAUE,CAC5B,CAjDAf,EAAO6B,KAyDP,SAAoB3B,EAAG4B,EAAI3B,GACzB,OAAOA,EAAM4B,QAAQ/B,QAAU,GACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/text.js"],"sourcesContent":["/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Text} from 'mdast'\n */\n\n/**\n * @param {Text} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function text(node, _, state, info) {\n return state.safe(node.value, info)\n}\n"],"names":["node","_","state","info","safe","value"],"mappings":"iFAYO,SAAcA,EAAMC,EAAGC,EAAOC,GACnC,OAAOD,EAAME,KAAKJ,EAAKK,MAAOF,EAChC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../util/check-rule-repetition.js"),t=require("../util/check-rule.js");exports.thematicBreak=function(r,c,i){const u=(t.checkRule(i)+(i.options.ruleSpaces?" ":"")).repeat(e.checkRuleRepetition(i));return i.options.ruleSpaces?u.slice(0,-1):u};
|
|
2
|
+
//# sourceMappingURL=thematic-break.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thematic-break.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Parents, ThematicBreak} from 'mdast'\n */\n\nimport {checkRuleRepetition} from '../util/check-rule-repetition.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {ThematicBreak} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nexport function thematicBreak(_, _1, state) {\n const value = (\n checkRule(state) + (state.options.ruleSpaces ? ' ' : '')\n ).repeat(checkRuleRepetition(state))\n\n return state.options.ruleSpaces ? value.slice(0, -1) : value\n}\n"],"names":["_","_1","state","value","checkRule","options","ruleSpaces","repeat","checkRuleRepetition","slice"],"mappings":"+KAcO,SAAuBA,EAAGC,EAAIC,GACnC,MAAMC,GACJC,EAASA,UAACF,IAAUA,EAAMG,QAAQC,WAAa,IAAM,KACrDC,OAAOC,EAAAA,oBAAoBN,IAE7B,OAAOA,EAAMG,QAAQC,WAAaH,EAAMM,MAAM,GAAI,GAAKN,CACzD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkBulletOrdered=function(e){const r=e.options.bulletOrdered||".";if("."!==r&&")"!==r)throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r};
|
|
2
|
+
//# sourceMappingURL=check-bullet-ordered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-bullet-ordered.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bulletOrdered'], null | undefined>}\n */\nexport function checkBulletOrdered(state) {\n const marker = state.options.bulletOrdered || '.'\n\n if (marker !== '.' && marker !== ')') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bulletOrdered`, expected `.` or `)`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","bulletOrdered","Error"],"mappings":"+FAQO,SAA4BA,GACjC,MAAMC,EAASD,EAAME,QAAQC,eAAiB,IAE9C,GAAe,MAAXF,GAA6B,MAAXA,EACpB,MAAM,IAAIG,MACR,gCACEH,EACA,sDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./check-bullet.js");exports.checkBulletOther=function(t){const r=e.checkBullet(t),o=t.options.bulletOther;if(!o)return"*"===r?"-":"*";if("*"!==o&&"+"!==o&&"-"!==o)throw new Error("Cannot serialize items with `"+o+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(o===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+o+"`) to be different");return o};
|
|
2
|
+
//# sourceMappingURL=check-bullet-other.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-bullet-other.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBulletOther(state) {\n const bullet = checkBullet(state)\n const bulletOther = state.options.bulletOther\n\n if (!bulletOther) {\n return bullet === '*' ? '-' : '*'\n }\n\n if (bulletOther !== '*' && bulletOther !== '+' && bulletOther !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n bulletOther +\n '` for `options.bulletOther`, expected `*`, `+`, or `-`'\n )\n }\n\n if (bulletOther === bullet) {\n throw new Error(\n 'Expected `bullet` (`' +\n bullet +\n '`) and `bulletOther` (`' +\n bulletOther +\n '`) to be different'\n )\n }\n\n return bulletOther\n}\n"],"names":["state","bullet","checkBullet","bulletOther","options","Error"],"mappings":"gIAUO,SAA0BA,GAC/B,MAAMC,EAASC,EAAWA,YAACF,GACrBG,EAAcH,EAAMI,QAAQD,YAElC,IAAKA,EACH,MAAkB,MAAXF,EAAiB,IAAM,IAGhC,GAAoB,MAAhBE,GAAuC,MAAhBA,GAAuC,MAAhBA,EAChD,MAAM,IAAIE,MACR,gCACEF,EACA,0DAIN,GAAIA,IAAgBF,EAClB,MAAM,IAAII,MACR,uBACEJ,EACA,0BACAE,EACA,sBAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkBullet=function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t};
|
|
2
|
+
//# sourceMappingURL=check-bullet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-bullet.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","bullet","Error"],"mappings":"wFAQO,SAAqBA,GAC1B,MAAMC,EAASD,EAAME,QAAQC,QAAU,IAEvC,GAAe,MAAXF,GAA6B,MAAXA,GAA6B,MAAXA,EACtC,MAAM,IAAIG,MACR,gCACEH,EACA,qDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkEmphasis=function(e){const s=e.options.emphasis||"*";if("*"!==s&&"_"!==s)throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s};
|
|
2
|
+
//# sourceMappingURL=check-emphasis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-emphasis.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['emphasis'], null | undefined>}\n */\nexport function checkEmphasis(state) {\n const marker = state.options.emphasis || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize emphasis with `' +\n marker +\n '` for `options.emphasis`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","emphasis","Error"],"mappings":"0FAQO,SAAuBA,GAC5B,MAAMC,EAASD,EAAME,QAAQC,UAAY,IAEzC,GAAe,MAAXF,GAA6B,MAAXA,EACpB,MAAM,IAAIG,MACR,mCACEH,EACA,kDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkFence=function(e){const o=e.options.fence||"`";if("`"!==o&&"~"!==o)throw new Error("Cannot serialize code with `"+o+"` for `options.fence`, expected `` ` `` or `~`");return o};
|
|
2
|
+
//# sourceMappingURL=check-fence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-fence.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-fence.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['fence'], null | undefined>}\n */\nexport function checkFence(state) {\n const marker = state.options.fence || '`'\n\n if (marker !== '`' && marker !== '~') {\n throw new Error(\n 'Cannot serialize code with `' +\n marker +\n '` for `options.fence`, expected `` ` `` or `~`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","fence","Error"],"mappings":"uFAQO,SAAoBA,GACzB,MAAMC,EAASD,EAAME,QAAQC,OAAS,IAEtC,GAAe,MAAXF,GAA6B,MAAXA,EACpB,MAAM,IAAIG,MACR,+BACEH,EACA,kDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkListItemIndent=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t};
|
|
2
|
+
//# sourceMappingURL=check-list-item-indent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-list-item-indent.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['listItemIndent'], null | undefined>}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'one'\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n"],"names":["state","style","options","listItemIndent","Error"],"mappings":"gGAQO,SAA6BA,GAClC,MAAMC,EAAQD,EAAME,QAAQC,gBAAkB,MAE9C,GAAc,QAAVF,GAA6B,QAAVA,GAA6B,UAAVA,EACxC,MAAM,IAAIG,MACR,gCACEH,EACA,qEAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkQuote=function(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t};
|
|
2
|
+
//# sourceMappingURL=check-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-quote.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-quote.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['quote'], null | undefined>}\n */\nexport function checkQuote(state) {\n const marker = state.options.quote || '\"'\n\n if (marker !== '\"' && marker !== \"'\") {\n throw new Error(\n 'Cannot serialize title with `' +\n marker +\n '` for `options.quote`, expected `\"`, or `\\'`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","quote","Error"],"mappings":"uFAQO,SAAoBA,GACzB,MAAMC,EAASD,EAAME,QAAQC,OAAS,IAEtC,GAAe,MAAXF,GAA6B,MAAXA,EACpB,MAAM,IAAIG,MACR,gCACEH,EACA,gDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkRuleRepetition=function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t};
|
|
2
|
+
//# sourceMappingURL=check-rule-repetition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-rule-repetition.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['ruleRepetition'], null | undefined>}\n */\nexport function checkRuleRepetition(state) {\n const repetition = state.options.ruleRepetition || 3\n\n if (repetition < 3) {\n throw new Error(\n 'Cannot serialize rules with repetition `' +\n repetition +\n '` for `options.ruleRepetition`, expected `3` or more'\n )\n }\n\n return repetition\n}\n"],"names":["state","repetition","options","ruleRepetition","Error"],"mappings":"gGAQO,SAA6BA,GAClC,MAAMC,EAAaD,EAAME,QAAQC,gBAAkB,EAEnD,GAAIF,EAAa,EACf,MAAM,IAAIG,MACR,2CACEH,EACA,wDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkRule=function(e){const r=e.options.rule||"*";if("*"!==r&&"-"!==r&&"_"!==r)throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r};
|
|
2
|
+
//# sourceMappingURL=check-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-rule.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-rule.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['rule'], null | undefined>}\n */\nexport function checkRule(state) {\n const marker = state.options.rule || '*'\n\n if (marker !== '*' && marker !== '-' && marker !== '_') {\n throw new Error(\n 'Cannot serialize rules with `' +\n marker +\n '` for `options.rule`, expected `*`, `-`, or `_`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","rule","Error"],"mappings":"sFAQO,SAAmBA,GACxB,MAAMC,EAASD,EAAME,QAAQC,MAAQ,IAErC,GAAe,MAAXF,GAA6B,MAAXA,GAA6B,MAAXA,EACtC,MAAM,IAAIG,MACR,gCACEH,EACA,mDAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkStrong=function(o){const t=o.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t};
|
|
2
|
+
//# sourceMappingURL=check-strong.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-strong.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/check-strong.js"],"sourcesContent":["/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['strong'], null | undefined>}\n */\nexport function checkStrong(state) {\n const marker = state.options.strong || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize strong with `' +\n marker +\n '` for `options.strong`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n"],"names":["state","marker","options","strong","Error"],"mappings":"wFAQO,SAAqBA,GAC1B,MAAMC,EAASD,EAAME,QAAQC,QAAU,IAEvC,GAAe,MAAXF,GAA6B,MAAXA,EACpB,MAAM,IAAIG,MACR,iCACEH,EACA,gDAIN,OAAOA,CACT"}
|
package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode-character-reference.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js"],"sourcesContent":["/**\n * Encode a code point as a character reference.\n *\n * @param {number} code\n * Code point to encode.\n * @returns {string}\n * Encoded character reference.\n */\nexport function encodeCharacterReference(code) {\n return '&#x' + code.toString(16).toUpperCase() + ';'\n}\n"],"names":["code","toString","toUpperCase"],"mappings":"qGAQO,SAAkCA,GACvC,MAAO,MAAQA,EAAKC,SAAS,IAAIC,cAAgB,GACnD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../../micromark-util-classify-character/index.js");exports.encodeInfo=function(e,s,d){const o=i.classifyCharacter(e),t=i.classifyCharacter(s);return void 0===o?void 0===t?"_"===d?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===t?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===o?void 0===t?{inside:!1,outside:!1}:1===t?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===t?{inside:!1,outside:!1}:1===t?{inside:!0,outside:!1}:{inside:!1,outside:!1}};
|
|
2
|
+
//# sourceMappingURL=encode-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode-info.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/encode-info.js"],"sourcesContent":["/**\n * @import {EncodeSides} from '../types.js'\n */\n\nimport {classifyCharacter} from 'micromark-util-classify-character'\n\n/**\n * Check whether to encode (as a character reference) the characters\n * surrounding an attention run.\n *\n * Which characters are around an attention run influence whether it works or\n * not.\n *\n * See <https://github.com/orgs/syntax-tree/discussions/60> for more info.\n * See this markdown in a particular renderer to see what works:\n *\n * ```markdown\n * | | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |\n * | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |\n * | 1 (letter outside) | x*y*z | x*.*z | x* *z | x**z |\n * | 2 (punctuation outside) | .*y*. | .*.*. | .* *. | .**. |\n * | 3 (whitespace outside) | x *y* z | x *.* z | x * * z | x ** z |\n * | 4 (nothing outside) | *x* | *.* | * * | ** |\n * ```\n *\n * @param {number} outside\n * Code point on the outer side of the run.\n * @param {number} inside\n * Code point on the inner side of the run.\n * @param {'*' | '_'} marker\n * Marker of the run.\n * Underscores are handled more strictly (they form less often) than\n * asterisks.\n * @returns {EncodeSides}\n * Whether to encode characters.\n */\n// Important: punctuation must never be encoded.\n// Punctuation is solely used by markdown constructs.\n// And by encoding itself.\n// Encoding them will break constructs or double encode things.\nexport function encodeInfo(outside, inside, marker) {\n const outsideKind = classifyCharacter(outside)\n const insideKind = classifyCharacter(inside)\n\n // Letter outside:\n if (outsideKind === undefined) {\n return insideKind === undefined\n ? // Letter inside:\n // we have to encode *both* letters for `_` as it is looser.\n // it already forms for `*` (and GFMs `~`).\n marker === '_'\n ? {inside: true, outside: true}\n : {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (letter, whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: encode outer (letter)\n {inside: false, outside: true}\n }\n\n // Whitespace outside:\n if (outsideKind === 1) {\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n }\n\n // Punctuation outside:\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode inner (whitespace).\n {inside: true, outside: false}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n}\n"],"names":["outside","inside","marker","outsideKind","classifyCharacter","insideKind","undefined"],"mappings":"4JAwCO,SAAoBA,EAASC,EAAQC,GAC1C,MAAMC,EAAcC,EAAiBA,kBAACJ,GAChCK,EAAaD,EAAiBA,kBAACH,GAGrC,YAAoBK,IAAhBH,OACoBG,IAAfD,EAIQ,MAAXH,EACE,CAACD,QAAQ,EAAMD,SAAS,GACxB,CAACC,QAAQ,EAAOD,SAAS,GACZ,IAAfK,EAEE,CAACJ,QAAQ,EAAMD,SAAS,GAExB,CAACC,QAAQ,EAAOD,SAAS,GAIb,IAAhBG,OACoBG,IAAfD,EAEH,CAACJ,QAAQ,EAAOD,SAAS,GACV,IAAfK,EAEE,CAACJ,QAAQ,EAAMD,SAAS,GAExB,CAACC,QAAQ,EAAOD,SAAS,QAIXM,IAAfD,EAEH,CAACJ,QAAQ,EAAOD,SAAS,GACV,IAAfK,EAEE,CAACJ,QAAQ,EAAMD,SAAS,GAExB,CAACC,QAAQ,EAAOD,SAAS,EACjC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatCodeAsIndented=function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))};
|
|
2
|
+
//# sourceMappingURL=format-code-as-indented.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-code-as-indented.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Code} from 'mdast'\n */\n\n/**\n * @param {Code} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatCodeAsIndented(node, state) {\n return Boolean(\n state.options.fences === false &&\n node.value &&\n // If there’s no info…\n !node.lang &&\n // And there’s a non-whitespace character…\n /[^ \\r\\n]/.test(node.value) &&\n // And the value doesn’t start or end in a blank…\n !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node.value)\n )\n}\n"],"names":["node","state","Boolean","options","fences","value","lang","test"],"mappings":"iGAUO,SAA8BA,EAAMC,GACzC,OAAOC,SACoB,IAAzBD,EAAME,QAAQC,QACZJ,EAAKK,QAEJL,EAAKM,MAEN,WAAWC,KAAKP,EAAKK,SAEpB,0CAA0CE,KAAKP,EAAKK,OAE3D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../unist-util-visit/lib/index.js"),t=require("../../../mdast-util-to-string/lib/index.js"),i=require("../../../unist-util-visit-parents/lib/index.js");exports.formatHeadingAsSetext=function(r,n){let s=!1;return e.visit(r,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return s=!0,i.EXIT})),Boolean((!r.depth||r.depth<3)&&t.toString(r)&&(n.options.setext||s))};
|
|
2
|
+
//# sourceMappingURL=format-heading-as-setext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-heading-as-setext.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Heading} from 'mdast'\n */\n\nimport {EXIT, visit} from 'unist-util-visit'\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Heading} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatHeadingAsSetext(node, state) {\n let literalWithBreak = false\n\n // Look for literals with a line break.\n // Note that this also\n visit(node, function (node) {\n if (\n ('value' in node && /\\r?\\n|\\r/.test(node.value)) ||\n node.type === 'break'\n ) {\n literalWithBreak = true\n return EXIT\n }\n })\n\n return Boolean(\n (!node.depth || node.depth < 3) &&\n toString(node) &&\n (state.options.setext || literalWithBreak)\n )\n}\n"],"names":["node","state","literalWithBreak","visit","test","value","type","EXIT","Boolean","depth","toString","options","setext"],"mappings":"8QAaO,SAA+BA,EAAMC,GAC1C,IAAIC,GAAmB,EAcvB,OAVAC,QAAMH,GAAM,SAAUA,GACpB,GACG,UAAWA,GAAQ,WAAWI,KAAKJ,EAAKK,QAC3B,UAAdL,EAAKM,KAGL,OADAJ,GAAmB,EACZK,EAAIA,IAEjB,IAESC,UACHR,EAAKS,OAAST,EAAKS,MAAQ,IAC3BC,EAAAA,SAASV,KACRC,EAAMU,QAAQC,QAAUV,GAE/B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../mdast-util-to-string/lib/index.js");exports.formatLinkAsAutolink=function(e,r){const i=t.toString(e);return Boolean(!r.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))};
|
|
2
|
+
//# sourceMappingURL=format-link-as-autolink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-link-as-autolink.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js"],"sourcesContent":["/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Link} from 'mdast'\n */\n\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Link} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatLinkAsAutolink(node, state) {\n const raw = toString(node)\n\n return Boolean(\n !state.options.resourceLink &&\n // If there’s a url…\n node.url &&\n // And there’s a no title…\n !node.title &&\n // And the content of `node` is a single text node…\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'text' &&\n // And if the url is the same as the content…\n (raw === node.url || 'mailto:' + raw === node.url) &&\n // And that starts w/ a protocol…\n /^[a-z][a-z+.-]+:/i.test(node.url) &&\n // And that doesn’t contain ASCII control codes (character escapes and\n // references don’t work), space, or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n"],"names":["node","state","raw","toString","Boolean","options","resourceLink","url","title","children","length","type","test"],"mappings":"6JAYO,SAA8BA,EAAMC,GACzC,MAAMC,EAAMC,EAAQA,SAACH,GAErB,OAAOI,SACJH,EAAMI,QAAQC,cAEbN,EAAKO,MAEJP,EAAKQ,OAENR,EAAKS,UACoB,IAAzBT,EAAKS,SAASC,QACY,SAA1BV,EAAKS,SAAS,GAAGE,OAEhBT,IAAQF,EAAKO,KAAO,UAAYL,IAAQF,EAAKO,MAE9C,oBAAoBK,KAAKZ,EAAKO,OAG7B,iBAAiBK,KAAKZ,EAAKO,KAElC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function t(t,e,n){if("string"==typeof e&&(e=[e]),!e||0===e.length)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.patternInScope=function(e,n){return t(e,n.inConstruct,!0)&&!t(e,n.notInConstruct,!1)};
|
|
2
|
+
//# sourceMappingURL=pattern-in-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-in-scope.js","sources":["../../../../../../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js"],"sourcesContent":["/**\n * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n"],"names":["listInScope","stack","list","none","length","index","includes","pattern","inConstruct","notInConstruct"],"mappings":"aAsBA,SAASA,EAAYC,EAAOC,EAAMC,GAKhC,GAJoB,iBAATD,IACTA,EAAO,CAACA,KAGLA,GAAwB,IAAhBA,EAAKE,OAChB,OAAOD,EAGT,IAAIE,GAAS,EAEb,OAASA,EAAQH,EAAKE,QACpB,GAAIH,EAAMK,SAASJ,EAAKG,IACtB,OAAO,EAIX,OAAO,CACT,+EA/BO,SAAwBJ,EAAOM,GACpC,OACEP,EAAYC,EAAOM,EAAQC,aAAa,KACvCR,EAAYC,EAAOM,EAAQE,gBAAgB,EAEhD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={};function t(e,t,r){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return n(e.children,t,r)}return Array.isArray(e)?n(e,t,r):""}function n(e,n,r){const o=[];let l=-1;for(;++l<e.length;)o[l]=t(e[l],n,r);return o.join("")}exports.toString=function(n,r){const o=r||e;return t(n,"boolean"!=typeof o.includeImageAlt||o.includeImageAlt,"boolean"!=typeof o.includeHtml||o.includeHtml)};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-to-string/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Nodes} Nodes\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s (default: `true`).\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML (default: `true`).\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} [value]\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array<unknown>} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array<string>} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Nodes}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n"],"names":["emptyOptions","one","value","includeImageAlt","includeHtml","Boolean","node","type","alt","all","children","Array","isArray","values","result","index","length","join","options","settings"],"mappings":"oEAYA,MAAMA,EAAe,CAAE,EAuCvB,SAASC,EAAIC,EAAOC,EAAiBC,GACnC,GAqDF,SAAcF,GACZ,OAAOG,QAAQH,GAA0B,iBAAVA,EACjC,CAvDMI,CAAKJ,GAAQ,CACf,GAAI,UAAWA,EACb,MAAsB,SAAfA,EAAMK,MAAoBH,EAAmBF,EAAMA,MAAX,GAGjD,GAAIC,GAAmB,QAASD,GAASA,EAAMM,IAC7C,OAAON,EAAMM,IAGf,GAAI,aAAcN,EAChB,OAAOO,EAAIP,EAAMQ,SAAUP,EAAiBC,EAE/C,CAED,OAAIO,MAAMC,QAAQV,GACTO,EAAIP,EAAOC,EAAiBC,GAG9B,EACT,CAcA,SAASK,EAAII,EAAQV,EAAiBC,GAEpC,MAAMU,EAAS,GACf,IAAIC,GAAS,EAEb,OAASA,EAAQF,EAAOG,QACtBF,EAAOC,GAASd,EAAIY,EAAOE,GAAQZ,EAAiBC,GAGtD,OAAOU,EAAOG,KAAK,GACrB,kBApEO,SAAkBf,EAAOgB,GAC9B,MAAMC,EAAWD,GAAWlB,EAQ5B,OAAOC,EAAIC,EAN2B,kBAA7BiB,EAAShB,iBACZgB,EAAShB,gBAGmB,kBAAzBgB,EAASf,aAA4Be,EAASf,YAGzD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../micromark-factory-space/index.js"),r=require("../../micromark-util-character/index.js");const n={partial:!0,tokenize:function(n,i,t){return function(i){return r.markdownSpace(i)?e.factorySpace(n,a,"linePrefix")(i):a(i)};function a(e){return null===e||r.markdownLineEnding(e)?i(e):t(e)}}};exports.blankLine=n;
|
|
2
|
+
//# sourceMappingURL=blank-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blank-line.js","sources":["../../../../../node_modules/micromark-core-commonmark/lib/blank-line.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blankLine = {\n partial: true,\n tokenize: tokenizeBlankLine\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start;\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code) ? factorySpace(effects, after, \"linePrefix\")(code) : after(code);\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}"],"names":["blankLine","partial","tokenize","effects","ok","nok","code","markdownSpace","factorySpace","after","markdownLineEnding"],"mappings":"iLAYY,MAACA,EAAY,CACvBC,SAAS,EACTC,SAQF,SAA2BC,EAASC,EAAIC,GACtC,OAgBA,SAAeC,GACb,OAAOC,gBAAcD,GAAQE,EAAAA,aAAaL,EAASM,EAAO,aAA7BD,CAA2CF,GAAQG,EAAMH,EACvF,EAgBD,SAASG,EAAMH,GACb,OAAgB,OAATA,GAAiBI,EAAAA,mBAAmBJ,GAAQF,EAAGE,GAAQD,EAAIC,EACnE,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../micromark-util-combine-extensions/index.js"),i=require("../micromark-extension-gfm-autolink-literal/lib/syntax.js"),t=require("../micromark-extension-gfm-footnote/lib/syntax.js"),r=require("../micromark-extension-gfm-strikethrough/lib/syntax.js"),n=require("../micromark-extension-gfm-table/lib/syntax.js"),o=require("../micromark-extension-gfm-task-list-item/lib/syntax.js");exports.gfm=function(s){return e.combineExtensions([i.gfmAutolinkLiteral(),t.gfmFootnote(),r.gfmStrikethrough(s),n.gfmTable(),o.gfmTaskListItem()])};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/micromark-extension-gfm/index.js"],"sourcesContent":["/**\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Create an extension for `micromark` to enable GFM syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-strikethrough`.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * syntax.\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral(),\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable(),\n gfmTaskListItem()\n ])\n}\n\n/**\n * Create an extension for `micromark` to support GFM when serializing to HTML.\n *\n * @param {HtmlOptions | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-footnote`.\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM when serializing to HTML.\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml(),\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml(),\n gfmTableHtml(),\n gfmTagfilterHtml(),\n gfmTaskListItemHtml()\n ])\n}\n"],"names":["options","combineExtensions","gfmAutolinkLiteral","gfmFootnote","gfmStrikethrough","gfmTable","gfmTaskListItem"],"mappings":"0dAsCO,SAAaA,GAClB,OAAOC,oBAAkB,CACvBC,uBACAC,gBACAC,EAAAA,iBAAiBJ,GACjBK,aACAC,qBAEJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("../../micromark-util-character/index.js");const t={tokenize:function(n,t,e){let i=0;return function t(u){if((87===u||119===u)&&i<3)return i++,n.consume(u),t;if(46===u&&3===i)return n.consume(u),r;return e(u)};function r(n){return null===n?e(n):t(n)}},partial:!0},e={tokenize:function(t,e,i){let u,o,c;return l;function l(e){return 46===e||95===e?t.check(r,s,a)(e):null===e||n.markdownLineEndingOrSpace(e)||n.unicodeWhitespace(e)||45!==e&&n.unicodePunctuation(e)?s(e):(c=!0,t.consume(e),l)}function a(n){return 95===n?u=!0:(o=u,u=void 0),t.consume(n),l}function s(n){return o||u||!c?i(n):e(n)}},partial:!0},i={tokenize:function(t,e){let i=0,u=0;return o;function o(l){return 40===l?(i++,t.consume(l),o):41===l&&u<i?c(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?t.check(r,e,c)(l):null===l||n.markdownLineEndingOrSpace(l)||n.unicodeWhitespace(l)?e(l):(t.consume(l),o)}function c(n){return 41===n&&u++,t.consume(n),o}},partial:!0},r={tokenize:function(t,e,i){return r;function r(c){return 33===c||34===c||39===c||41===c||42===c||44===c||46===c||58===c||59===c||63===c||95===c||126===c?(t.consume(c),r):38===c?(t.consume(c),o):93===c?(t.consume(c),u):60===c||null===c||n.markdownLineEndingOrSpace(c)||n.unicodeWhitespace(c)?e(c):i(c)}function u(t){return null===t||40===t||91===t||n.markdownLineEndingOrSpace(t)||n.unicodeWhitespace(t)?e(t):r(t)}function o(t){return n.asciiAlpha(t)?c(t):i(t)}function c(e){return 59===e?(t.consume(e),r):n.asciiAlpha(e)?(t.consume(e),c):i(e)}},partial:!0},u={tokenize:function(t,e,i){return function(n){return t.consume(n),r};function r(t){return n.asciiAlphanumeric(t)?i(t):e(t)}},partial:!0},o={name:"wwwAutolink",tokenize:function(n,r,u){const o=this;return function(r){if(87!==r&&119!==r||!f.call(o,o.previous)||d(o.events))return u(r);return n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(t,n.attempt(e,n.attempt(i,c),u),u)(r)};function c(t){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(t)}},previous:f},c={name:"protocolAutolink",tokenize:function(t,r,u){const o=this;let c="",l=!1;return function(n){if((72===n||104===n)&&m.call(o,o.previous)&&!d(o.events))return t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),c+=String.fromCodePoint(n),t.consume(n),a;return u(n)};function a(e){if(n.asciiAlpha(e)&&c.length<5)return c+=String.fromCodePoint(e),t.consume(e),a;if(58===e){const n=c.toLowerCase();if("http"===n||"https"===n)return t.consume(e),s}return u(e)}function s(n){return 47===n?(t.consume(n),l?f:(l=!0,s)):u(n)}function f(r){return null===r||n.asciiControl(r)||n.markdownLineEndingOrSpace(r)||n.unicodeWhitespace(r)||n.unicodePunctuation(r)?u(r):t.attempt(e,t.attempt(i,p),u)(r)}function p(n){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),r(n)}},previous:m},l={name:"emailAutolink",tokenize:function(t,e,i){const r=this;let o,c;return function(n){if(!k(n)||!p.call(r,r.previous)||d(r.events))return i(n);return t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(n)};function l(n){return k(n)?(t.consume(n),l):64===n?(t.consume(n),a):i(n)}function a(e){return 46===e?t.check(u,f,s)(e):45===e||95===e||n.asciiAlphanumeric(e)?(c=!0,t.consume(e),a):f(e)}function s(n){return t.consume(n),o=!0,a}function f(u){return c&&o&&n.asciiAlpha(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(u)):i(u)}},previous:p},a={};let s=48;for(;s<123;)a[s]=l,s++,58===s?s=65:91===s&&(s=97);function f(t){return null===t||40===t||42===t||95===t||91===t||93===t||126===t||n.markdownLineEndingOrSpace(t)}function m(t){return!n.asciiAlpha(t)}function p(n){return!(47===n||k(n))}function k(t){return 43===t||45===t||46===t||95===t||n.asciiAlphanumeric(t)}function d(n){let t=n.length,e=!1;for(;t--;){const i=n[t][1];if(("labelLink"===i.type||"labelImage"===i.type)&&!i._balanced){e=!0;break}if(i._gfmAutolinkLiteralWalkedInto){e=!1;break}}return n.length>0&&!e&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),e}a[43]=l,a[45]=l,a[46]=l,a[95]=l,a[72]=[l,c],a[104]=[l,c],a[87]=[l,o],a[119]=[l,o],exports.gfmAutolinkLiteral=function(){return{text:a}};
|
|
2
|
+
//# sourceMappingURL=syntax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax.js","sources":["../../../../../node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js"],"sourcesContent":["/**\n * @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { asciiAlpha, asciiAlphanumeric, asciiControl, markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n};\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n};\nconst path = {\n tokenize: tokenizePath,\n partial: true\n};\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n};\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n};\nconst wwwAutolink = {\n name: 'wwwAutolink',\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n};\nconst protocolAutolink = {\n name: 'protocolAutolink',\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n};\nconst emailAutolink = {\n name: 'emailAutolink',\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n};\n\n/** @type {ConstructRecord} */\nconst text = {};\n\n/**\n * Create an extension for `micromark` to support GitHub autolink literal\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n */\nexport function gfmAutolinkLiteral() {\n return {\n text\n };\n}\n\n/** @type {Code} */\nlet code = 48;\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink;\n code++;\n if (code === 58) code = 65;else if (code === 91) code = 97;\n}\ntext[43] = emailAutolink;\ntext[45] = emailAutolink;\ntext[46] = emailAutolink;\ntext[95] = emailAutolink;\ntext[72] = [emailAutolink, protocolAutolink];\ntext[104] = [emailAutolink, protocolAutolink];\ntext[87] = [emailAutolink, wwwAutolink];\ntext[119] = [emailAutolink, wwwAutolink];\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this;\n /** @type {boolean | undefined} */\n let dot;\n /** @type {boolean} */\n let data;\n return start;\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkEmail');\n return atext(code);\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code);\n return atext;\n }\n if (code === 64) {\n effects.consume(code);\n return emailDomain;\n }\n return nok(code);\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code);\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true;\n effects.consume(code);\n return emailDomain;\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code);\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code);\n dot = true;\n return emailDomain;\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L332>.\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail');\n effects.exit('literalAutolink');\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this;\n return wwwStart;\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkWww');\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code);\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this;\n let buffer = '';\n let seen = false;\n return protocolStart;\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkHttp');\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n return nok(code);\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase();\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code);\n return protocolSlashesInside;\n }\n }\n return nok(code);\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code);\n if (seen) {\n return afterProtocol;\n }\n seen = true;\n return protocolSlashesInside;\n }\n return nok(code);\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code);\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0;\n return wwwPrefixInside;\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++;\n effects.consume(code);\n return wwwPrefixInside;\n }\n if (code === 46 && size === 3) {\n effects.consume(code);\n return wwwPrefixAfter;\n }\n return nok(code);\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code);\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment;\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment;\n /** @type {boolean | undefined} */\n let seen;\n return domainInside;\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code);\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) {\n return domainAfter(code);\n }\n seen = true;\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true;\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment;\n underscoreInLastSegment = undefined;\n }\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // <https://github.com/github/cmark-gfm/issues/279>\n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code);\n }\n return ok(code);\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0;\n let sizeClose = 0;\n return pathInside;\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++;\n effects.consume(code);\n return pathInside;\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code);\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) {\n return effects.check(trail, ok, pathAtPunctuation)(code);\n }\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n effects.consume(code);\n return pathInside;\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++;\n }\n effects.consume(code);\n return pathInside;\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail;\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) {\n effects.consume(code);\n return trail;\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code);\n return trailCharacterReferenceStart;\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // <https://github.com/github/cmark-gfm/issues/278>.\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code);\n return trailBracketAfter;\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of <https://github.com/github/cmark-gfm/issues/278> for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return trail(code);\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code);\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code);\n return trail;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return trailCharacterReferenceInside;\n }\n\n // It’s not a trail.\n return nok(code);\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start;\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code);\n return after;\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code);\n }\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code);\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code);\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L307>.\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code));\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code);\n}\n\n/**\n * @param {Array<Event>} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length;\n let result = false;\n while (index--) {\n const token = events[index][1];\n if ((token.type === 'labelLink' || token.type === 'labelImage') && !token._balanced) {\n result = true;\n break;\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false;\n break;\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;\n }\n return result;\n}"],"names":["wwwPrefix","tokenize","effects","ok","nok","size","wwwPrefixInside","code","consume","wwwPrefixAfter","partial","domain","underscoreInLastSegment","underscoreInLastLastSegment","seen","domainInside","check","trail","domainAfter","domainAtPunctuation","markdownLineEndingOrSpace","unicodeWhitespace","unicodePunctuation","undefined","path","sizeOpen","sizeClose","pathInside","pathAtPunctuation","trailCharacterReferenceStart","trailBracketAfter","asciiAlpha","trailCharacterReferenceInside","emailDomainDotTrail","after","asciiAlphanumeric","wwwAutolink","name","self","this","previousWww","call","previous","previousUnbalanced","events","enter","attempt","wwwAfter","exit","protocolAutolink","buffer","previousProtocol","String","fromCodePoint","protocolPrefixInside","length","protocol","toLowerCase","protocolSlashesInside","afterProtocol","asciiControl","protocolAfter","emailAutolink","dot","data","gfmAtext","previousEmail","atext","emailDomain","emailDomainAfter","emailDomainDot","text","index","result","token","type","_balanced","_gfmAutolinkLiteralWalkedInto"],"mappings":"6HAKA,MAAMA,EAAY,CAChBC,SA2YF,SAA2BC,EAASC,EAAIC,GACtC,IAAIC,EAAO,EACX,OAYA,SAASC,EAAgBC,GACvB,IAAc,KAAT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S,EAAK,IAAM,CAACT,EAAeb,GAC3BsB,EAAK,KAAO,CAACT,EAAeb,GAC5BsB,EAAK,IAAM,CAACT,EAAe1B,GAC3BmC,EAAK,KAAO,CAACT,EAAe1B,8BAtBrB,WACL,MAAO,CACLmC,OAEJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../micromark-util-character/index.js"),t=require("../../micromark-core-commonmark/lib/blank-line.js"),n=require("../../micromark-factory-space/index.js");require("../../decode-named-character-reference/index.dom.js");var o=require("../../micromark-util-normalize-identifier/index.js");const r={tokenize:function(e,t,o){const r=this;return n.factorySpace(e,(function(e){const n=r.events[r.events.length-1];return n&&"gfmFootnoteDefinitionIndent"===n[1].type&&4===n[2].sliceSerialize(n[1],!0).length?t(e):o(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function i(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){l=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!l||!l._balanced)return n(i);const f=o.normalizeIdentifier(r.sliceSerialize({start:l.end,end:r.now()}));if(94!==f.codePointAt(0)||!a.includes(f.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function a(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...l),e}function l(t,n,r){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,f=0;return function(e){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(e),t.exit("gfmFootnoteCallLabelMarker"),c};function c(e){return 94!==e?r(e):(t.enter("gfmFootnoteCallMarker"),t.consume(e),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",s)}function s(c){if(f>999||93===c&&!l||null===c||91===c||e.markdownLineEndingOrSpace(c))return r(c);if(93===c){t.exit("chunkString");const e=t.exit("gfmFootnoteCallString");return a.includes(o.normalizeIdentifier(i.sliceSerialize(e)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),n):r(c)}return e.markdownLineEndingOrSpace(c)||(l=!0),f++,t.consume(c),92===c?m:s}function m(e){return 91===e||92===e||93===e?(t.consume(e),f++,s):s(e)}}function f(t,r,i){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let f,c,s=0;return function(e){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(e),t.exit("gfmFootnoteDefinitionLabelMarker"),m};function m(e){return 94===e?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(e),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):i(e)}function u(n){if(s>999||93===n&&!c||null===n||91===n||e.markdownLineEndingOrSpace(n))return i(n);if(93===n){t.exit("chunkString");const e=t.exit("gfmFootnoteDefinitionLabelString");return f=o.normalizeIdentifier(a.sliceSerialize(e)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(n),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return e.markdownLineEndingOrSpace(n)||(c=!0),s++,t.consume(n),92===n?g:u}function g(e){return 91===e||92===e||93===e?(t.consume(e),s++,u):u(e)}function d(e){return 58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),l.includes(f)||l.push(f),n.factorySpace(t,k,"gfmFootnoteDefinitionWhitespace")):i(e)}function k(e){return r(e)}}function c(e,n,o){return e.check(t.blankLine,n,e.attempt(r,n,o))}function s(e){e.exit("gfmFootnoteDefinition")}exports.gfmFootnote=function(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:f,continuation:{tokenize:c},exit:s}},text:{91:{name:"gfmFootnoteCall",tokenize:l},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:i,resolveTo:a}}}};
|
|
2
|
+
//# sourceMappingURL=syntax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax.js","sources":["../../../../../node_modules/micromark-extension-gfm-footnote/lib/syntax.js"],"sourcesContent":["/**\n * @import {Event, Exiter, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { blankLine } from 'micromark-core-commonmark';\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n};\n\n// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only\n// affects label start (image).\n// That will let us drop `tokenizePotentialGfmFootnote*`.\n// It currently has a `_hiddenFootnoteSupport`, which affects that and more.\n// That can be removed when `micromark-extension-footnote` is archived.\n\n/**\n * Create an extension for `micromark` to enable GFM footnote syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to\n * enable GFM footnote syntax.\n */\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n name: 'gfmFootnoteDefinition',\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n name: 'gfmFootnoteCall',\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n name: 'gfmPotentialFootnoteCall',\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n };\n}\n\n// To do: remove after micromark update.\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {Token} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n const token = self.events[index][1];\n if (token.type === \"labelImage\") {\n labelStart = token;\n break;\n }\n\n // Exit if we’ve walked far enough.\n if (token.type === 'gfmFootnoteCall' || token.type === \"labelLink\" || token.type === \"label\" || token.type === \"image\" || token.type === \"link\") {\n break;\n }\n }\n return start;\n\n /**\n * @type {State}\n */\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code);\n }\n const id = normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n }));\n if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return ok(code);\n }\n}\n\n// To do: remove after micromark update.\n/** @type {Resolver} */\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length;\n /** @type {Token | undefined} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n if (events[index][1].type === \"labelImage\" && events[index][0] === 'enter') {\n labelStart = events[index][1];\n break;\n }\n }\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = \"data\";\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker';\n\n // The whole (without `!`):\n /** @type {Token} */\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n // The `^` marker\n /** @type {Token} */\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n };\n // Increment the end 1 character.\n marker.end.column++;\n marker.end.offset++;\n marker.end._bufferIndex++;\n /** @type {Token} */\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n };\n /** @type {Token} */\n const chunk = {\n type: \"chunkString\",\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n };\n\n /** @type {Array<Event>} */\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1], events[index + 2], ['enter', call, context],\n // The `[`\n events[index + 3], events[index + 4],\n // The `^`.\n ['enter', marker, context], ['exit', marker, context],\n // Everything in between.\n ['enter', string, context], ['enter', chunk, context], ['exit', chunk, context], ['exit', string, context],\n // The ending (`]`, properly parsed and labelled).\n events[events.length - 2], events[events.length - 1], ['exit', call, context]];\n events.splice(index, events.length - index + 1, ...replacement);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n let size = 0;\n /** @type {boolean} */\n let data;\n\n // Note: the implementation of `markdown-rs` is different, because it houses\n // core *and* extensions in one project.\n // Therefore, it can include footnote logic inside `label-end`.\n // We can’t do that, but luckily, we can parse footnotes in a simpler way than\n // needed for labels.\n return start;\n\n /**\n * Start of footnote label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteCall');\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return callStart;\n }\n\n /**\n * After `[`, at `^`.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callStart(code) {\n if (code !== 94) return nok(code);\n effects.enter('gfmFootnoteCallMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallMarker');\n effects.enter('gfmFootnoteCallString');\n effects.enter('chunkString').contentType = 'string';\n return callData;\n }\n\n /**\n * In label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callData(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteCallString');\n if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n effects.exit('gfmFootnoteCall');\n return ok;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? callEscape : callData;\n }\n\n /**\n * On character after escape.\n *\n * ```markdown\n * > | a [^b\\c] d\n * ^\n * ```\n *\n * @type {State}\n */\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return callData;\n }\n return callData(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {string} */\n let identifier;\n let size = 0;\n /** @type {boolean | undefined} */\n let data;\n return start;\n\n /**\n * Start of GFM footnote definition.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true;\n effects.enter('gfmFootnoteDefinitionLabel');\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n return labelAtMarker;\n }\n\n /**\n * In label, at caret.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAtMarker(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionMarker');\n effects.enter('gfmFootnoteDefinitionLabelString');\n effects.enter('chunkString').contentType = 'string';\n return labelInside;\n }\n return nok(code);\n }\n\n /**\n * In label.\n *\n * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote\n * > definition labels.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteDefinitionLabelString');\n identifier = normalizeIdentifier(self.sliceSerialize(token));\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n effects.exit('gfmFootnoteDefinitionLabel');\n return labelAfter;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? labelEscape : labelInside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:\n * > <https://github.com/github/cmark-gfm/issues/240>\n *\n * ```markdown\n * > | [^a\\*b]: c\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return labelInside;\n }\n return labelInside(code);\n }\n\n /**\n * After definition label.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker');\n effects.consume(code);\n effects.exit('definitionMarker');\n if (!defined.includes(identifier)) {\n defined.push(identifier);\n }\n\n // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n return factorySpace(effects, whitespaceAfter, 'gfmFootnoteDefinitionWhitespace');\n }\n return nok(code);\n }\n\n /**\n * After definition prefix.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function whitespaceAfter(code) {\n // `markdown-rs` has a wrapping token for the prefix that is closed here.\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n /// Start of footnote definition continuation.\n ///\n /// ```markdown\n /// | [^a]: b\n /// > | c\n /// ^\n /// ```\n //\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok));\n}\n\n/** @type {Exiter} */\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition');\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this;\n return factorySpace(effects, afterPrefix, 'gfmFootnoteDefinitionIndent', 4 + 1);\n\n /**\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === 'gfmFootnoteDefinitionIndent' && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code);\n }\n}"],"names":["indent","tokenize","effects","ok","nok","self","this","factorySpace","code","tail","events","length","type","sliceSerialize","partial","tokenizePotentialGfmFootnoteCall","index","defined","parser","gfmFootnotes","labelStart","token","_balanced","id","normalizeIdentifier","start","end","now","codePointAt","includes","slice","enter","consume","exit","resolveToPotentialGfmFootnoteCall","context","call","Object","assign","marker","column","offset","_bufferIndex","string","chunk","contentType","replacement","splice","tokenizeGfmFootnoteCall","data","size","callStart","callData","markdownLineEndingOrSpace","callEscape","tokenizeDefinitionStart","identifier","_container","labelAtMarker","labelInside","labelAfter","labelEscape","push","whitespaceAfter","tokenizeDefinitionContinuation","check","blankLine","attempt","gfmFootnoteDefinitionEnd","document","name","continuation","text","add","resolveTo"],"mappings":"mXAQA,MAAMA,EAAS,CACbC,SAgdF,SAAwBC,EAASC,EAAIC,GACnC,MAAMC,EAAOC,KACb,OAAOC,EAAAA,aAAaL,GAKpB,SAAqBM,GACnB,MAAMC,EAAOJ,EAAKK,OAAOL,EAAKK,OAAOC,OAAS,GAC9C,OAAOF,GAAyB,gCAAjBA,EAAK,GAAGG,MAA2F,IAAjDH,EAAK,GAAGI,eAAeJ,EAAK,IAAI,GAAME,OAAeR,EAAGK,GAAQJ,EAAII,EACtI,GARyC,8BAA+B,EAS3E,EA1dEM,SAAS,GAiDX,SAASC,EAAiCb,EAASC,EAAIC,GACrD,MAAMC,EAAOC,KACb,IAAIU,EAAQX,EAAKK,OAAOC,OACxB,MAAMM,EAAUZ,EAAKa,OAAOC,eAAiBd,EAAKa,OAAOC,aAAe,IAExE,IAAIC,EAGJ,KAAOJ,KAAS,CACd,MAAMK,EAAQhB,EAAKK,OAAOM,GAAO,GACjC,GAAmB,eAAfK,EAAMT,KAAuB,CAC/BQ,EAAaC,EACb,KACD,CAGD,GAAmB,oBAAfA,EAAMT,MAA6C,cAAfS,EAAMT,MAAuC,UAAfS,EAAMT,MAAmC,UAAfS,EAAM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K,oCAM3B,OALAuB,EAAahC,EAAAA,oBAAoBnB,EAAKQ,eAAeQ,IACrDnB,EAAQ6B,MAAM,oCACd7B,EAAQ8B,QAAQxB,GAChBN,EAAQ+B,KAAK,oCACb/B,EAAQ+B,KAAK,8BACN2B,CACR,CAMD,OALKP,EAAAA,0BAA0B7C,KAC7ByC,GAAO,GAETC,IACAhD,EAAQ8B,QAAQxB,GACA,KAATA,EAAcqD,EAAcF,CACpC,CAeD,SAASE,EAAYrD,GACnB,OAAa,KAATA,GAAwB,KAATA,GAAwB,KAATA,GAChCN,EAAQ8B,QAAQxB,GAChB0C,IACOS,GAEFA,EAAYnD,EACpB,CAYD,SAASoD,EAAWpD,GAClB,OAAa,KAATA,GACFN,EAAQ6B,MAAM,oBACd7B,EAAQ8B,QAAQxB,GAChBN,EAAQ+B,KAAK,oBACRhB,EAAQY,SAAS2B,IACpBvC,EAAQ6C,KAAKN,GAMRjD,eAAaL,EAAS6D,EAAiB,oCAEzC3D,EAAII,EACZ,CAYD,SAASuD,EAAgBvD,GAEvB,OAAOL,EAAGK,EACX,CACH,CAMA,SAASwD,EAA+B9D,EAASC,EAAIC,GAUnD,OAAOF,EAAQ+D,MAAMC,EAASA,UAAE/D,EAAID,EAAQiE,QAAQnE,EAAQG,EAAIC,GAClE,CAGA,SAASgE,EAAyBlE,GAChCA,EAAQ+B,KAAK,wBACf,qBAzbO,WAEL,MAAO,CACLoC,SAAU,CACR,GAAM,CACJC,KAAM,wBACNrE,SAAUsD,EACVgB,aAAc,CACZtE,SAAU+D,GAEZ/B,KAAMmC,IAGVI,KAAM,CACJ,GAAM,CACJF,KAAM,kBACNrE,SAAU+C,GAEZ,GAAM,CACJsB,KAAM,2BACNG,IAAK,QACLxE,SAAUc,EACV2D,UAAWxC,IAInB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../micromark-util-chunked/index.js"),t=require("../../micromark-util-classify-character/index.js"),r=require("../../micromark-util-resolve-all/index.js");exports.gfmStrikethrough=function(n){let s=(n||{}).singleTilde;const i={name:"strikethrough",tokenize:function(e,r,n){const i=this.previous,o=this.events;let u=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),c(t)};function c(o){const l=t.classifyCharacter(i);if(126===o)return u>1?n(o):(e.consume(o),u++,c);if(u<2&&!s)return n(o);const a=e.exit("strikethroughSequenceTemporary"),h=t.classifyCharacter(o);return a._open=!h||2===h&&Boolean(l),a._close=!l||2===l&&Boolean(h),r(o)}},resolveAll:function(t,n){let s=-1;for(;++s<t.length;)if("enter"===t[s][0]&&"strikethroughSequenceTemporary"===t[s][1].type&&t[s][1]._close){let i=s;for(;i--;)if("exit"===t[i][0]&&"strikethroughSequenceTemporary"===t[i][1].type&&t[i][1]._open&&t[s][1].end.offset-t[s][1].start.offset==t[i][1].end.offset-t[i][1].start.offset){t[s][1].type="strikethroughSequence",t[i][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},t[i][1].start),end:Object.assign({},t[s][1].end)},u={type:"strikethroughText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[s][1].start)},c=[["enter",o,n],["enter",t[i][1],n],["exit",t[i][1],n],["enter",u,n]],l=n.parser.constructs.insideSpan.null;l&&e.splice(c,c.length,0,r.resolveAll(l,t.slice(i+1,s),n)),e.splice(c,c.length,0,[["exit",u,n],["enter",t[s][1],n],["exit",t[s][1],n],["exit",o,n]]),e.splice(t,i-1,s-i+3,c),s=i+c.length-2;break}}s=-1;for(;++s<t.length;)"strikethroughSequenceTemporary"===t[s][1].type&&(t[s][1].type="data");return t}};return null==s&&(s=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}}};
|
|
2
|
+
//# sourceMappingURL=syntax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax.js","sources":["../../../../../node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js"],"sourcesContent":["/**\n * @import {Options} from 'micromark-extension-gfm-strikethrough'\n * @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create an extension for `micromark` to enable GFM strikethrough syntax.\n *\n * @param {Options | null | undefined} [options={}]\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM strikethrough syntax.\n */\nexport function gfmStrikethrough(options) {\n const options_ = options || {};\n let single = options_.singleTilde;\n const tokenizer = {\n name: 'strikethrough',\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n };\n if (single === null || single === undefined) {\n single = true;\n }\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n };\n\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n function resolveAllStrikethrough(events, context) {\n let index = -1;\n\n // Walk through all events.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {\n let open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&\n // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {\n events[index][1].type = 'strikethroughSequence';\n events[open][1].type = 'strikethroughSequence';\n\n /** @type {Token} */\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n };\n\n /** @type {Token} */\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n };\n\n // Opening.\n /** @type {Array<Event>} */\n const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];\n const insideSpan = context.parser.constructs.insideSpan.null;\n if (insideSpan) {\n // Between.\n splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));\n }\n\n // Closing.\n splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - 2;\n break;\n }\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = \"data\";\n }\n }\n return events;\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous;\n const events = this.events;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (previous === 126 && events[events.length - 1][1].type !== \"characterEscape\") {\n return nok(code);\n }\n effects.enter('strikethroughSequenceTemporary');\n return more(code);\n }\n\n /** @type {State} */\n function more(code) {\n const before = classifyCharacter(previous);\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code);\n effects.consume(code);\n size++;\n return more;\n }\n if (size < 2 && !single) return nok(code);\n const token = effects.exit('strikethroughSequenceTemporary');\n const after = classifyCharacter(code);\n token._open = !after || after === 2 && Boolean(before);\n token._close = !before || before === 2 && Boolean(after);\n return ok(code);\n }\n }\n}"],"names":["options","single","singleTilde","tokenizer","name","tokenize","effects","ok","nok","previous","this","events","size","code","length","type","enter","more","before","classifyCharacter","consume","token","exit","after","_open","Boolean","_close","resolveAll","context","index","open","end","offset","start","strikethrough","Object","assign","text","nextEvents","insideSpan","parser","constructs","null","splice","slice","attentionMarkers"],"mappings":"yQAiBO,SAA0BA,GAE/B,IAAIC,GADaD,GAAW,IACNE,YACtB,MAAMC,EAAY,CAChBC,KAAM,gBACNC,SAsFF,SAA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});exports.EditMap=class{constructor(){this.map=[]}add(t,s,e){!function(t,s,e,p){let h=0;if(0===e&&0===p.length)return;for(;h<t.map.length;){if(t.map[h][0]===s)return t.map[h][1]+=e,void t.map[h][2].push(...p);h+=1}t.map.push([s,e,p])}(this,t,s,e)}consume(t){if(this.map.sort((function(t,s){return t[0]-s[0]})),0===this.map.length)return;let s=this.map.length;const e=[];for(;s>0;)s-=1,e.push(t.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),t.length=this.map[s][0];e.push(t.slice()),t.length=0;let p=e.pop();for(;p;){for(const s of p)t.push(s);p=e.pop()}this.map.length=0}};
|
|
2
|
+
//# sourceMappingURL=edit-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-map.js","sources":["../../../../../node_modules/micromark-extension-gfm-table/lib/edit-map.js"],"sourcesContent":["/**\n * @import {Event} from 'micromark-util-types'\n */\n\n// Port of `edit_map.rs` from `markdown-rs`.\n// This should move to `markdown-js` later.\n\n// Deal with several changes in events, batching them together.\n//\n// Preferably, changes should be kept to a minimum.\n// Sometimes, it’s needed to change the list of events, because parsing can be\n// messy, and it helps to expose a cleaner interface of events to the compiler\n// and other users.\n// It can also help to merge many adjacent similar events.\n// And, in other cases, it’s needed to parse subcontent: pass some events\n// through another tokenizer and inject the result.\n\n/**\n * @typedef {[number, number, Array<Event>]} Change\n * @typedef {[number, number, number]} Jump\n */\n\n/**\n * Tracks a bunch of edits.\n */\nexport class EditMap {\n /**\n * Create a new edit map.\n */\n constructor() {\n /**\n * Record of changes.\n *\n * @type {Array<Change>}\n */\n this.map = [];\n }\n\n /**\n * Create an edit: a remove and/or add at a certain place.\n *\n * @param {number} index\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\n add(index, remove, add) {\n addImplementation(this, index, remove, add);\n }\n\n // To do: add this when moving to `micromark`.\n // /**\n // * Create an edit: but insert `add` before existing additions.\n // *\n // * @param {number} index\n // * @param {number} remove\n // * @param {Array<Event>} add\n // * @returns {undefined}\n // */\n // addBefore(index, remove, add) {\n // addImplementation(this, index, remove, add, true)\n // }\n\n /**\n * Done, change the events.\n *\n * @param {Array<Event>} events\n * @returns {undefined}\n */\n consume(events) {\n this.map.sort(function (a, b) {\n return a[0] - b[0];\n });\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (this.map.length === 0) {\n return;\n }\n\n // To do: if links are added in events, like they are in `markdown-rs`,\n // this is needed.\n // // Calculate jumps: where items in the current list move to.\n // /** @type {Array<Jump>} */\n // const jumps = []\n // let index = 0\n // let addAcc = 0\n // let removeAcc = 0\n // while (index < this.map.length) {\n // const [at, remove, add] = this.map[index]\n // removeAcc += remove\n // addAcc += add.length\n // jumps.push([at, removeAcc, addAcc])\n // index += 1\n // }\n //\n // . shiftLinks(events, jumps)\n\n let index = this.map.length;\n /** @type {Array<Array<Event>>} */\n const vecs = [];\n while (index > 0) {\n index -= 1;\n vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);\n\n // Truncate rest.\n events.length = this.map[index][0];\n }\n vecs.push(events.slice());\n events.length = 0;\n let slice = vecs.pop();\n while (slice) {\n for (const element of slice) {\n events.push(element);\n }\n slice = vecs.pop();\n }\n\n // Truncate everything.\n this.map.length = 0;\n }\n}\n\n/**\n * Create an edit.\n *\n * @param {EditMap} editMap\n * @param {number} at\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\nfunction addImplementation(editMap, at, remove, add) {\n let index = 0;\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (remove === 0 && add.length === 0) {\n return;\n }\n while (index < editMap.map.length) {\n if (editMap.map[index][0] === at) {\n editMap.map[index][1] += remove;\n\n // To do: before not used by tables, use when moving to micromark.\n // if (before) {\n // add.push(...editMap.map[index][2])\n // editMap.map[index][2] = add\n // } else {\n editMap.map[index][2].push(...add);\n // }\n\n return;\n }\n index += 1;\n }\n editMap.map.push([at, remove, add]);\n}\n\n// /**\n// * Shift `previous` and `next` links according to `jumps`.\n// *\n// * This fixes links in case there are events removed or added between them.\n// *\n// * @param {Array<Event>} events\n// * @param {Array<Jump>} jumps\n// */\n// function shiftLinks(events, jumps) {\n// let jumpIndex = 0\n// let index = 0\n// let add = 0\n// let rm = 0\n\n// while (index < events.length) {\n// const rmCurr = rm\n\n// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {\n// add = jumps[jumpIndex][2]\n// rm = jumps[jumpIndex][1]\n// jumpIndex += 1\n// }\n\n// // Ignore items that will be removed.\n// if (rm > rmCurr) {\n// index += rm - rmCurr\n// } else {\n// // ?\n// // if let Some(link) = &events[index].link {\n// // if let Some(next) = link.next {\n// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);\n// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {\n// // add = jumps[jumpIndex].2;\n// // rm = jumps[jumpIndex].1;\n// // jumpIndex += 1;\n// // }\n// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);\n// // index = next;\n// // continue;\n// // }\n// // }\n// index += 1\n// }\n// }\n// }"],"names":["constructor","this","map","add","index","remove","editMap","at","length","push","addImplementation","consume","events","sort","a","b","vecs","slice","pop","element"],"mappings":"oFAyBO,MAIL,WAAAA,GAMEC,KAAKC,IAAM,EACZ,CAUD,GAAAC,CAAIC,EAAOC,EAAQF,IAqFrB,SAA2BG,EAASC,EAAIF,EAAQF,GAC9C,IAAIC,EAAQ,EAGZ,GAAe,IAAXC,GAA+B,IAAfF,EAAIK,OACtB,OAEF,KAAOJ,EAAQE,EAAQJ,IAAIM,QAAQ,CACjC,GAAIF,EAAQJ,IAAIE,GAAO,KAAOG,EAW5B,OAVAD,EAAQJ,IAAIE,GAAO,IAAMC,OAOzBC,EAAQJ,IAAIE,GAAO,GAAGK,QAAQN,GAKhCC,GAAS,CACV,CACDE,EAAQJ,IAAIO,KAAK,CAACF,EAAIF,EAAQF,GAChC,CA5GIO,CAAkBT,KAAMG,EAAOC,EAAQF,EACxC,CAqBD,OAAAQ,CAAQC,GAMN,GALAX,KAAKC,IAAIW,MAAK,SAAUC,EAAGC,GACzB,OAAOD,EAAE,GAAKC,EAAE,EACtB,IAG4B,IAApBd,KAAKC,IAAIM,OACX,OAqBF,IAAIJ,EAAQH,KAAKC,IAAIM,OAErB,MAAMQ,EAAO,GACb,KAAOZ,EAAQ,GACbA,GAAS,EACTY,EAAKP,KAAKG,EAAOK,MAAMhB,KAAKC,IAAIE,GAAO,GAAKH,KAAKC,IAAIE,GAAO,IAAKH,KAAKC,IAAIE,GAAO,IAGjFQ,EAAOJ,OAASP,KAAKC,IAAIE,GAAO,GAElCY,EAAKP,KAAKG,EAAOK,SACjBL,EAAOJ,OAAS,EAChB,IAAIS,EAAQD,EAAKE,MACjB,KAAOD,GAAO,CACZ,IAAK,MAAME,KAAWF,EACpBL,EAAOH,KAAKU,GAEdF,EAAQD,EAAKE,KACd,CAGDjB,KAAKC,IAAIM,OAAS,CACnB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.gfmTableAlign=function(e,t){let l=!1;const r=[];for(;t<e.length;){const n=e[t];if(l){if("enter"===n[0])"tableContent"===n[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===n[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===n[1].type)break}else"enter"===n[0]&&"tableDelimiterRow"===n[1].type&&(l=!0);t+=1}return r};
|
|
2
|
+
//# sourceMappingURL=infer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infer.js","sources":["../../../../../node_modules/micromark-extension-gfm-table/lib/infer.js"],"sourcesContent":["/**\n * @import {Event} from 'micromark-util-types'\n */\n\n/**\n * @typedef {'center' | 'left' | 'none' | 'right'} Align\n */\n\n/**\n * Figure out the alignment of a GFM table.\n *\n * @param {Readonly<Array<Event>>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array<Align>}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false;\n /** @type {Array<Align>} */\n const align = [];\n while (index < events.length) {\n const event = events[index];\n if (inDelimiterRow) {\n if (event[0] === 'enter') {\n // Start of alignment value: set a new column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n if (event[1].type === 'tableContent') {\n align.push(events[index + 1][1].type === 'tableDelimiterMarker' ? 'left' : 'none');\n }\n }\n // Exits:\n // End of alignment value: change the column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n else if (event[1].type === 'tableContent') {\n if (events[index - 1][1].type === 'tableDelimiterMarker') {\n const alignIndex = align.length - 1;\n align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right';\n }\n }\n // Done!\n else if (event[1].type === 'tableDelimiterRow') {\n break;\n }\n } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {\n inDelimiterRow = true;\n }\n index += 1;\n }\n return align;\n}"],"names":["events","index","inDelimiterRow","align","length","event","type","push","alignIndex"],"mappings":"0FAkBO,SAAuBA,EAAQC,GACpC,IAAIC,GAAiB,EAErB,MAAMC,EAAQ,GACd,KAAOF,EAAQD,EAAOI,QAAQ,CAC5B,MAAMC,EAAQL,EAAOC,GACrB,GAAIC,GACF,GAAiB,UAAbG,EAAM,GAGc,iBAAlBA,EAAM,GAAGC,MACXH,EAAMI,KAAmC,yBAA9BP,EAAOC,EAAQ,GAAG,GAAGK,KAAkC,OAAS,aAM1E,GAAsB,iBAAlBD,EAAM,GAAGC,MAChB,GAAkC,yBAA9BN,EAAOC,EAAQ,GAAG,GAAGK,KAAiC,CACxD,MAAME,EAAaL,EAAMC,OAAS,EAClCD,EAAMK,GAAoC,SAAtBL,EAAMK,GAAyB,SAAW,OAC/D,OAGE,GAAsB,sBAAlBH,EAAM,GAAGC,KAChB,UAEoB,UAAbD,EAAM,IAAoC,sBAAlBA,EAAM,GAAGC,OAC1CJ,GAAiB,GAEnBD,GAAS,CACV,CACD,OAAOE,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../micromark-factory-space/index.js"),t=require("../../micromark-util-character/index.js"),n=require("./edit-map.js"),r=require("./infer.js");function i(n,r,i){const a=this;let l,o=0,c=0;return function(e){let t=a.events.length-1;for(;t>-1;){const e=a.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const n=t>-1?a.events[t][1].type:null,r="tableHead"===n||"tableRow"===n?k:s;if(r===k&&a.parser.lazy[a.now().line])return i(e);return r(e)};function s(e){return n.enter("tableHead"),n.enter("tableRow"),function(e){if(124===e)return d(e);return l=!0,c+=1,d(e)}(e)}function d(r){return null===r?i(r):t.markdownLineEnding(r)?c>1?(c=0,a.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),p):i(r):t.markdownSpace(r)?e.factorySpace(n,d,"whitespace")(r):(c+=1,l&&(l=!1,o+=1),124===r?(n.enter("tableCellDivider"),n.consume(r),n.exit("tableCellDivider"),l=!0,d):(n.enter("data"),u(r)))}function u(e){return null===e||124===e||t.markdownLineEndingOrSpace(e)?(n.exit("data"),d(e)):(n.consume(e),92===e?b:u)}function b(e){return 92===e||124===e?(n.consume(e),u):u(e)}function p(r){return a.interrupt=!1,a.parser.lazy[a.now().line]?i(r):(n.enter("tableDelimiterRow"),l=!1,t.markdownSpace(r)?e.factorySpace(n,m,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):m(r))}function m(e){return 45===e||58===e?y(e):124===e?(l=!0,n.enter("tableCellDivider"),n.consume(e),n.exit("tableCellDivider"),f):D(e)}function f(r){return t.markdownSpace(r)?e.factorySpace(n,y,"whitespace")(r):y(r)}function y(e){return 58===e?(c+=1,l=!0,n.enter("tableDelimiterMarker"),n.consume(e),n.exit("tableDelimiterMarker"),v):45===e?(c+=1,v(e)):null===e||t.markdownLineEnding(e)?x(e):D(e)}function v(e){return 45===e?(n.enter("tableDelimiterFiller"),w(e)):D(e)}function w(e){return 45===e?(n.consume(e),w):58===e?(l=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(e),n.exit("tableDelimiterMarker"),g):(n.exit("tableDelimiterFiller"),g(e))}function g(r){return t.markdownSpace(r)?e.factorySpace(n,x,"whitespace")(r):x(r)}function x(e){return 124===e?m(e):(null===e||t.markdownLineEnding(e))&&l&&o===c?(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(e)):D(e)}function D(e){return i(e)}function k(e){return n.enter("tableRow"),j(e)}function j(i){return 124===i?(n.enter("tableCellDivider"),n.consume(i),n.exit("tableCellDivider"),j):null===i||t.markdownLineEnding(i)?(n.exit("tableRow"),r(i)):t.markdownSpace(i)?e.factorySpace(n,j,"whitespace")(i):(n.enter("data"),O(i))}function O(e){return null===e||124===e||t.markdownLineEndingOrSpace(e)?(n.exit("data"),j(e)):(n.consume(e),92===e?h:O)}function h(e){return 92===e||124===e?(n.consume(e),O):O(e)}}function a(e,t){let i,a,c,s=-1,d=!0,u=0,b=[0,0,0,0],p=[0,0,0,0],m=!1,f=0;const y=new n.EditMap;for(;++s<e.length;){const n=e[s],r=n[1];"enter"===n[0]?"tableHead"===r.type?(m=!1,0!==f&&(o(y,t,f,i,a),a=void 0,f=0),i={type:"table",start:Object.assign({},r.start),end:Object.assign({},r.end)},y.add(s,0,[["enter",i,t]])):"tableRow"===r.type||"tableDelimiterRow"===r.type?(d=!0,c=void 0,b=[0,0,0,0],p=[0,s+1,0,0],m&&(m=!1,a={type:"tableBody",start:Object.assign({},r.start),end:Object.assign({},r.end)},y.add(s,0,[["enter",a,t]])),u="tableDelimiterRow"===r.type?2:a?3:1):!u||"data"!==r.type&&"tableDelimiterMarker"!==r.type&&"tableDelimiterFiller"!==r.type?"tableCellDivider"===r.type&&(d?d=!1:(0!==b[1]&&(p[0]=p[1],c=l(y,t,b,u,void 0,c)),b=p,p=[b[1],s,0,0])):(d=!1,0===p[2]&&(0!==b[1]&&(p[0]=p[1],c=l(y,t,b,u,void 0,c),b=[0,0,0,0]),p[2]=s)):"tableHead"===r.type?(m=!0,f=s):"tableRow"===r.type||"tableDelimiterRow"===r.type?(f=s,0!==b[1]?(p[0]=p[1],c=l(y,t,b,u,s,c)):0!==p[1]&&(c=l(y,t,p,u,s,c)),u=0):!u||"data"!==r.type&&"tableDelimiterMarker"!==r.type&&"tableDelimiterFiller"!==r.type||(p[3]=s)}for(0!==f&&o(y,t,f,i,a),y.consume(t.events),s=-1;++s<t.events.length;){const e=t.events[s];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=r.gfmTableAlign(t.events,s))}return e}function l(e,t,n,r,i,a){const l=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},c(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=c(t.events,n[1]);if(a={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const i=c(t.events,n[2]),a=c(t.events,n[3]),l={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==i&&(a.end=Object.assign({},c(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function o(e,t,n,r,i){const a=[],l=c(t.events,n);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function c(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}exports.gfmTable=function(){return{flow:{null:{name:"table",tokenize:i,resolveAll:a}}}};
|
|
2
|
+
//# sourceMappingURL=syntax.js.map
|