stream-markdown-parser 0.0.93 → 0.0.95
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -16
- package/dist/index.js.map +1 -1
- package/package.json +14 -12
package/dist/index.d.ts
CHANGED
|
@@ -428,10 +428,10 @@ interface HtmlToken {
|
|
|
428
428
|
declare const SAFE_ALLOWED_HTML_TAGS: Set<string>;
|
|
429
429
|
declare function isHtmlTagBlocked(tagName: string | undefined, policy?: HtmlPolicy): boolean;
|
|
430
430
|
declare function isHtmlTagHardBlocked(tagName: string | undefined, policy?: HtmlPolicy): boolean;
|
|
431
|
-
declare function isCustomHtmlComponentTag(tagName: string, customComponents: Record<string, unknown>):
|
|
431
|
+
declare function isCustomHtmlComponentTag(tagName: string, customComponents: Record<string, unknown>): any;
|
|
432
432
|
declare function sanitizeHtmlAttrs(attrs: Record<string, string>, policy?: HtmlPolicy, tagName?: string): Record<string, string>;
|
|
433
433
|
declare function tokenAttrsToRecord(attrs?: Array<[string, string | null]> | null): Record<string, string>;
|
|
434
|
-
declare function sanitizeHtmlTokenAttrs(attrs?: Array<[string, string | null]> | null, policy?: HtmlPolicy, tagName?: string): [string, string][]
|
|
434
|
+
declare function sanitizeHtmlTokenAttrs(attrs?: Array<[string, string | null]> | null, policy?: HtmlPolicy, tagName?: string): [string, string][];
|
|
435
435
|
declare function convertHtmlPropValue(value: string, key: string): HtmlPropValue;
|
|
436
436
|
declare function convertHtmlAttrsToProps(attrs: Record<string, string>): Record<string, HtmlPropValue>;
|
|
437
437
|
declare function tokenizeHtml(html: string): HtmlToken[];
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/factory.ts","../src/types.ts","../src/parser/inline-parsers/index.ts","../src/parser/index.ts","../src/config.ts","../src/customHtmlTags.ts","../src/findMatchingClose.ts","../src/htmlRenderUtils.ts","../src/htmlTags.ts","../src/parser/inline-parsers/fence-parser.ts","../src/plugins/containers.ts","../src/plugins/isMathLike.ts","../src/plugins/math.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;UAaiB,cAAA,SAAuB;sBAClB;;EADL,gBAAA,CAAe,EAAA,OAAA;;;;ECXf,CAAA;EAaL;AAEZ;AAMA;;EAKY,cAAA,CAAA,EAAA,SAAA,MAAA,EAAA;EALyB;;AAQrC;AAMA;EAMiB,0BAKR,CAAA,EAAA,OAAA;AAGT;;;UAjDiB,QAAA;;EDWA,GAAA,EAAA,MAAA;;;;ACXjB;AAaA;AAEA;AAMA;;;AAAqC,KARzB,WAAA,GAAc,QAQW,GARA,MAQA,CAAA,MAAA,EAAA,OAAA,CAAA;AAAQ,UAN5B,QAAA,SAAiB,QAMW,CAAA;EAQ5B,IAAA,EAAA,MAAA;EAMA,OAAA,EAAA,MAAW;EAMX,MAAA,CAAA,EAAA,OAAS;AAQ1B;AAKiB,UAjCA,WAAA,SAAoB,QAiCU,CAAA;EAiB9B,IAAA,EAAA,SAAA;EAQA,KAAA,EAAA,MAAA;EAYL,IAAA,EAAA,MAAA;EAYK,KAAA,CAAA,EA9EP,MA8EO,CAAA,MAAA,EAAoB,MAAA,GAAA,OAAA,CAAA;EAK3B,QAAA,EAlFE,UAkFF,EAAA;;AALmC,UA1E5B,aAAA,SAAsB,QA0EM,CAAA;EAAQ,IAAA,EAAA,WAAA;EAUpC,QAAA,EAlFL,UAkFoB,EAAA;EAKf,aAAS,CAAA,EAAA,OAMd;AAGZ;AAOiB,UAnGA,UAAA,SAAmB,QAmGO,CAAQ;EAIlC,IAAA,EAAA,QAAA;EASL,QAAA,EA9GA,UA8Gc,EAAA;EAST,OAAA,CAAA,EAAA,MAAA;AAKjB;AAEU,UA1HO,QAAA,SAAiB,QA0HxB,CAAA;EACF,IAAA,EAAA,MAAA;EAH2B,OAAA,EAAA,OAAA;EAAQ,KAAA,CAAA,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MAAA,CAAA;AAQ5B,cOoKJ,iBPlKD,EOkKkB,GPlKlB,CAF2B,MAAA,CAAA;AAMtB,cO+JJ,yBP/JuB,EO+JE,GP/JM,CAAA,MAAA,CAAA;AAM3B,iBO2JD,6BAAA,CP3J0B,KAAA,EAAA,MAAA,CAAA,EAAA,MAAA;AAQzB,iBOgKD,eAAA,CP9JJ,KAF0B,EAAA,MAAQ,CAAA,EAAA,OAAA;;;iBQuB9B,eAAA,QAAuB,gBAAgB;;;iBCwDvC,eAAA,KAAoB;;;cClIvB;cAoBA;iBAsCG,UAAA;;;cCrBH;iBAyKG,6BAAA,mBAAgD;iBAoPhD,SAAA,KAAc,yBAAuB;;;AZrbpC,KaOL,0BAAA,GAA6B,gBbPK,GAAA,SAAA,CaOwB,gBbPxB,EAAA,GAAA,OAAA,EAAA,CAAA;iBaW9B,sBAAA,SAA+B;iBAI/B,8BAAA,CAAA;AZ4BC,UYFA,kBAAA,SAA2B,cZEG,CAAA;EAiB9B,MAAA,CAAA,EYlBN,0BZuBE,EAAA;EAGI,KAAA,CAAA,EYzBP,KZyBO,CAAA,CAAA,EAAe,EYzBX,UZ6BT,EAAA,GAAA,IAAA,CAAA;EAQA;AAYZ;;;EAA6C,IAAA,CAAA,EAAA,CAAA,CAAA,GAAA,EAAA,MAAA,EAAA,GAAA,MAAA,CAAA,GY5CR,MZ4CQ,CAAA,MAAA,EAAA,MAAA,CAAA;;AAU5B,iBYnDD,WAAA,CZmDwB,KAAQ,CAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EYnD6B,kBZmD7B,CAAA,EYnDoD,UZmDpD"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["FactoryOptions","Record","factory","markdown_it_ts0","MarkdownIt","MarkdownIt","Token","BaseNode","UnknownNode","Record","TextNode","HeadingNode","ParsedNode","ParagraphNode","InlineNode","ListNode","ListItemNode","CodeBlockNode","HtmlBlockNode","HtmlInlineNode","CustomComponentAttrs","Array","CustomComponentNode","InlineCodeNode","LinkNode","ImageNode","ThematicBreakNode","MermaidBlockNode","MarkdownRender","BlockquoteNode","TableNode","TableRowNode","TableCellNode","DefinitionListNode","DefinitionItemNode","FootnoteNode","FootnoteReferenceNode","FootnoteAnchorNode","AdmonitionNode","VmrContainerNode","StrongNode","EmphasisNode","StrikethroughNode","HighlightNode","InsertNode","SubscriptNode","SuperscriptNode","CheckboxNode","CheckboxInputNode","EmojiNode","HardBreakNode","MathInlineNode","MathBlockNode","ReferenceNode","MarkdownTokenMeta","MarkdownTokenBase","Omit","MarkdownToken","MarkdownTokenLite","CustomComponents","TransformTokensHook","ParseOptions","InternalParseOptions","PostTransformNodesHook","MarkdownToken","ParsedNode","ParseOptions","isLikelyUrl","parseInlineTokens","MarkdownIt","MarkdownToken","ParsedNode","ParseOptions","parseInlineTokens","buildAllowedHtmlTagSet","Set","parseMarkdownToStructure","processTokens","MathOptions","setDefaultMathOptions","getDefaultMathOptions","isHtmlLikeTagName","normalizeCustomHtmlTagName","normalizeCustomHtmlTags","mergeCustomHtmlTags","Array","resolveCustomHtmlTags","getHtmlTagFromContent","hasCompleteHtmlTagContent","shouldRenderUnknownHtmlTagAsText","stripCustomHtmlWrapper","findMatchingClose","default","HtmlPolicy","HtmlPropValue","HtmlToken","Record","SAFE_ALLOWED_HTML_TAGS","Set","isHtmlTagBlocked","isHtmlTagHardBlocked","isCustomHtmlComponentTag","sanitizeHtmlAttrs","tokenAttrsToRecord","Array","sanitizeHtmlTokenAttrs","convertHtmlPropValue","convertHtmlAttrsToProps","tokenizeHtml","hasCustomHtmlComponents","sanitizeHtmlContent","VOID_HTML_TAG_NAMES","INLINE_HTML_TAG_NAMES","BLOCK_HTML_TAG_NAMES","SVG_HTML_TAG_NAMES","EXTENDED_STANDARD_HTML_TAG_NAMES","DANGEROUS_HTML_ATTR_NAMES","URL_HTML_ATTR_NAMES","BLOCKED_HTML_TAG_NAMES","NON_STRUCTURING_HTML_TAG_NAMES","VOID_HTML_TAGS","Set","STANDARD_BLOCK_HTML_TAGS","STANDARD_HTML_TAGS","EXTENDED_STANDARD_HTML_TAGS","DANGEROUS_HTML_ATTRS","URL_HTML_ATTRS","BLOCKED_HTML_TAGS","NON_STRUCTURING_HTML_TAGS","stripHtmlControlAndWhitespace","isUnsafeHtmlUrl","TEX_BRACE_COMMANDS","ESCAPED_TEX_BRACE_COMMANDS","isMathLike","MarkdownIt","MathOptions","KATEX_COMMANDS","ESCAPED_KATEX_COMMANDS","ESCAPED_MKATWX_COMMANDS","RegExp","normalizeStandaloneBackslashT","applyMath"],"sources":["../src/factory.d.ts","../src/types.d.ts","../src/parser/inline-parsers/index.d.ts","../src/parser/index.d.ts","../src/config.d.ts","../src/customHtmlTags.d.ts","../src/findMatchingClose.d.ts","../src/htmlRenderUtils.d.ts","../src/htmlTags.d.ts","../src/parser/inline-parsers/fence-parser.ts","../src/plugins/containers.ts","../src/plugins/isMathLike.d.ts","../src/plugins/math.d.ts","../src/index.ts"],"sourcesContent":["export interface FactoryOptions extends Record<string, unknown> {\n markdownItOptions?: Record<string, unknown>;\n enableMath?: boolean;\n enableContainers?: boolean;\n mathOptions?: {\n commands?: string[];\n escapeExclamation?: boolean;\n };\n /**\n * Custom HTML-like tag names that should participate in streaming mid-state\n * suppression and be emitted as custom nodes (e.g. ['thinking']).\n */\n customHtmlTags?: readonly string[];\n /**\n * Whether to enable the fix for indented code blocks that should be paragraphs.\n * Default: true\n */\n enableFixIndentedCodeBlock?: boolean;\n}\nexport declare function factory(opts?: FactoryOptions): import(\"markdown-it-ts\").MarkdownIt;\n","import type { MarkdownIt, Token } from 'markdown-it-ts';\nexport interface BaseNode {\n type: string;\n raw: string;\n loading?: boolean;\n code?: string;\n diff?: boolean;\n}\n/**\n * A catch‑all node type for user extensions.\n * Must still satisfy the renderer contract (`type` + `raw`), but may carry\n * arbitrary extra fields.\n */\nexport type UnknownNode = BaseNode & Record<string, unknown>;\nexport interface TextNode extends BaseNode {\n type: 'text';\n content: string;\n center?: boolean;\n}\nexport interface HeadingNode extends BaseNode {\n type: 'heading';\n level: number;\n text: string;\n attrs?: Record<string, string | boolean>;\n children: ParsedNode[];\n}\nexport interface ParagraphNode extends BaseNode {\n type: 'paragraph';\n children: ParsedNode[];\n maybeCheckbox?: boolean;\n}\nexport interface InlineNode extends BaseNode {\n type: 'inline';\n children: ParsedNode[];\n content?: string;\n}\nexport interface ListNode extends BaseNode {\n type: 'list';\n ordered: boolean;\n start?: number;\n items: ListItemNode[];\n}\nexport interface ListItemNode extends BaseNode {\n type: 'list_item';\n children: ParsedNode[];\n}\nexport interface CodeBlockNode extends BaseNode {\n type: 'code_block';\n language: string;\n code: string;\n startLine?: number;\n endLine?: number;\n loading?: boolean;\n diff?: boolean;\n originalCode?: string;\n updatedCode?: string;\n raw: string;\n}\nexport interface HtmlBlockNode extends BaseNode {\n type: 'html_block';\n attrs?: [string, string][] | null;\n tag: string;\n content: string;\n children?: ParsedNode[];\n}\nexport interface HtmlInlineNode extends BaseNode {\n type: 'html_inline';\n tag?: string;\n content: string;\n children: ParsedNode[];\n /**\n * True when the parser auto-appended a closing tag for streaming stability.\n * The original source is still incomplete (no explicit close typed yet).\n */\n autoClosed?: boolean;\n}\nexport type CustomComponentAttrs = [string, string][] | Record<string, string | boolean> | Array<{\n name: string;\n value: string | boolean;\n}> | null;\n/**\n * A generic node shape for custom HTML-like components.\n * When a tag name is included in `customHtmlTags`, the parser emits a node\n * whose `type` equals that tag name and carries the raw HTML `content`\n * plus extracted `attrs` from user transforms.\n */\nexport interface CustomComponentNode extends BaseNode {\n /** The custom tag name (same as `tag`) */\n type: string;\n tag: string;\n content: string;\n attrs?: CustomComponentAttrs;\n children?: ParsedNode[];\n autoClosed?: boolean;\n}\nexport interface InlineCodeNode extends BaseNode {\n type: 'inline_code';\n code: string;\n}\nexport interface LinkNode extends BaseNode {\n type: 'link';\n href: string;\n title: string | null;\n text: string;\n attrs?: [string, string][];\n children: ParsedNode[];\n}\nexport interface ImageNode extends BaseNode {\n type: 'image';\n src: string;\n alt: string;\n title: string | null;\n}\nexport interface ThematicBreakNode extends BaseNode {\n type: 'thematic_break';\n}\nexport interface MermaidBlockNode {\n node: {\n type: 'code_block';\n language: string;\n code: string;\n loading?: boolean;\n };\n}\nexport type MarkdownRender = {\n content: string;\n nodes?: undefined;\n} | {\n content?: undefined;\n nodes: BaseNode[];\n};\nexport interface BlockquoteNode extends BaseNode {\n type: 'blockquote';\n children: ParsedNode[];\n}\nexport interface TableNode extends BaseNode {\n type: 'table';\n header: TableRowNode;\n rows: TableRowNode[];\n}\nexport interface TableRowNode extends BaseNode {\n type: 'table_row';\n cells: TableCellNode[];\n}\nexport interface TableCellNode extends BaseNode {\n type: 'table_cell';\n header: boolean;\n children: ParsedNode[];\n align?: 'left' | 'right' | 'center';\n}\nexport interface DefinitionListNode extends BaseNode {\n type: 'definition_list';\n items: DefinitionItemNode[];\n}\nexport interface DefinitionItemNode extends BaseNode {\n type: 'definition_item';\n term: ParsedNode[];\n definition: ParsedNode[];\n}\nexport interface FootnoteNode extends BaseNode {\n type: 'footnote';\n id: string;\n children: ParsedNode[];\n}\nexport interface FootnoteReferenceNode extends BaseNode {\n type: 'footnote_reference';\n id: string;\n}\nexport interface FootnoteAnchorNode extends BaseNode {\n type: 'footnote_anchor';\n id: string;\n}\nexport interface AdmonitionNode extends BaseNode {\n type: 'admonition';\n kind: string;\n title: string;\n children: ParsedNode[];\n}\nexport interface VmrContainerNode extends BaseNode {\n type: 'vmr_container';\n name: string;\n /** True while the opening `:::` has been seen but the closing `:::` hasn't (streaming mid-state). */\n loading?: boolean;\n attrs?: Record<string, string>;\n children: ParsedNode[];\n}\nexport interface StrongNode extends BaseNode {\n type: 'strong';\n children: ParsedNode[];\n}\nexport interface EmphasisNode extends BaseNode {\n type: 'emphasis';\n children: ParsedNode[];\n}\nexport interface StrikethroughNode extends BaseNode {\n type: 'strikethrough';\n children: ParsedNode[];\n}\nexport interface HighlightNode extends BaseNode {\n type: 'highlight';\n children: ParsedNode[];\n}\nexport interface InsertNode extends BaseNode {\n type: 'insert';\n children: ParsedNode[];\n}\nexport interface SubscriptNode extends BaseNode {\n type: 'subscript';\n children: ParsedNode[];\n}\nexport interface SuperscriptNode extends BaseNode {\n type: 'superscript';\n children: ParsedNode[];\n}\nexport interface CheckboxNode extends BaseNode {\n type: 'checkbox';\n checked: boolean;\n}\nexport interface CheckboxInputNode extends BaseNode {\n type: 'checkbox_input';\n checked: boolean;\n}\nexport interface EmojiNode extends BaseNode {\n type: 'emoji';\n name: string;\n markup: string;\n}\nexport interface HardBreakNode extends BaseNode {\n type: 'hardbreak';\n}\nexport interface MathInlineNode extends BaseNode {\n type: 'math_inline';\n content: string;\n markup?: string;\n}\nexport interface MathBlockNode extends BaseNode {\n type: 'math_block';\n content: string;\n markup?: string;\n}\nexport interface ReferenceNode extends BaseNode {\n type: 'reference';\n id: string;\n}\nexport type MarkdownTokenMeta = Record<string, unknown>;\ntype MarkdownTokenBase = Omit<Token, 'children' | 'meta'> & {\n children?: MarkdownToken[] | null;\n loading?: boolean;\n mark?: string;\n meta?: MarkdownTokenMeta | null;\n raw?: string;\n};\nexport interface MarkdownTokenLite {\n type: string;\n tag?: string;\n content?: string;\n info?: string;\n mark?: string;\n markup?: string;\n meta?: MarkdownTokenMeta | null;\n map?: [number, number] | number[] | null;\n block?: boolean;\n hidden?: boolean;\n attrs?: [string, string][] | null;\n nesting?: number;\n level?: number;\n children?: MarkdownToken[] | null;\n loading?: boolean;\n raw?: string;\n}\nexport type MarkdownToken = MarkdownTokenBase | MarkdownTokenLite;\nexport type ParsedNode = TextNode | HeadingNode | ParagraphNode | ListNode | ListItemNode | CodeBlockNode | InlineCodeNode | LinkNode | ImageNode | ThematicBreakNode | BlockquoteNode | TableNode | TableRowNode | TableCellNode | StrongNode | EmphasisNode | StrikethroughNode | HighlightNode | InsertNode | SubscriptNode | SuperscriptNode | CheckboxNode | CheckboxInputNode | EmojiNode | DefinitionListNode | DefinitionItemNode | FootnoteNode | FootnoteReferenceNode | AdmonitionNode | VmrContainerNode | HardBreakNode | MathInlineNode | MathBlockNode | ReferenceNode | HtmlBlockNode | HtmlInlineNode | CustomComponentNode | UnknownNode;\nexport interface CustomComponents {\n text: unknown;\n paragraph: unknown;\n heading: unknown;\n code_block: unknown;\n list: unknown;\n blockquote: unknown;\n table: unknown;\n definition_list: unknown;\n footnote: unknown;\n footnote_reference: unknown;\n admonition: unknown;\n hardbreak: unknown;\n link: unknown;\n image: unknown;\n thematic_break: unknown;\n math_inline: unknown;\n math_block: unknown;\n strong: unknown;\n emphasis: unknown;\n strikethrough: unknown;\n highlight: unknown;\n insert: unknown;\n subscript: unknown;\n superscript: unknown;\n emoji: unknown;\n checkbox: unknown;\n inline_code: unknown;\n html_inline: unknown;\n reference: unknown;\n mermaid: unknown;\n [key: string]: unknown;\n}\nexport type TransformTokensHook = (tokens: MarkdownToken[]) => MarkdownToken[];\nexport interface ParseOptions {\n preTransformTokens?: TransformTokensHook;\n postTransformTokens?: TransformTokensHook;\n requireClosingStrong?: boolean;\n /**\n * When true, indicates the input buffer is complete (end-of-stream).\n * This disables \"mid-state\" streaming behavior (e.g. unclosed math/link/code\n * tokens staying in a loading state) and keeps trailing markers as literal text.\n */\n final?: boolean;\n /**\n * Custom HTML-like tag names that should be emitted as custom nodes\n * instead of `html_inline` when encountered (e.g. ['thinking']).\n * Used by inline parsing; pair with `getMarkdown({ customHtmlTags })`\n * to enable mid-state suppression for the same tags during streaming.\n */\n customHtmlTags?: readonly string[];\n /**\n * If provided, link nodes are only emitted when this returns true for the href.\n * When it returns false, the link is rendered as plain text (the link text only).\n * Typically set from the MarkdownIt instance (e.g. md.options.validateLink or\n * md.set({ validateLink })) so that unsafe URLs (e.g. javascript:) are not\n * output as links.\n */\n validateLink?: (url: string) => boolean;\n debug?: boolean;\n}\nexport interface InternalParseOptions extends ParseOptions {\n __customHtmlBlockCursor?: number;\n __insideStrong?: boolean;\n __markdownIt?: MarkdownIt;\n __sourceMarkdown?: string;\n}\nexport type PostTransformNodesHook = (nodes: ParsedNode[]) => ParsedNode[];\nexport {};\n","import type { MarkdownToken, ParsedNode, ParseOptions } from '../../types';\nexport declare function isLikelyUrl(href?: string): boolean;\nexport declare function parseInlineTokens(tokens: MarkdownToken[], raw?: string, pPreToken?: MarkdownToken, options?: ParseOptions): ParsedNode[];\n","import type { MarkdownIt } from 'markdown-it-ts';\nimport type { MarkdownToken, ParsedNode, ParseOptions } from '../types';\nimport { parseInlineTokens } from './inline-parsers';\nexport declare function buildAllowedHtmlTagSet(options?: ParseOptions): Set<string>;\nexport declare function parseMarkdownToStructure(markdown: string, md: MarkdownIt, options?: ParseOptions): ParsedNode[];\nexport declare function processTokens(tokens: MarkdownToken[], options?: ParseOptions): ParsedNode[];\nexport { parseInlineTokens };\n","/**\n * MathOptions control how the math plugin normalizes content before\n * handing it to KaTeX (or other math renderers).\n *\n * - commands: list of command words that should be auto-prefixed with a\n * backslash if not already escaped (e.g. 'infty' -> '\\\\infty'). Use a\n * conservative list to avoid false positives in prose.\n * - escapeExclamation: whether to escape standalone '!' to '\\\\!' (default true).\n */\nexport interface MathOptions {\n /** List of command words to auto-escape. */\n commands?: readonly string[];\n /** Whether to escape standalone '!' (default: true). */\n escapeExclamation?: boolean;\n /**\n * Strict delimiter mode.\n * - When true, only explicit TeX delimiters are recognized as math:\n * inline: `$...$` and `\\\\(...\\\\)`; block: `$$...$$` and `\\\\[...\\\\]`.\n *\n * Important: authors should write explicit TeX delimiters with escaped\n * backslashes in source (for example, write `\\\\(...\\\\)` rather than\n * an unescaped `\\(...\\)`). Unescaped `\\(...\\)` cannot be reliably\n * distinguished from ordinary parentheses and may not be parsed as math.\n * - Heuristics and mid-state (unclosed) math detection are disabled.\n */\n strictDelimiters?: boolean;\n}\nexport declare function setDefaultMathOptions(opts: MathOptions | undefined): void;\nexport declare function getDefaultMathOptions(): MathOptions | undefined;\n","export declare function isHtmlLikeTagName(tag: string): boolean;\nexport declare function normalizeCustomHtmlTagName(value: unknown): string;\nexport declare function normalizeCustomHtmlTags(tags?: readonly string[]): string[];\nexport declare function mergeCustomHtmlTags(...lists: Array<readonly string[] | undefined>): string[];\nexport declare function resolveCustomHtmlTags(tags?: readonly string[]): {\n key: string;\n tags: string[];\n};\nexport declare function getHtmlTagFromContent(html: unknown): string;\nexport declare function hasCompleteHtmlTagContent(html: unknown, tag: string): boolean;\nexport declare function shouldRenderUnknownHtmlTagAsText(html: unknown, tag: string): boolean;\nexport declare function stripCustomHtmlWrapper(html: unknown, tag: string): string;\n","export declare function findMatchingClose(src: string, startIdx: number, open: string, close: string): number;\nexport default findMatchingClose;\n","export type HtmlPolicy = 'escape' | 'safe' | 'trusted';\nexport type HtmlPropValue = string | number | boolean;\nexport interface HtmlToken {\n type: 'text' | 'tag_open' | 'tag_close' | 'self_closing';\n tagName?: string;\n attrs?: Record<string, string>;\n content?: string;\n}\nexport declare const SAFE_ALLOWED_HTML_TAGS: Set<string>;\nexport declare function isHtmlTagBlocked(tagName: string | undefined, policy?: HtmlPolicy): boolean;\nexport declare function isHtmlTagHardBlocked(tagName: string | undefined, policy?: HtmlPolicy): boolean;\nexport declare function isCustomHtmlComponentTag(tagName: string, customComponents: Record<string, unknown>): any;\nexport declare function sanitizeHtmlAttrs(attrs: Record<string, string>, policy?: HtmlPolicy, tagName?: string): Record<string, string>;\nexport declare function tokenAttrsToRecord(attrs?: Array<[string, string | null]> | null): Record<string, string>;\nexport declare function sanitizeHtmlTokenAttrs(attrs?: Array<[string, string | null]> | null, policy?: HtmlPolicy, tagName?: string): [string, string][];\nexport declare function convertHtmlPropValue(value: string, key: string): HtmlPropValue;\nexport declare function convertHtmlAttrsToProps(attrs: Record<string, string>): Record<string, HtmlPropValue>;\nexport declare function tokenizeHtml(html: string): HtmlToken[];\nexport declare function hasCustomHtmlComponents(content: string, customComponents: Record<string, unknown>): boolean;\nexport declare function sanitizeHtmlContent(content: string, policy?: HtmlPolicy): string;\n","export declare const VOID_HTML_TAG_NAMES: readonly [\"area\", \"base\", \"br\", \"col\", \"embed\", \"hr\", \"img\", \"input\", \"link\", \"meta\", \"param\", \"source\", \"track\", \"wbr\"];\nexport declare const INLINE_HTML_TAG_NAMES: readonly [\"a\", \"abbr\", \"b\", \"bdi\", \"bdo\", \"button\", \"cite\", \"code\", \"data\", \"del\", \"dfn\", \"em\", \"font\", \"i\", \"ins\", \"kbd\", \"label\", \"mark\", \"q\", \"s\", \"samp\", \"small\", \"span\", \"strong\", \"sub\", \"sup\", \"time\", \"u\", \"var\"];\nexport declare const BLOCK_HTML_TAG_NAMES: readonly [\"article\", \"aside\", \"blockquote\", \"details\", \"div\", \"figcaption\", \"figure\", \"footer\", \"header\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"li\", \"main\", \"nav\", \"ol\", \"p\", \"pre\", \"section\", \"summary\", \"table\", \"tbody\", \"td\", \"th\", \"thead\", \"tr\", \"ul\"];\nexport declare const SVG_HTML_TAG_NAMES: readonly [\"svg\", \"g\", \"path\"];\nexport declare const EXTENDED_STANDARD_HTML_TAG_NAMES: readonly [\"address\", \"audio\", \"body\", \"canvas\", \"caption\", \"colgroup\", \"datalist\", \"dd\", \"dialog\", \"dl\", \"dt\", \"fieldset\", \"form\", \"head\", \"hgroup\", \"html\", \"iframe\", \"legend\", \"map\", \"menu\", \"meter\", \"noscript\", \"object\", \"optgroup\", \"option\", \"output\", \"picture\", \"progress\", \"rp\", \"rt\", \"ruby\", \"script\", \"select\", \"style\", \"template\", \"textarea\", \"tfoot\", \"title\", \"video\"];\nexport declare const DANGEROUS_HTML_ATTR_NAMES: readonly [\"onclick\", \"onerror\", \"onload\", \"onmouseover\", \"onmouseout\", \"onmousedown\", \"onmouseup\", \"onkeydown\", \"onkeyup\", \"onfocus\", \"onblur\", \"onsubmit\", \"onreset\", \"onchange\", \"onselect\", \"ondblclick\", \"ontouchstart\", \"ontouchend\", \"ontouchmove\", \"ontouchcancel\", \"onwheel\", \"onscroll\", \"oncopy\", \"oncut\", \"onpaste\", \"oninput\", \"oninvalid\", \"onsearch\"];\nexport declare const URL_HTML_ATTR_NAMES: readonly [\"href\", \"src\", \"srcset\", \"xlink:href\", \"formaction\"];\nexport declare const BLOCKED_HTML_TAG_NAMES: readonly [\"script\"];\nexport declare const NON_STRUCTURING_HTML_TAG_NAMES: readonly [\"pre\", \"script\", \"style\", \"textarea\", \"title\"];\nexport declare const VOID_HTML_TAGS: Set<string>;\nexport declare const STANDARD_BLOCK_HTML_TAGS: Set<string>;\nexport declare const STANDARD_HTML_TAGS: Set<string>;\nexport declare const EXTENDED_STANDARD_HTML_TAGS: Set<string>;\nexport declare const DANGEROUS_HTML_ATTRS: Set<string>;\nexport declare const URL_HTML_ATTRS: Set<string>;\nexport declare const BLOCKED_HTML_TAGS: Set<string>;\nexport declare const NON_STRUCTURING_HTML_TAGS: Set<string>;\nexport declare function stripHtmlControlAndWhitespace(value: string): string;\nexport declare function isUnsafeHtmlUrl(value: string): boolean;\n","export declare const TEX_BRACE_COMMANDS: string[];\nexport declare const ESCAPED_TEX_BRACE_COMMANDS: string;\nexport declare function isMathLike(s: string): boolean;\n","import type { MarkdownIt } from 'markdown-it-ts';\nimport type { MathOptions } from '../config';\nexport declare const KATEX_COMMANDS: string[];\nexport declare const ESCAPED_KATEX_COMMANDS: string;\nexport declare const ESCAPED_MKATWX_COMMANDS: RegExp;\nexport declare function normalizeStandaloneBackslashT(s: string, opts?: MathOptions): string;\nexport declare function applyMath(md: MarkdownIt, mathOpts?: MathOptions): void;\n"],"mappings":";;;UAAiBA,cAAAA,SAAuBC;sBAChBA;;EADPD,gBAAAA,CAAc,EAAA,OAAA;;;;ECCdO,CAAAA;EAYLC;AACZ;AAKA;;EAKcI,cAAAA,CAAAA,EAAAA,SAAAA,MAAAA,EAAAA;EALuBL;;AAOrC;AAKA;EAKiBQ,0BAINC,CAAAA,EAAAA,OAAAA;AAEX;;;UAzCiBT,QAAAA;;EDDAP,GAAAA,EAAAA,MAAAA;;;;ACCjB;AAYA;AACA;AAKA;;;AAAqCO,K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AA,EAAA,MAAA;AAMzBjH,iBOxBOkH,eAAAA,CP0BVtH,KAFwBL,EAAAA,MAAQ,CAAA,EAAA,OAAA;;;iBQgC9B,eAAA,QAAuB,gBAAgB;;;iBCwDvC,eAAA,KAAoB;;;cClIf4H;cACAC;iBACGC,UAAAA;;;cCAHG;iBAGGI,6BAAAA,mBAAgDL;iBAChDM,SAAAA,KAAcP,yBAAuBC;;;AZN5CvI,KaoBL,0BAAA,GAA6B,gBbpBK,GAAA,SAAA,CaoBwB,gBbpBxB,EAAA,GAAA,OAAA,EAAA,CAAA;iBawB9B,sBAAA,SAA+B;iBAI/B,8BAAA,CAAA;AZkBCiB,UYQA,kBAAA,SAA2B,cZRG,CAAA;EAY9BC,MAAAA,CAAAA,EYHN,0BZQIN,EAAAA;EAEEO,KAAAA,CAAAA,EYTP,KZSOA,CAAAA,CAAAA,EAAc,EYTV,UZaPP,EAAAA,GAAAA,IAAAA,CAAAA;EAOFQ;AAUZ;;;EAA6Cb,IAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,EAAAA,MAAAA,EAAAA,GAAAA,MAAAA,CAAAA,GYzBR,MZyBQA,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA;;AAS5BgB,iBY/BD,WAAA,CZ+BwBhB,KAAQ,CAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EY/B6B,kBZ+B7B,CAAA,EY/BoD,UZ+BpD"}
|
package/dist/index.js
CHANGED
|
@@ -11345,10 +11345,50 @@ function mergeBrokenStrongAroundMathInline(tokens) {
|
|
|
11345
11345
|
continue;
|
|
11346
11346
|
}
|
|
11347
11347
|
}
|
|
11348
|
+
if (t0?.type === "strong_open" && t1?.type === "text" && t2?.type === "strong_close" && t3?.type === "strong_open" && t4?.type === "math_inline" && t5?.type === "strong_close") {
|
|
11349
|
+
const close = findTrailingTextStrongClose(tokens, i + 6);
|
|
11350
|
+
if (close) {
|
|
11351
|
+
out.push(t0);
|
|
11352
|
+
out.push(t1);
|
|
11353
|
+
out.push(t4);
|
|
11354
|
+
for (let j = i + 6; j < close.index; j++) out.push(tokens[j]);
|
|
11355
|
+
if (close.beforeClose) out.push({
|
|
11356
|
+
...tokens[close.index],
|
|
11357
|
+
type: "text",
|
|
11358
|
+
content: close.beforeClose,
|
|
11359
|
+
raw: close.beforeClose
|
|
11360
|
+
});
|
|
11361
|
+
out.push(t5);
|
|
11362
|
+
if (close.afterClose) out.push({
|
|
11363
|
+
...tokens[close.index],
|
|
11364
|
+
type: "text",
|
|
11365
|
+
content: close.afterClose,
|
|
11366
|
+
raw: close.afterClose
|
|
11367
|
+
});
|
|
11368
|
+
i = close.index;
|
|
11369
|
+
continue;
|
|
11370
|
+
}
|
|
11371
|
+
}
|
|
11348
11372
|
out.push(t0);
|
|
11349
11373
|
}
|
|
11350
11374
|
return out;
|
|
11351
11375
|
}
|
|
11376
|
+
function findTrailingTextStrongClose(tokens, startIndex) {
|
|
11377
|
+
for (let i = startIndex; i < tokens.length; i++) {
|
|
11378
|
+
const token = tokens[i];
|
|
11379
|
+
if (token?.type === "strong_open") return null;
|
|
11380
|
+
if (token?.type !== "text") continue;
|
|
11381
|
+
const content = String(token.content ?? "");
|
|
11382
|
+
const closeIdx = content.indexOf("**");
|
|
11383
|
+
if (closeIdx === -1) continue;
|
|
11384
|
+
return {
|
|
11385
|
+
index: i,
|
|
11386
|
+
beforeClose: content.slice(0, closeIdx),
|
|
11387
|
+
afterClose: content.slice(closeIdx + 2)
|
|
11388
|
+
};
|
|
11389
|
+
}
|
|
11390
|
+
return null;
|
|
11391
|
+
}
|
|
11352
11392
|
|
|
11353
11393
|
//#endregion
|
|
11354
11394
|
//#region src/plugins/fixTableTokens.ts
|
|
@@ -11356,7 +11396,7 @@ function applyFixTableTokens(md) {
|
|
|
11356
11396
|
md.core.ruler.after("block", "fix_table_tokens", (state) => {
|
|
11357
11397
|
const s = state;
|
|
11358
11398
|
try {
|
|
11359
|
-
const fixed = fixTableTokens(s.tokens ?? []);
|
|
11399
|
+
const fixed = fixTableTokens(s.tokens ?? [], !!s.env?.__markstreamFinal, s.src ?? "");
|
|
11360
11400
|
if (Array.isArray(fixed)) s.tokens = fixed;
|
|
11361
11401
|
} catch (e) {
|
|
11362
11402
|
console.error("[applyFixTableTokens] failed to fix table tokens", e);
|
|
@@ -11462,10 +11502,7 @@ function getPipeRowCells(line, requireTrailingPipe) {
|
|
|
11462
11502
|
if (requireTrailingPipe && !line.endsWith("|")) return null;
|
|
11463
11503
|
const cells = line.slice(1).split("|");
|
|
11464
11504
|
if (cells.at(-1) === "") cells.pop();
|
|
11465
|
-
return cells.length > 0 && cells.every((cell) => cell.length > 0) ? cells : null;
|
|
11466
|
-
}
|
|
11467
|
-
function isSingleLineFallbackTable(line) {
|
|
11468
|
-
return getPipeRowCells(line, false) !== null;
|
|
11505
|
+
return cells.length > 0 && cells.every((cell) => cell.trim().length > 0) ? cells : null;
|
|
11469
11506
|
}
|
|
11470
11507
|
function hasTrailingPipeHeaderRow(line) {
|
|
11471
11508
|
return getPipeRowCells(line, true) !== null;
|
|
@@ -11479,6 +11516,16 @@ function isTableSeparatorRow(line) {
|
|
|
11479
11516
|
if (cells.at(-1) === "") cells.pop();
|
|
11480
11517
|
return cells.length > 0 && cells.every(isSeparatorCell);
|
|
11481
11518
|
}
|
|
11519
|
+
function isPartialSeparatorTail(cell) {
|
|
11520
|
+
return /^(?:[::]-*|:?-+:?)?$/.test(cell.trim());
|
|
11521
|
+
}
|
|
11522
|
+
function isTableSeparatorRowWithPartialTail(line) {
|
|
11523
|
+
if (line === "") return true;
|
|
11524
|
+
if (!line.startsWith("|")) return false;
|
|
11525
|
+
const cells = line.slice(1).split("|");
|
|
11526
|
+
const tail = cells.at(-1) ?? "";
|
|
11527
|
+
return cells.slice(0, -1).every(isSeparatorCell) && isPartialSeparatorTail(tail);
|
|
11528
|
+
}
|
|
11482
11529
|
function isTruncatedSeparatorRow(line) {
|
|
11483
11530
|
return line === "|" || line === "|:";
|
|
11484
11531
|
}
|
|
@@ -11486,7 +11533,7 @@ function hasTrailingPipeHeaderRowWithoutColon(line) {
|
|
|
11486
11533
|
const cells = getPipeRowCells(line, true);
|
|
11487
11534
|
return cells !== null && cells.every((cell) => !cell.includes(":"));
|
|
11488
11535
|
}
|
|
11489
|
-
function fixTableTokens(tokens) {
|
|
11536
|
+
function fixTableTokens(tokens, final = false, source = "") {
|
|
11490
11537
|
const fixedTokens = [...tokens];
|
|
11491
11538
|
if (tokens.length < 3) return fixedTokens;
|
|
11492
11539
|
const i = tokens.length - 2;
|
|
@@ -11495,8 +11542,9 @@ function fixTableTokens(tokens) {
|
|
|
11495
11542
|
const tcontent = String(token.content ?? "");
|
|
11496
11543
|
const headerContent = tcontent.split("\n")[0] ?? "";
|
|
11497
11544
|
const [headerLine = "", separatorLine = "", ...rest] = tcontent.split("\n");
|
|
11498
|
-
|
|
11499
|
-
|
|
11545
|
+
const hasTrailingNewlineSeparatorStart = !final && !tcontent.includes("\n") && /\r?\n$/.test(source) && hasTrailingPipeHeaderRow(tcontent);
|
|
11546
|
+
if (!final && (tcontent.includes("\n") && rest.length === 0 && hasTrailingPipeHeaderRow(headerLine) && isTableSeparatorRowWithPartialTail(separatorLine) || hasTrailingNewlineSeparatorStart)) {
|
|
11547
|
+
const body = headerContent.slice(1, -1).split("|").map((i$1) => i$1.trim()).flatMap((i$1) => createTh(i$1));
|
|
11500
11548
|
const insert = [
|
|
11501
11549
|
...createStart(),
|
|
11502
11550
|
...body,
|
|
@@ -11603,6 +11651,7 @@ const TEX_SPECIFIC_RE = /\\(?:text|frac|left|right|times)/;
|
|
|
11603
11651
|
const OPS_RE = /(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/;
|
|
11604
11652
|
const HYPHENATED_MULTIWORD_RE = /\b[A-Z]{2,}-[A-Z]{2,}\b/i;
|
|
11605
11653
|
const FUNC_CALL_RE = /[A-Z]+\s*\([^)]+\)/i;
|
|
11654
|
+
const PAREN_VARIABLE_TUPLE_RE = /^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i;
|
|
11606
11655
|
const WORDS_RE = /\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/;
|
|
11607
11656
|
const DATE_TIME_RE = /\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/;
|
|
11608
11657
|
const CONTROL_TEX_REPLACEMENTS = {
|
|
@@ -11629,10 +11678,11 @@ function isMathLike(s) {
|
|
|
11629
11678
|
const superSub = /(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(norm) || /(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(norm);
|
|
11630
11679
|
const ops = OPS_RE.test(norm) && !HYPHENATED_MULTIWORD_RE.test(norm);
|
|
11631
11680
|
const funcCall = FUNC_CALL_RE.test(norm);
|
|
11681
|
+
const variableTuple = PAREN_VARIABLE_TUPLE_RE.test(stripped);
|
|
11632
11682
|
const words = WORDS_RE.test(norm);
|
|
11633
11683
|
const pureWord = /^\([a-z]\)$/i.test(stripped) || /^(?:[a-z]|pi)$/i.test(stripped);
|
|
11634
11684
|
const chemicalLike = /^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(stripped);
|
|
11635
|
-
return texCmd || texCmdWithBraces || texBraceStart || texSpecific || superSub || ops || funcCall || words || pureWord || chemicalLike;
|
|
11685
|
+
return texCmd || texCmdWithBraces || texBraceStart || texSpecific || superSub || ops || funcCall || variableTuple || words || pureWord || chemicalLike;
|
|
11636
11686
|
}
|
|
11637
11687
|
|
|
11638
11688
|
//#endregion
|
|
@@ -13907,9 +13957,28 @@ function parseInlineTokens(tokens, raw, pPreToken, options) {
|
|
|
13907
13957
|
result.push(currentTextNode);
|
|
13908
13958
|
}
|
|
13909
13959
|
}
|
|
13960
|
+
function pushInlineTextContent(content, token) {
|
|
13961
|
+
if (!content) return;
|
|
13962
|
+
const parsed = parseInlineTokens([{
|
|
13963
|
+
...token,
|
|
13964
|
+
type: "text",
|
|
13965
|
+
content,
|
|
13966
|
+
raw: content
|
|
13967
|
+
}], content, pPreToken, options);
|
|
13968
|
+
if (parsed.length === 1 && parsed[0]?.type === "text") {
|
|
13969
|
+
const text$1 = parsed[0];
|
|
13970
|
+
pushText(String(text$1.content ?? ""), String(text$1.raw ?? text$1.content ?? ""));
|
|
13971
|
+
return;
|
|
13972
|
+
}
|
|
13973
|
+
for (const node of parsed) pushNode(node);
|
|
13974
|
+
}
|
|
13910
13975
|
function hasEscapedMarkup(token, escapedPrefix) {
|
|
13911
13976
|
return String(token.markup ?? "").startsWith(escapedPrefix);
|
|
13912
13977
|
}
|
|
13978
|
+
function isMarkdownLinkBeforeLinkifiedUrl(content) {
|
|
13979
|
+
if (!content.endsWith("](")) return false;
|
|
13980
|
+
return tokens[i + 1]?.type === "link_open" && tokens[i + 1]?.markup === "linkify" && tokens[i + 2]?.type === "text" && tokens[i + 3]?.type === "link_close" && tokens[i + 4]?.type === "text" && String(tokens[i + 4]?.content ?? "").startsWith(")");
|
|
13981
|
+
}
|
|
13913
13982
|
function stripTrailingMidStateMarker(content, token) {
|
|
13914
13983
|
let nextContent = content;
|
|
13915
13984
|
const rawTokenContent = String(token.content ?? "");
|
|
@@ -14184,7 +14253,7 @@ function parseInlineTokens(tokens, raw, pPreToken, options) {
|
|
|
14184
14253
|
}
|
|
14185
14254
|
if (handleInlineCodeContent(rawContent, token)) return;
|
|
14186
14255
|
if (handleInlineImageContent(content)) return;
|
|
14187
|
-
if (tokens[i + 1]?.type !== "link_open" && handleInlineLinkContent(content, token)) return;
|
|
14256
|
+
if ((tokens[i + 1]?.type !== "link_open" || isMarkdownLinkBeforeLinkifiedUrl(content)) && handleInlineLinkContent(content, token)) return;
|
|
14188
14257
|
const reparsedNodes = tryReparseCollapsedInlineText(rawContent);
|
|
14189
14258
|
if (reparsedNodes) {
|
|
14190
14259
|
resetCurrentTextNode();
|
|
@@ -14440,11 +14509,18 @@ function parseInlineTokens(tokens, raw, pPreToken, options) {
|
|
|
14440
14509
|
const last = tokens[i + 4];
|
|
14441
14510
|
let index = 4;
|
|
14442
14511
|
let loading$1 = true;
|
|
14443
|
-
if (last?.type === "text"
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14512
|
+
if (last?.type === "text") {
|
|
14513
|
+
const lastContent = String(last.content ?? "");
|
|
14514
|
+
if (lastContent.startsWith(")")) {
|
|
14515
|
+
loading$1 = false;
|
|
14516
|
+
const trailing = lastContent.slice(1);
|
|
14517
|
+
if (trailing) {
|
|
14518
|
+
last.content = trailing;
|
|
14519
|
+
last.raw = trailing;
|
|
14520
|
+
} else index++;
|
|
14521
|
+
} else if (lastContent === ".") i++;
|
|
14522
|
+
}
|
|
14523
|
+
pushInlineTextContent(textNodeContent, _token);
|
|
14448
14524
|
const hrefFromToken = String(textToken$1.content ?? "");
|
|
14449
14525
|
if (options?.validateLink && !options.validateLink(hrefFromToken)) pushText(text$1, text$1);
|
|
14450
14526
|
else pushParsed({
|
|
@@ -14467,7 +14543,7 @@ function parseInlineTokens(tokens, raw, pPreToken, options) {
|
|
|
14467
14543
|
const loading = linkContentEnd === -1;
|
|
14468
14544
|
let emphasisMatch = textNodeContent.match(/\*+$/);
|
|
14469
14545
|
if (emphasisMatch) textNodeContent = textNodeContent.replace(/\*+$/, "");
|
|
14470
|
-
|
|
14546
|
+
pushInlineTextContent(textNodeContent, _token);
|
|
14471
14547
|
if (!emphasisMatch) emphasisMatch = text$1.match(/^\*+/);
|
|
14472
14548
|
if (!requireClosingStrong && emphasisMatch) {
|
|
14473
14549
|
const type = emphasisMatch[0].length;
|