Skip to content

feat(spec): list bullets, Markdown emphasis and layered w/ lines in tracklists - #19

Merged
4matic merged 5 commits into
mainfrom
feat/tracklist-emphasis
Nov 10, 2026
Merged

4matic merged 5 commits into
mainfrom
feat/tracklist-emphasis

Conversation

@4matic

@4matic 4matic commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Tracklists pasted from Discord, Reddit, Telegram or YouTube comments keep their list bullets and Markdown, and DJ sets mark layered tracks with w/. 0.3.3 read none of these: the time was lost and **, w/ ended up in artist names.

What changes

  • R13.2.1 bullets before a time. * 14:21 A - B and - [01:02] A - B keep their time; the bullet goes into lead.
  • R13.12 Markdown emphasis. Runs of 1–2 * or _ that pair up on a line, with a space, a bracket or the line's end on their outer side, are emphasis markers. They stay in raw and parts; the kind tests, bare positions and the parse read the line without them.
    • Runs next to the time are read by position (R13.2.1, R13.2.3), so **[**14:21**] 10. Artist - Title**, **14:21** A - B and *[14:21] A - B* keep their time, and an edit that replaces rest never takes the time away.
    • Names keep their characters: P*nk, *NSYNC, DJ_Name, F**k, Noisia_-_Stigma.
    • **Intro** is now a marker and **Part 2:** a header.
  • R13.13 layered lines. A line starting with w/ (spec/data/layered-words.json) gets layered: true, a new required entry key. w/ is left out of the parsed track, an untimed layered line doesn't warn time-missing, and it isn't a neighbour in the bare-position search.
  • Size budget for trackparse/tracklist raised from 8 to 9 KiB gzip (separate build(js) commit): the ESM entry is now 8.3 KiB standalone, 7.2 KiB on top of the core in CJS.

parse() is unchanged in every mode. Four existing exact fixtures gained layered: false, hence feat.

Tests

  • Handwritten: +49 tracklist cases (bullets, every emphasis shape and its near misses, names that must survive, layered lines, edits that keep the decoration, a real three-line set).
  • Generated: new tracklist-emphasis scenario, 110 pairwise cases; existing generated files unchanged.
  • Properties: R13.11.5 restated on the line text; new R13.11.6 (emphasis around a time or a track line changes nothing), in JS and Python.
  • Full CI mirror green; compare-ports.mjs: 0 differences; corpus-check.mjs baseline unchanged; the full output of all 5,031 private corpus lines is identical to 0.3.3 apart from the new layered: false.
  • Docs: "Markdown" and "Layered tracks" sections in the tracklists guide (JS and Python tabs, real output), reference and warnings pages, READMEs, counts.

R13.2.1: `* 14:21 Artist - Title` and `- [01:02] A - B` keep their time; the bullet goes into
lead. Until now a bullet was only allowed on lines without a time, so these lines lost the time.
List bullets and Markdown emphasis (R13.2, R13.12) take the standalone ESM entry past 8 KiB
(8.1 KiB; 7.1 KiB on top of the core in CJS). The budget still fails the build on accidental
growth.
R13.12: runs of 1 or 2 `*` or `_` that pair up on a line, with a space, a bracket or the line's
end on their outer side, are emphasis markers. The line text (rest without them) is what the kind
tests, the bare-position test and the parse read; raw and parts are unchanged.

R13.2.1 / R13.2.3: emphasis next to the time is read by position, so `**[**14:21**] Artist -
Title**`, `**14:21** Artist - Title` and `*[14:21] Artist - Title*` keep their time, with the
runs in lead and gap. Edits keep them.

Names keep their stars and underscores (`P*nk`, `DJ_Name`, `F**k`, `*NSYNC`), and so do
`_-_` separators. `**Intro**` is now a marker and `**Part 2:**` a header.

New generator scenario tracklist-emphasis (110 cases).
R13.13: a line that starts with `w/` (spec/data/layered-words.json) is a track played over the
previous one. Every entry gets `layered` (boolean, a new required key). The `w/` stays in rest
and is left out of the parsed track, so `w/ Nitepunk & Habstrakt - Point` has the artists
Nitepunk and Habstrakt instead of "w/ Nitepunk".

An untimed layered line no longer warns time-missing, and layered lines are not neighbours in
the bare-position search. `w/` mid-line, after a track number or without a space after it is
not layered.
13,124 shared fixtures (1,197 handwritten, 11,927 generated), 1,233 on tracklists; 1,346 JS and
1,336 Python tests; trackparse/tracklist adds about 8.3 kB gzipped.
@4matic
4matic merged commit a581eca into main Nov 10, 2026
15 checks passed
@4matic
4matic deleted the feat/tracklist-emphasis branch November 10, 2026 22:58
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