fix: address markdown renderer review findings
Restore the replaced pipeline's synthetic fence newline so a real trailing blank line inside a fence survives CodeBlock's display trim, and pin it plus header-only tables in the DOM-parity corpus. Route extractMarkdownPlainText through parseGfm so the grammar has one source. Document the fixture provenance check (all 46 fixtures reproduce byte-identically from react-markdown at 9e8101b800), the deliberate O(prefix) divergence memcmp, the per-arm scope of grammar consistency, the React 18 MathML namespace limitation, and the prefix-equivalence corpus constraint.
This commit is contained in:
@@ -12,7 +12,15 @@ import { parseGfm } from '../src/markdown/parse.ts'
|
||||
|
||||
afterEach(cleanup)
|
||||
|
||||
/** A many-block document exercising every freeze-sensitive construct. */
|
||||
/**
|
||||
* A many-block document exercising every freeze-sensitive construct. The
|
||||
* prefix-equivalence property below holds only while no reference or
|
||||
* footnote definition lands on the far side of a freeze boundary from its
|
||||
* use: a fresh mount parses everything in one tree while the live stream's
|
||||
* frozen blocks are already baked (the fingerprint test demonstrates the
|
||||
* documented deviation). Keep definitions adjacent to their references when
|
||||
* extending this corpus.
|
||||
*/
|
||||
const STREAM_DOC = [
|
||||
'# Title',
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user