mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {check_close_word_boundary} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; state
returns
boolean Inline-formatting handlers (bold, italic, strikethrough, inline code) for the streaming mdz parser.
11 declarations
mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {check_close_word_boundary} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; stateboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState, stack_idx: number): boolean import {close_bold} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; Close a Bold container at the given stack index. The caller in
process_inline already located the open via find_open, so we trust the
index rather than re-walking the stack.
statestack_idxnumberboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState, stack_idx: number): boolean import {close_single_delimiter} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; statestack_idxnumberboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState, from: number): number import {code_search_limit} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; Compute search limit for inline code scanning. Finds the closest closing delimiter for any open formatting on the stack. This prevents backtick scanning from crossing bold/italic/etc boundaries.
statefromnumbernumber mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {has_inline_formatting_on_stack} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; Check if any inline formatting container (Bold, Italic, Strikethrough, Link) is on the stack above the current block boundary. Used to decide whether backtick can go optimistic — when formatting is open, the code span might cross the formatting boundary, so we hold instead.
stateboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): void import {process_code_content} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; Process content inside an optimistic inline Code container. Scans raw text (no inline formatting) until closing backtick or newline. Backtick closes (or reverts if empty). Newline reverts (code can't span lines).
statevoid mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState, delimiter: string): "confirmed" | "rejected" | "pending" import {scan_closer_boundary} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; Scan for the first potential closing delimiter and check its word boundary.
Returns a tri-state:
- 'confirmed': closer found in buffer with valid word boundary
- 'rejected': closer found but with invalid word boundary (greedy first-match fails)
- 'pending': no closer in buffer yet, or can't determine boundary
Optimistic constructs (strikethrough) treat 'pending' as proceed.
Non-optimistic constructs (italic) treat 'pending' as text.
Uses native indexOf instead of a manual char loop for faster scanning.
statedelimiterstring"confirmed" | "rejected" | "pending" mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {try_bold} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; stateboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {try_code} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; stateboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState, forced?: boolean): boolean import {try_italic} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; stateforcedbooleanfalseboolean mdz_stream_parser_inline.ts view source
(state: MdzStreamParserState): boolean import {try_strikethrough} from '@fuzdev/fuz_ui/mdz_stream_parser_inline.js'; stateboolean