Repository navigation
feat(spec): list bullets, Markdown emphasis and layered w/ lines in tracklists - #19
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
* 14:21 A - Band- [01:02] A - Bkeep their time; the bullet goes intolead.*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 inrawandparts; the kind tests, bare positions and the parse read the line without them.**[**14:21**] 10. Artist - Title**,**14:21** A - Band*[14:21] A - B*keep their time, and an edit that replacesrestnever takes the time away.P*nk,*NSYNC,DJ_Name,F**k,Noisia_-_Stigma.**Intro**is now a marker and**Part 2:**a header.w/(spec/data/layered-words.json) getslayered: true, a new required entry key.w/is left out of the parsed track, an untimed layered line doesn't warntime-missing, and it isn't a neighbour in the bare-position search.trackparse/tracklistraised from 8 to 9 KiB gzip (separatebuild(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 gainedlayered: false, hencefeat.Tests
tracklist-emphasisscenario, 110 pairwise cases; existing generated files unchanged.compare-ports.mjs: 0 differences;corpus-check.mjsbaseline unchanged; the full output of all 5,031 private corpus lines is identical to 0.3.3 apart from the newlayered: false.