Four shapes where the grounding check reads a construct a reader does not, or
misses one a reader sees. Each is smaller than #115 and #116, and none is a
disagreement between two readers of the same file, so they are grouped here
rather than filed apart.
All verified on main at a7444f0. None is touched by PR #112.
1. A table whose delimiter row carries fewer cells than the header
## Rules
| Always preserve safety. | Second cell |
|---|
GFM requires the delimiter row to match the header's cell count, so a reader
sees a paragraph. The walk reads a table and emits [table 27c1810e], so a
directive a reader reads as prose is disposed of by a digest and no row has to
quote a word of it. No refusal fires.
2. # with a trailing space is an empty heading a reader does see
#
Always preserve safety.
EMPTY_HEADING refuses #, and the check exists because such a heading opens
no section here. A reader DOES see <h1></h1>. The walk emits a unit with
empty text and an empty anchor, and every unit below it carries that empty
anchor:
units: {"text":"","anchor":""} {"text":"Always preserve safety.","anchor":""}
refusals: []
The refusal that names this shape at column 0 is the one thing that would stop
an anchor nobody can name, and the trailing space walks around it.
3. The PIPE lookbehind that rowOf was rewritten to avoid
rowOf was rewritten so a matrix row splits on a pipe preceded by an ODD run
of backslashes, which is what a reader's renderer does. The one-character
lookbehind that defect came from still stands in PIPE at src/ground.js,
where the skill walk uses it to decide whether a line is a table row. The two
readers of a pipe in this file now disagree with each other about escaping.
This one is a latent duplicate of a defect already fixed one function over, so
it is worth closing before somebody finds it the expensive way.
4. A setext heading takes only its LAST line as the heading text
Both micromark and pandoc 3.10 render one <h2> whose content is the whole
paragraph, Prose ====. sections takes above.trim() and names the heading
====. A matrix row naming the anchor a reader would use cannot match.
The general case is a setext heading whose text wraps over two lines, which is
ordinary Markdown and gives the wrong anchor here every time.
Reproductions
node p1.mjs for the first two and node p5.mjs for the fourth, from the
review scratchpad. The third is read from the code beside rowOf.
Found by an independent product review of src/ground.js and
src/markdown.js during PR #112. The fourth surfaced while restoring a
regression in that PR, and the restored behaviour matches main rather than
the parsers.
Four shapes where the grounding check reads a construct a reader does not, or
misses one a reader sees. Each is smaller than #115 and #116, and none is a
disagreement between two readers of the same file, so they are grouped here
rather than filed apart.
All verified on
mainata7444f0. None is touched by PR #112.1. A table whose delimiter row carries fewer cells than the header
GFM requires the delimiter row to match the header's cell count, so a reader
sees a paragraph. The walk reads a table and emits
[table 27c1810e], so adirective a reader reads as prose is disposed of by a digest and no row has to
quote a word of it. No refusal fires.
2.
#with a trailing space is an empty heading a reader does see# Always preserve safety.EMPTY_HEADINGrefuses#, and the check exists because such a heading opensno section here. A reader DOES see
<h1></h1>. The walk emits a unit withempty text and an empty anchor, and every unit below it carries that empty
anchor:
The refusal that names this shape at column 0 is the one thing that would stop
an anchor nobody can name, and the trailing space walks around it.
3. The
PIPElookbehind thatrowOfwas rewritten to avoidrowOfwas rewritten so a matrix row splits on a pipe preceded by an ODD runof backslashes, which is what a reader's renderer does. The one-character
lookbehind that defect came from still stands in
PIPEatsrc/ground.js,where the skill walk uses it to decide whether a line is a table row. The two
readers of a pipe in this file now disagree with each other about escaping.
This one is a latent duplicate of a defect already fixed one function over, so
it is worth closing before somebody finds it the expensive way.
4. A setext heading takes only its LAST line as the heading text
Prose ==== ---Both
micromarkand pandoc 3.10 render one<h2>whose content is the wholeparagraph,
Prose ====.sectionstakesabove.trim()and names the heading====. A matrix row naming the anchor a reader would use cannot match.The general case is a setext heading whose text wraps over two lines, which is
ordinary Markdown and gives the wrong anchor here every time.
Reproductions
node p1.mjsfor the first two andnode p5.mjsfor the fourth, from thereview scratchpad. The third is read from the code beside
rowOf.Found by an independent product review of
src/ground.jsandsrc/markdown.jsduring PR #112. The fourth surfaced while restoring aregression in that PR, and the restored behaviour matches
mainrather thanthe parsers.