Skip to content

fix(spec): pair Markdown emphasis only inside rest - #22

Merged
4matic merged 1 commit into
mainfrom
fix/tracklist-emphasis-pairing
Nov 10, 2026
Merged

4matic merged 1 commit into
mainfrom
fix/tracklist-emphasis-pairing

Conversation

@4matic

@4matic 4matic commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Found by an independent review of the 0.4.0 tracklist code (51,000-case JS/Python differential fuzz: 0 differences, linear time held, edit round trips held), before 0.4.0 is released.

Problem. R13.12 paired runs across the whole raw line, so a bold run in the lead that the gap never closed could pair with a ** inside the title and delete it: **00:00 Artist - F** You gave the title F You, and **[**00:00**] Artist - Holy Sh** (VIP) gave Holy Sh. Invariant R13.11.6 was false for such track parts.

Fix.

  • Pairing runs only inside rest; lead and gap runs are read by position (as R13.2.1/R13.2.3 already say).
  • R13.12.4: a lead run the gap left open pairs only with the last run of the line (the whole-line bold case, **[**14:21**] 10. Nitepunk - ID**).
  • R13.11.6 now requires a track part without */_; R13.2.4 says rest is raw after the bullet lead.
  • 6 new fixtures (tracklist-mode-062 to 067). No existing expectation changed. Both ports, compare-ports 0 differences, corpus output identical to 0.3.3.

R13.12: runs in lead and gap are read by position and take no part in the pairing. A lead run
the gap leaves open pairs only with the last run of the line (R13.12.4), so `**[**14:21**] A -
B**` still loses its closing `**`, but `**00:00 Artist - F** You` keeps the `**` in the
title instead of dropping it.

Invariant R13.11.6 now requires a track part without `*` or `_`, and R13.2.4 says rest is raw
after the bullet lead.
@4matic
4matic merged commit 942d5a9 into main Nov 10, 2026
15 checks passed
@4matic
4matic deleted the fix/tracklist-emphasis-pairing branch November 10, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant