• English
  • Syntax repair - Fluxdown

    Markdown can stop halfway through a link, a list number, or a formula denominator while a response is arriving. Fluxdown renders the structure it can already identify and holds uncertain endings until more text arrives.

    Stop at any character

    Six short cases share one progress control. Scrub, slow down or advance one character at a time, comparing received Markdown with repair off and on in each row. Finish the stream to inspect the state after ending repair stops.

    Streaming · pausing does not end the input

    Received MarkdownRepair offRepair on

    Strong & links

    **Streaming 

    **Streaming

    Streaming

    Lists & tasks

    9. First ite
    1. First ite
    1. First ite

    Table & inline code

    | Name | Val

    | Name | Val

    HTML & entities

    Read <a href

    Read <a href

    Read

    Math & fractions

    The result: 

    The result:

    The result:

    Late references

    Read [the gu

    Read [the gu

    Read the gu

    Both panes receive the same text. Smoothing and effects are disabled.

    Watch whether content changes its semantic role: a number appearing as text and then becoming a list marker is a syntax transition. Appending text, wrapping a line, or extending a formula with new input is not by itself a syntax transition.

    Where repair happens

    ASTMarkdown tree
    Syntax repair
    1. 1Prepare boundaries
    2. 2Repair nodes in order
    3. 3Clean up
    Convert
    HASTHTML tree

    Syntax repair controls what appears; smoothing controls when it appears.

    Supported syntax

    This table describes the main built-in behaviors. It does not imply that every incomplete input has an unambiguous final meaning.

    SyntaxStreaming behavior
    Strong, emphasis and strikethroughRender unfinished formatting, including adjacent delimiters and nesting; strikethrough follows the active syntax configuration.
    Inline codePreserve code semantics and multi-backtick boundaries; Markdown characters inside code are not repaired as formatting.
    Fenced codeHold incomplete fences so trailing backticks do not appear as code content.
    Headings and blockquotesHold empty heading markers; process nested text, lists and code boundaries inside quotes.
    Ordered, unordered and task listsHold uncertain numbers, isolated markers and unfinished task markers until list structure is known.
    Links and imagesPreserve readable link labels while waiting for destinations; show images once their addresses are complete.
    Reference links and footnotesHandle references waiting for later definitions and attach their destinations when available. Footnotes require the corresponding syntax.
    TablesHold headers and delimiter rows with clear table signals; continue repairing code, formatting and links in open cells.
    HTMLTrim incomplete tags and attributes, and reconcile paragraph/HTML closing and line-break boundaries.
    Escapes and entitiesHold trailing backslashes and incomplete character references; preserve escaped literals.
    Inline and display mathRecognize open formula boundaries, then retain a TeX prefix accepted by KaTeX.

    Repairs for tables, strikethrough and other extensions check whether the matching syntax is enabled. Math also requires build.tex. See the Core repair catalog for exact plugin names and import paths.

    Start, pause and finish

    StateApplication inputResult
    GeneratingAccumulated text, with streaming set to true or an options object.With repair enabled, unfinished endings are repaired by default.
    Paused for inspectionStop appending, but keep streaming enabled.Preserve the current repaired view.
    Finished, cancelled or failedSet streaming to false.Stop ending completion and parse the actual received source; ordinary boundary cleanup can still run.

    See Writing plugins for integration and configuration.

    Continue reading

    PageWhat it covers
    Writing pluginsOverride built-ins, declare a repair, and configure traversal and lifecycle hooks.
    BenchmarkCompare transition-frame rates across popular renderers on shared input.