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.