B-1ATA-file-upstream-rumdl-md013-reflow-bugs-embed-glue-and-block
Found during the T-0007 / D-0011-markdown-formatting-tool formatter evaluation (rumdl 0.2.8 via
bunx; config: MD013 reflow = true, line-length = 100, flavor = "obsidian"). Both bugs are
dormant for us until T-0008 wires rumdl, and the D-0011 reformat runbook already hand-fixes the
three affected anchor lines — file upstream at rvben/rumdl when convenient. Same bug family as
upstream #597–#600/#639 (all closed quickly); #235 added wikilink-awareness to the link rules, so
Obsidian-aware reflow is in-pattern for the maintainer.
Ticket 1 — MD013 reflow merges same-paragraph embeds into wrapped prose with no separating space
Section titled “Ticket 1 — MD013 reflow merges same-paragraph embeds into wrapped prose with no separating space”Input (prose line >100 cols; embeds on the next lines; no blank line between — one CommonMark paragraph):
This over-long prose line is immediately followed by a transclusion embed on the very next line which a naive reflow would merge into the paragraph exactly the way Prettier does.`D-0008-markdown-standard``S-0007-markdown-formatting`Actual after rumdl fmt:
…exactly the way Prettierdoes.`D-0008-markdown-standard``S-0007-markdown-formatting`Two defects: (a) softbreaks deleted without inserting a space — rendered output changes even in
plain CommonMark; (b) with flavor = "obsidian", own-line embeds are block embeds — inlining them
changes rendering from block to inline transclusion. Expected: treat …-only lines as
unmergeable (or at minimum join with a space). Standalone embed paragraphs are unaffected; the bug
fires only when an embed shares a paragraph with an over-long line. Zero instances in our corpus
(proved by before/after wikilink-multiset diff over all 660 .md files).
Ticket 2 — MD013 reflow displaces line-terminal ^anchor block-ids off the line end
Section titled “Ticket 2 — MD013 reflow displaces line-terminal ^anchor block-ids off the line end”Input (>100-col paragraph ending with an anchor):
This paragraph is deliberately written to run well past the one-hundred-column boundary and it ends with a block anchor that must stay at the end of the final wrapped line to keep Obsidian happy.Actual: reflow wraps the prose and leaves ^stress-anchor alone on a new line. List-item variant
(our three real corpus hits — C-0005, C-0007, P-0003-pragmatic-architecture: bullets ending
^summary): the anchor wraps onto an indented continuation line.
Per Obsidian’s help (https://obsidian.md/help/links), paragraph block-ids must sit at the end of
the line; own-line placement is documented only for structured blocks — so the displaced anchor
breaks the block reference. Expected with the Obsidian flavor: treat a trailing ^id token as
pinned to line end — wrap earlier so it stays attached, or refuse to wrap that line (rumdl already
conservatively refuses to wrap unwrappable aliased-wikilink lines, so the mechanism exists).
Related T-0008 note (not an upstream ticket)
Section titled “Related T-0008 note (not an upstream ticket)”When wiring rumdl, keep the two stress fixtures as a pinned-version regression check in
quality_checks (run rumdl fmt on the fixtures, assert expected output) so a version bump that
changes reflow behavior is caught at the gate. If upstream fixes land before T-0008’s one-time
reformat, drop the runbook’s hand-fix step.
Status at rumdl 0.2.77
Section titled “Status at rumdl 0.2.77”Ticket 1 (embed-glue) is fixed upstream, somewhere in 0.2.10–0.2.56 — never filed by us. The
reflow-stress gate fixture now shows the prose line ending at does. with each … on its
own line, and obsidian-features still round-trips byte-identical. A third defect not written up
here also went away: older versions refused to wrap a line containing an aliased wikilink at all,
leaving it over-length; 0.2.65 wraps it normally. Related: MD075 used to read the pipe in a
wikilink alias as an orphaned table row, which needed a per-file-ignores entry — fixed in 0.2.56,
and the entry is gone.
Ticket 2 (line-terminal ^anchor displaced onto its own line by reflow) still reproduces at
0.2.77 and is frozen into reflow-stress.expected.md as the one remaining accepted caveat.
Re-verified across the T-6XZZ-polish-bump-rumdl-formatter binary bump (0.2.65 → 0.2.77):
reflow-stress.expected.md regenerated against 0.2.77 is byte-identical to the frozen 0.2.65
fixture, so nothing in the intervening twelve releases (0.2.66–0.2.77 changelog scanned, including
the 0.2.74 setext-heading parser rewrite and several MD013 reflow fixes) touched this behavior.
Still the only part of this entry left to file at rvben/rumdl.