/** * Speculatively closes inline markup that the stream has not finished writing. * * Markdown is only meaningful once a construct is closed, so a document caught * mid-token renders its own syntax: `**bold` shows the asterisks, `` `code `` * shows the backtick, `[text](htt` shows the brackets. Every one of those * resolves a few tokens later, which makes the reply flicker between prose and * punctuation for the whole of its arrival. * * The fix is to close the open construct for the parser and let the real * closer, when it lands, simply match. Text never changes — only the styling * arrives slightly early, which is invisible, where the punctuation was not. * * Only the *end* of the document is speculative. An unterminated run in the * middle is a deliberate literal (`2 * 3 * 4`), and rewriting it would corrupt * what the author actually wrote. */ /** * Returns the content with any unterminated inline construct closed. * * Never called on settled content: a finished document says what it says. */ export declare function completeInlineMarkup(content: string): string; /** * Completes a GFM table that the stream has only half written. * * A table is not a table until its delimiter row lands, so until then marked * renders the header as a paragraph of pipes — the ugliest flicker of the lot, * because a wide table shows several seconds of `| a | b | c |` before snapping * into shape. * * Synthesising the delimiter row lets the header render as a header * immediately and the body rows arrive underneath it. Streaming only: a * finished document containing pipe-art meant the pipes. */ export declare function completeTable(content: string): string;