From 6c3cac5d13d734714ce107a8b251fc717d5a206a Mon Sep 17 00:00:00 2001 From: 4matic Date: Tue, 10 Nov 2026 23:57:48 +0200 Subject: [PATCH 1/5] feat(spec): accept a list bullet before a tracklist time 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. --- README.md | 2 +- js/src/tracklist/times.ts | 5 +- python/src/trackparse/_tracklist_times.py | 6 +- site/src/content/docs/guides/tracklists.mdx | 6 +- spec/SPEC.md | 11 +- .../fixtures/handwritten/tracklist-times.json | 199 ++++++++++++++++++ 6 files changed, 218 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 11b49a5..aa99c39 100644 --- a/README.md +++ b/README.md @@ -556,7 +556,7 @@ that only parses single tracks never loads it. | `kind` | `"track" \| "marker" \| "header" \| "link" \| "note" \| "blank"` | See below | | `eol` | `"\n" \| "\r\n" \| "\r" \| ""` | The line's own terminator; `""` on a last line without one | | `raw` | `string` | The line exactly as written, never normalized | -| `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it. `lead` is spaces or an opening bracket, `gap` is what sits between the time and the track (`] `, ` - `, ` \| `, ` => `) | +| `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it. `lead` is spaces, a list bullet or an opening bracket, `gap` is what sits between the time and the track (`] `, ` - `, ` \| `, ` => `) | | `time` | `{ raw, seconds } \| null` | `12:34`, `1:02:03`, `125:30` (long mixes), `00:00:07.500` (7.5 s) | | `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode. Only `track` and `marker` lines have one | diff --git a/js/src/tracklist/times.ts b/js/src/tracklist/times.ts index c675ada..a61ae05 100644 --- a/js/src/tracklist/times.ts +++ b/js/src/tracklist/times.ts @@ -35,7 +35,7 @@ function skipWhitespace(s: string, from: number): number { return i; } -/** R13.2.1 bullets of a line without a time. */ +/** R13.2.1 bullets (before a time, or alone on a line without one). */ function isBullet(ch: string | undefined): boolean { return ch === "-" || ch === "–" || ch === "—" || ch === "*" || ch === "•"; } @@ -101,8 +101,9 @@ export function shapeSeconds(parts: readonly string[]): number | null { /** R13.2: lead, time and gap at the start of `raw`; the rest is everything after. */ export function scanTime(raw: string): TimeScan { - // R13.2.1 lead: whitespace, then an optional `[` / `(`. + // R13.2.1 lead: whitespace, an optional bullet, then an optional `[` / `(`. let i = skipWhitespace(raw, 0); + if (isBullet(raw[i]) && isWhitespace(raw[i + 1])) i = skipWhitespace(raw, i + 1); const closer = raw[i] === "[" ? "]" : raw[i] === "(" ? ")" : null; if (closer) i++; const leadEnd = i; diff --git a/python/src/trackparse/_tracklist_times.py b/python/src/trackparse/_tracklist_times.py index 444522b..9c55fa3 100644 --- a/python/src/trackparse/_tracklist_times.py +++ b/python/src/trackparse/_tracklist_times.py @@ -49,7 +49,7 @@ def _skip_whitespace(s: str, frm: int) -> int: def _is_bullet(ch: Optional[str]) -> bool: - """R13.2.1 bullets of a line without a time.""" + """R13.2.1 bullets (before a time, or alone on a line without one).""" return ch == "-" or ch == "–" or ch == "—" or ch == "*" or ch == "•" @@ -113,8 +113,10 @@ def shape_seconds(parts: list[str]) -> Optional[int]: def scan_time(raw: str) -> TimeScan: """R13.2: lead, time and gap at the start of ``raw``; the rest is everything after.""" - # R13.2.1 lead: whitespace, then an optional `[` / `(`. + # R13.2.1 lead: whitespace, an optional bullet, then an optional `[` / `(`. i = _skip_whitespace(raw, 0) + if _is_bullet(char_at(raw, i)) and is_whitespace(char_at(raw, i + 1)): + i = _skip_whitespace(raw, i + 1) first_ch = char_at(raw, i) closer = "]" if first_ch == "[" else ")" if first_ch == "(" else None if closer is not None: diff --git a/site/src/content/docs/guides/tracklists.mdx b/site/src/content/docs/guides/tracklists.mdx index dab3173..2109269 100644 --- a/site/src/content/docs/guides/tracklists.mdx +++ b/site/src/content/docs/guides/tracklists.mdx @@ -112,7 +112,7 @@ mixed in one text, and trailing spaces survive. A last line without a newline ha | Part | Holds | |---|---| -| `lead` | spaces or an opening bracket before the time | +| `lead` | spaces, a list bullet (`- `, `* `, `• `) or an opening bracket before the time | | `time` | the time as written, `52:47` | | `gap` | whatever sits between the time and the track: `] `, ` - `, ` \| `, ` => ` | | `rest` | the track text, which is what gets parsed | @@ -130,6 +130,10 @@ All of these are read as start times: | `125:30` (a long mix with no hours) | 7530 | | `00:00:07.500`, `0:07,5` | 7.5 | +A list bullet in front is fine too, as in lists pasted from Discord or Reddit: +`* 12:34 Artist - Title` and `- [12:34] Artist - Title` are both read at 754 seconds, and the +bullet goes into `lead`. + Something that looks like a time but can't be one, like `1:75` or `0:61:00`, stays in `rest` and raises an `invalid-time` warning. diff --git a/spec/SPEC.md b/spec/SPEC.md index 1c39646..df6ab83 100644 --- a/spec/SPEC.md +++ b/spec/SPEC.md @@ -542,11 +542,12 @@ section and `mode: "tracklist"`. Read at the start of `raw` (this scanner is separate from R4.1, which is unchanged): -- **R13.2.1 lead:** R0.2 whitespace, then an optional `[` or `(`. - - On a line **without** a time, `lead` instead holds an optional bullet: R0.2 whitespace, one of - `-` `–` `—` `*` `•`, then at least one R0.2 whitespace (the whole run). Without that shape - `lead` is `""`. `- Noisia - Stigma` → lead `- `, rest `Noisia - Stigma`; `-Intro` has no - bullet. +- **R13.2.1 lead:** R0.2 whitespace, an optional *bullet*, then an optional `[` or `(`. A bullet + is one of `-` `–` `—` `*` `•` followed by at least one R0.2 whitespace (the whole run). + `* 14:21 Noisia - Stigma` → lead `* `, time `14:21`; `- [01:02] A - B` → lead `- [`. + - On a line **without** a time, `lead` holds only the optional bullet and the R0.2 whitespace + before and after it. Without that shape `lead` is `""`. `- Noisia - Stigma` → lead `- `, rest + `Noisia - Stigma`; `-Intro` has no bullet. - **R13.2.2 time:** `A:B` or `A:B:C` in ASCII digits, then an optional fraction (`.` or `,` and 1–3 digits). With three parts: `A` is 1–2 digits (hours), `B` and `C` are 2 digits each and at most 59. With two parts: `A` is 1–3 digits (minutes, **any value**, so `125:30` is 7530 s), `B` is 2 digits and diff --git a/spec/fixtures/handwritten/tracklist-times.json b/spec/fixtures/handwritten/tracklist-times.json index cd7569d..29e8900 100644 --- a/spec/fixtures/handwritten/tracklist-times.json +++ b/spec/fixtures/handwritten/tracklist-times.json @@ -902,6 +902,205 @@ "R13.2.4" ], "note": "With four fraction digits there is no fraction, and ',' is not a gap separator: no time and no invalid-time warning (compare tracklist-times-028)." + }, + { + "id": "tracklist-times-030", + "input": "* 14:21 Noisia - Stigma", + "expected": { + "entries": [ + { + "parts": { + "lead": "* ", + "time": "14:21", + "gap": " ", + "rest": "Noisia - Stigma" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.2.1" + ], + "note": "A Markdown bullet before the time: the time is still read." + }, + { + "id": "tracklist-times-031", + "input": "- [01:02] Noisia - Stigma", + "expected": { + "entries": [ + { + "parts": { + "lead": "- [", + "time": "01:02", + "gap": "] ", + "rest": "Noisia - Stigma" + }, + "time": { + "raw": "01:02", + "seconds": 62 + }, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3" + ] + }, + { + "id": "tracklist-times-032", + "input": " • 1:02:03 - Noisia - Stigma", + "expected": { + "entries": [ + { + "parts": { + "lead": " • ", + "time": "1:02:03", + "gap": " - ", + "rest": "Noisia - Stigma" + }, + "time": { + "raw": "1:02:03", + "seconds": 3723 + }, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3" + ] + }, + { + "id": "tracklist-times-033", + "input": "-14:21 Noisia - Stigma", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "-14:21 Noisia - Stigma" + }, + "time": null + } + ] + }, + "rules": [ + "R13.2.1" + ], + "note": "Near miss: a bullet needs whitespace after it, so there is no bullet and no time." + }, + { + "id": "tracklist-times-034", + "input": "* 1:75 Noisia - Stigma", + "expected": { + "entries": [ + { + "parts": { + "lead": "* ", + "time": "", + "gap": "", + "rest": "1:75 Noisia - Stigma" + }, + "time": null + } + ], + "warnings": [ + { + "code": "invalid-time", + "line": 1, + "severity": "warning", + "suggestion": null + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.4" + ] + }, + { + "id": "tracklist-times-035", + "input": "* 00:00 Noisia - Stigma\n* 03:30 Phace - Psycho\n* 07:10 Mefjus - Sleepless", + "expected": { + "entries": [ + { + "parts": { + "lead": "* ", + "time": "00:00", + "gap": " ", + "rest": "Noisia - Stigma" + }, + "time": { + "raw": "00:00", + "seconds": 0 + } + }, + { + "parts": { + "lead": "* ", + "time": "03:30", + "gap": " ", + "rest": "Phace - Psycho" + }, + "time": { + "raw": "03:30", + "seconds": 210 + } + }, + { + "parts": { + "lead": "* ", + "time": "07:10", + "gap": " ", + "rest": "Mefjus - Sleepless" + }, + "time": { + "raw": "07:10", + "seconds": 430 + } + } + ], + "warnings": [], + "stats": { + "lines": 3, + "tracks": 3, + "markers": 0, + "timed": 3, + "firstTime": 0, + "lastTime": 430 + } + }, + "rules": [ + "R13.2.1", + "R13.7", + "R13.8" + ], + "note": "A bulleted list pasted from Discord or Reddit." } ] } From 19554f92b58edec9d89179e71c8309275a942691 Mon Sep 17 00:00:00 2001 From: 4matic Date: Wed, 11 Nov 2026 00:20:00 +0200 Subject: [PATCH 2/5] build(js): raise the tracklist size budget to 9 KiB gzip 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. --- .github/workflows/js.yml | 2 +- AGENTS.md | 4 ++-- js/scripts/size-check.mjs | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 180a767..eaf53da 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -32,7 +32,7 @@ jobs: - run: pnpm --filter trackparse typecheck - run: pnpm --filter trackparse test - run: pnpm --filter trackparse build - - name: Size budget (trackparse/tracklist adds <= 8 KiB gzip) + - name: Size budget (trackparse/tracklist adds <= 9 KiB gzip) run: pnpm --filter trackparse size - name: Package checks working-directory: js diff --git a/AGENTS.md b/AGENTS.md index 275bb78..3ec15e4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,7 @@ js/ npm package `trackparse`, reference implementation scripts/gen-data.ts codegen for data.generated.ts scripts/conformance.ts pass-rate report per file and per rule scripts/compat.mjs every fixture against dist/ (ESM + CJS) with plain Node 18+ - scripts/size-check.mjs size budget: the tracklist entry may add at most 8 KiB gzip + scripts/size-check.mjs size budget: the tracklist entry may add at most 9 KiB gzip test/runner.ts loads and runs shared fixtures test/match.ts partial/exact matcher (spec/fixtures/README.md) test/fixtures.test.ts every fixture + schema validation + xfail/skip handling @@ -180,7 +180,7 @@ Run from the repo root (pnpm workspace; Node ≥ 22 for development: pnpm 11 and | `pnpm conformance` | JS pass rate per fixture file and per rule ID | | `pnpm docs` · `pnpm docs:build` | Run the documentation site locally / build it into `site/dist` | | `pnpm --filter trackparse compat` | After `build`: every fixture against `dist/` (ESM + CJS) with plain Node; runs on Node 18+ | -| `pnpm --filter trackparse size` | After `build`: fail if `trackparse/tracklist` adds more than 8 KiB gzip (ESM and CJS) | +| `pnpm --filter trackparse size` | After `build`: fail if `trackparse/tracklist` adds more than 9 KiB gzip (ESM and CJS) | | `pnpm gen:data` | Regenerate `js/src/data.generated.ts` from `spec/data` + `spec/VERSION` | | `pnpm gen:fixtures` | Regenerate `spec/fixtures/generated/*.json` | | `pnpm gen:check` | Fail if generated fixtures or JS codegen are stale | diff --git a/js/scripts/size-check.mjs b/js/scripts/size-check.mjs index 07cb05b..063588c 100644 --- a/js/scripts/size-check.mjs +++ b/js/scripts/size-check.mjs @@ -1,19 +1,19 @@ #!/usr/bin/env node /** - * Size budget for the `trackparse/tracklist` entry: its own code may add at most 8 KiB gzip on - * top of the core. + * Size budget for the `trackparse/tracklist` entry: its own code may add at most 9 KiB gzip on + * top of the core (8 KiB until 0.4.0, which added list bullets and Markdown emphasis). * * - ESM: tsup code-splits the shared core into a chunk that dist/index.js and dist/tracklist.js - * both import, so dist/tracklist.js is the tracklist code alone: gzip(tracklist.js) <= 8 KiB. + * both import, so dist/tracklist.js is the tracklist code alone: gzip(tracklist.js) <= 9 KiB. * - CJS: each entry is bundled on its own, so dist/tracklist.cjs contains the core too: - * gzip(tracklist.cjs) - gzip(index.cjs) <= 8 KiB. + * gzip(tracklist.cjs) - gzip(index.cjs) <= 9 KiB. * * Usage: node scripts/size-check.mjs (after `pnpm build`). Zero dependencies. */ import { readFileSync } from "node:fs"; import { gzipSync } from "node:zlib"; -const BUDGET = 8 * 1024; +const BUDGET = 9 * 1024; const gz = (file) => gzipSync(readFileSync(new URL(`../dist/${file}`, import.meta.url))).length; const checks = [ From b4fc51af5cf0f795ff2dca39ffec749169fbcfc4 Mon Sep 17 00:00:00 2001 From: 4matic Date: Wed, 11 Nov 2026 00:23:01 +0200 Subject: [PATCH 3/5] feat(spec): read Markdown emphasis in tracklists 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). --- AGENTS.md | 6 +- README.md | 9 +- js/src/tracklist/emphasis.ts | 51 ++ js/src/tracklist/parse.ts | 12 +- js/src/tracklist/times.ts | 40 +- js/test/tracklist.properties.test.ts | 59 ++- python/src/trackparse/_tracklist_emphasis.py | 65 +++ python/src/trackparse/_tracklist_parse.py | 14 +- python/src/trackparse/_tracklist_times.py | 50 +- python/tests/test_tracklist_properties.py | 56 ++- site/src/content/docs/guides/tracklists.mdx | 47 +- site/src/content/docs/reference/tracklist.mdx | 2 +- spec/SPEC.md | 80 ++- spec/fixtures/generated/summary.json | 89 +++- .../generated/tracklist-emphasis.json | 117 +++++ .../fixtures/handwritten/tracklist-edits.json | 76 +++ .../fixtures/handwritten/tracklist-lines.json | 105 ++++ spec/fixtures/handwritten/tracklist-mode.json | 264 ++++++++++ .../fixtures/handwritten/tracklist-times.json | 457 ++++++++++++++++++ spec/generator/README.md | 5 +- spec/generator/src/atoms.ts | 32 ++ spec/generator/src/scenarios/index.ts | 2 + .../src/scenarios/tracklist-emphasis.ts | 56 +++ spec/generator/src/tracklist.ts | 23 +- spec/generator/test/generated.test.ts | 2 +- 25 files changed, 1664 insertions(+), 55 deletions(-) create mode 100644 js/src/tracklist/emphasis.ts create mode 100644 python/src/trackparse/_tracklist_emphasis.py create mode 100644 spec/fixtures/generated/tracklist-emphasis.json create mode 100644 spec/generator/src/scenarios/tracklist-emphasis.ts diff --git a/AGENTS.md b/AGENTS.md index 3ec15e4..59bae05 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,8 @@ spec/ fixtures/handwritten/ curated cases by topic (edit by hand) fixtures/generated/ combinatorial cases (NEVER edit by hand) generator/ @trackparse/fixture-gen: writes fixtures/generated - (src/tracklist.ts + scenarios/tracklist.ts: multi-line tracklist cases) + (src/tracklist.ts + scenarios/tracklist.ts, tracklist-emphasis.ts: + multi-line tracklist cases) proposals/tracklist.md the platform proposal behind R13 (historical; SPEC.md wins) corpus/ git-ignored: private real-world corpora (platform data, never commit) js/ npm package `trackparse`, reference implementation @@ -27,6 +28,7 @@ js/ npm package `trackparse`, reference implementation index.ts exports parseTracklist, applyEdits and the tracklist types types.ts public tracklist types (mirror tracklist.schema.json) options.ts R13.10 split.ts R13.1 lines + eol times.ts R13.2, R13.9.2 + emphasis.ts R13.12 Markdown emphasis markers (pairing) and runs next to the time kinds.ts R13.3, R13.4.2 candidate lines positions.ts R13.5 warnings.ts R13.7 + out-of-order suggestion search parse.ts R13.1–R13.8 edits.ts R13.9 applyEdits @@ -68,7 +70,7 @@ python/ PyPI package `trackparse` (Python 3.9+, zero deps, uv _digits.py digit runs (js/src/digits.ts) tracklist.py public `trackparse.tracklist` (parse_tracklist, apply_edits, types) _tracklist_*.py one per js/src/tracklist file: _types, _options, _split, _times, - _kinds, _positions, _warnings, _parse, _edits + _kinds, _positions, _warnings, _parse, _edits, _emphasis _tables.py R12 _context.py per-call context _data.py GENERATED from spec/data + spec/VERSION (never edit) scripts/gen_data.py codegen for _data.py (--check for CI) diff --git a/README.md b/README.md index aa99c39..325a67f 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,13 @@ apply_edits(text, [{"op": "set-time", "line": 8, "seconds": 4262}]).changed # (8,) ``` +Lists pasted from Discord, Reddit or YouTube comments often keep their list bullets and Markdown. +`* 14:21 Artist - Title`, `**[**14:21**] 10. Artist - Title**` and `[14:21] **Artist** - _Title_` +all read like the plain line; the decoration stays in `raw` and `parts`. A `*` or `_` only counts as +emphasis when it has a partner on the line and sits against a space, a bracket or the line's end, so +`P*nk`, `DJ_Name` and a censored `F**k` keep their stars and underscores +([details](https://4matic.github.io/trackparse/guides/tracklists/#markdown)). + ### Tracklist mode **Docs:** [Tracklist mode](https://4matic.github.io/trackparse/guides/tracklists/#tracklist-mode) @@ -556,7 +563,7 @@ that only parses single tracks never loads it. | `kind` | `"track" \| "marker" \| "header" \| "link" \| "note" \| "blank"` | See below | | `eol` | `"\n" \| "\r\n" \| "\r" \| ""` | The line's own terminator; `""` on a last line without one | | `raw` | `string` | The line exactly as written, never normalized | -| `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it. `lead` is spaces, a list bullet or an opening bracket, `gap` is what sits between the time and the track (`] `, ` - `, ` \| `, ` => `) | +| `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it. `lead` is spaces, a list bullet, Markdown emphasis or an opening bracket, `gap` is what sits between the time and the track (`] `, ` - `, ` \| `, ` => `) | | `time` | `{ raw, seconds } \| null` | `12:34`, `1:02:03`, `125:30` (long mixes), `00:00:07.500` (7.5 s) | | `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode. Only `track` and `marker` lines have one | diff --git a/js/src/tracklist/emphasis.ts b/js/src/tracklist/emphasis.ts new file mode 100644 index 0000000..f582018 --- /dev/null +++ b/js/src/tracklist/emphasis.ts @@ -0,0 +1,51 @@ +/** R13.12 Markdown emphasis markers in a tracklist line. */ +import { isWhitespace } from "../words.js"; + +/** Length of the maximal run of `*` or `_` at `at` (0 when there is none). */ +function runLength(s: string, at: number): number { + const ch = s[at]; + let j = at; + if (ch === "*" || ch === "_") while (s[j] === ch) j++; + return j - at; +} + +/** + * R13.2.1 / R13.2.3: the length of an emphasis run at `at` (a maximal run of 1 or 2 `*` or `_`), + * else 0. Used next to the time, where runs are read by position rather than by pairing. + */ +export function emphasisRun(s: string, at: number): number { + const n = runLength(s, at); + return n <= 2 ? n : 0; +} + +/** R13.12.2 outer side: line edge, R0.2 whitespace, a bracket, or a `*` / `_` of another run. */ +const isOuter = (ch: string | undefined) => + ch === undefined || isWhitespace(ch) || "[]()*_".includes(ch); +/** R13.12.2 inner side: a character that is not R0.2 whitespace. */ +const isInner = (ch: string | undefined) => ch !== undefined && !isWhitespace(ch); + +/** + * R13.12: `raw.slice(from)` without its emphasis markers. A run of 1 or 2 `*` or `_` closes when + * the character before it is an inner side and the one after it an outer side, and opens the other + * way round. A closer pairs with the nearest opener of the same characters; that opener and every + * opener after it leave the stack. One stack per run (`*`, `**`, `_`, `__`) keeps this linear. + */ +export function withoutMarkers(raw: string, from: number): string { + const marked: boolean[] = []; + const stacks: Record = { "*": [], "**": [], _: [], __: [] }; + for (let i = 0; i < raw.length; ) { + const len = runLength(raw, i) || 1; + const own = stacks[raw.slice(i, i + len)]; + const before = raw[i - 1]; + const after = raw[i + len]; + const at = own && isInner(before) && isOuter(after) ? own.pop() : undefined; + if (at !== undefined) { + for (let m = 0; m < len; m++) marked[at + m] = marked[i + m] = true; + for (const st of Object.values(stacks)) while ((st[st.length - 1] ?? -1) > at) st.pop(); + } else if (own && isOuter(before) && isInner(after)) own.push(i); + i += len; + } + let out = ""; + for (let i = from; i < raw.length; i++) if (!marked[i]) out += raw[i]; + return out; +} diff --git a/js/src/tracklist/parse.ts b/js/src/tracklist/parse.ts index 2316d0d..c4ea4e3 100644 --- a/js/src/tracklist/parse.ts +++ b/js/src/tracklist/parse.ts @@ -51,11 +51,11 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl marker: false, }; if (blank) return row; - const probe = lp.probe(scan.parts.rest); + const probe = lp.probe(scan.text); // R13.4.1: the line text, without emphasis (R13.12) row.probe = probe; row.dash = probe.spacedDash; row.candidate = scan.time !== null || row.dash; - row.bare = bareCandidate(scan.parts.rest, probe.position); // R13.5 + row.bare = bareCandidate(scan.text, probe.position); // R13.5 return row; }); let candidates = 0; @@ -76,7 +76,7 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl if (r.blank || !r.probe) return; const bare = confirmed[i] ? r.bare : null; const probe = bare ? lp.probe(bare.stripped) : r.probe; - r.marker = hasMarkerWord(bare ? bare.stripped : r.scan.parts.rest, markers); + r.marker = hasMarkerWord(bare ? bare.stripped : r.scan.text, markers); // R13.4.2: the R6.10 tight dash only on timed lines without a marker word. const track = probe.finish(listContext && r.scan.time !== null && !r.marker); if (bare) track.position = { raw: bare.raw, number: bare.number }; @@ -113,9 +113,9 @@ function kindOf(r: Row): EntryKind { if (r.blank || !r.track) return "blank"; const marker = !r.separated && r.marker; if (r.scan.time) return marker ? "marker" : "track"; - const rest = r.scan.parts.rest; - if (isLink(rest)) return "link"; - if (isHeader(rest)) return "header"; + const text = r.scan.text; + if (isLink(text)) return "link"; + if (isHeader(text)) return "header"; if (marker) return "marker"; return r.separated ? "track" : "note"; } diff --git a/js/src/tracklist/times.ts b/js/src/tracklist/times.ts index a61ae05..324552f 100644 --- a/js/src/tracklist/times.ts +++ b/js/src/tracklist/times.ts @@ -1,6 +1,7 @@ /** R13.2: the tracklist time scanner (separate from R4.1) and R13.9.2 time formatting. */ import { digitRun } from "../digits.js"; import { isDigit, isWhitespace } from "../words.js"; +import { emphasisRun, withoutMarkers } from "./emphasis.js"; import type { EntryParts, TracklistTime } from "./types.js"; /** The written shape of a time, kept by edits (R13.9.2). */ @@ -22,6 +23,8 @@ export interface TimeScan { style: TimeStyle | null; /** R13.2.4: a `digits:digits` shape after lead that fails R13.2.2. */ invalid: boolean; + /** R13.12: `rest` without its paired emphasis markers (the line text, before R13.13 / R13.5). */ + text: string; } /** R13.2.3 separators after the time. */ @@ -54,9 +57,14 @@ function untimed(raw: string, invalid: boolean): TimeScan { time: null, style: null, invalid, + text: withoutMarkers(raw, lead.length), }; } +/** R13.2.3: past a closing run for an opening run of `open` (same character, 1 or 2 long). */ +const closingRun = (raw: string, at: number, open: string | undefined) => + open && raw[at] === open ? at + emphasisRun(raw, at) : at; + /** `int.frac` parsed as one decimal literal, so every port gets the same double. */ export function secondsOf(whole: number, frac: string): number { return frac.length === 0 ? whole : Number(`${whole}.${frac}`); @@ -101,11 +109,26 @@ export function shapeSeconds(parts: readonly string[]): number | null { /** R13.2: lead, time and gap at the start of `raw`; the rest is everything after. */ export function scanTime(raw: string): TimeScan { - // R13.2.1 lead: whitespace, an optional bullet, then an optional `[` / `(`. + // R13.2.1 lead: whitespace, an optional bullet, an optional emphasis run, an optional `[` / `(`, + // then (after a bracket) another optional emphasis run. A run counts only when the next + // character is a bracket (first run) or a digit. let i = skipWhitespace(raw, 0); if (isBullet(raw[i]) && isWhitespace(raw[i + 1])) i = skipWhitespace(raw, i + 1); + let outerOpen: string | undefined; + let n = emphasisRun(raw, i); + if (n && (raw[i + n] === "[" || raw[i + n] === "(" || isDigit(raw[i + n]))) { + outerOpen = raw[i]; + i += n; + } const closer = raw[i] === "[" ? "]" : raw[i] === "(" ? ")" : null; - if (closer) i++; + let innerOpen: string | undefined; + if (closer) { + n = emphasisRun(raw, ++i); + if (n && isDigit(raw[i + n])) { + innerOpen = raw[i]; + i += n; + } + } const leadEnd = i; // R13.2.2 time @@ -127,12 +150,18 @@ export function scanTime(raw: string): TimeScan { } const timeEnd = j; - // R13.2.3 gap + // R13.2.3 gap: closing runs for the lead's runs (same character), around the closing bracket. + const followsTime = (at: number) => + at >= raw.length || isWhitespace(raw[at]) || isGapSeparator(raw[at]); if (closer) { + j = closingRun(raw, j, innerOpen); if (raw[j] !== closer) return untimed(raw, false); j++; - } else if (j < raw.length && !isWhitespace(raw[j]) && !isGapSeparator(raw[j])) { - return untimed(raw, false); + const k = closingRun(raw, j, outerOpen); + if (k > j && followsTime(k)) j = k; + } else { + j = closingRun(raw, j, outerOpen); + if (!followsTime(j)) return untimed(raw, false); } j = skipWhitespace(raw, j); if (isGapSeparator(raw[j])) j = skipWhitespace(raw, j + 1); @@ -167,6 +196,7 @@ export function scanTime(raw: string): TimeScan { fracDigits: frac.length, }, invalid: false, + text: withoutMarkers(raw, j), }; } diff --git a/js/test/tracklist.properties.test.ts b/js/test/tracklist.properties.test.ts index aca4f77..fbae42d 100644 --- a/js/test/tracklist.properties.test.ts +++ b/js/test/tracklist.properties.test.ts @@ -5,6 +5,7 @@ import Ajv2020 from "ajv/dist/2020.js"; import fc from "fast-check"; import { describe, expect, it } from "vitest"; import { parse } from "../src/index.js"; +import { withoutMarkers } from "../src/tracklist/emphasis.js"; import { applyEdits, type Edit, parseTracklist } from "../src/tracklist/index.js"; import { specDir } from "./runner.js"; @@ -73,6 +74,15 @@ const fragment = fc.constantFrom( "Ab-Cd", "ID", "(VIP)", + "**", + "*", + "__", + "_", + "***", + "* ", + "- ", + "**[", + "]**", "​", "𝄞", "\ud800", @@ -379,7 +389,11 @@ describe("R13.11 tracklist invariants", () => { ); }); - it("5. a one-line text's track equals parse(rest, { mode: 'tracklist' })", () => { + // R13.4.1: the track part of a one-line text (no neighbours, so no bare position) is `rest` + // without its paired emphasis markers (R13.12). + const trackPart = (raw: string, rest: string) => withoutMarkers(raw, raw.length - rest.length); + + it("5. a one-line text's track equals parse(trackPart, { mode: 'tracklist' })", () => { const oneLine = fc .oneof( noisyText, @@ -390,9 +404,50 @@ describe("R13.11 tracklist invariants", () => { fc.property(oneLine, (text) => { const e = parseTracklist(text).entries[0]; if (!e?.track) return; - expect(e.track).toEqual(parse(e.parts.rest, { mode: "tracklist" })); + expect(e.track).toEqual(parse(trackPart(e.raw, e.parts.rest), { mode: "tracklist" })); }), { numRuns: 1500 }, ); }); + + it("6. emphasis around the time or the track part changes nothing", () => { + const line = fc.record({ + style: timeStyle, + seconds: fc.integer({ min: 0, max: 3599 }), + frac: fc.integer({ min: 0, max: 999 }), + rest: fc.constantFrom( + "Noisia - Stigma", + "01. Phace - Plastic Acid", + "Intro", + "Paperclip interview", + "Mefjus - Suicide Bassline (VIP)", + "ID - ID", + "Noisia feat. Foreign Beggars - Shellshock", + ), + time: fc.constantFrom( + ["", ""], + ["**", "**"], + ["__", "__"], + ["*", "*"], + ["_", "_"], + ["**[", "]**"], + ["[**", "**]"], + ["**[**", "**]"], + ["_[", "]_"], + ), + wrap: fc.constantFrom("", "**", "__", "*", "_"), + }); + fc.assert( + fc.property(line, (l) => { + const t = writeTime(l.style, l.seconds, l.frac); + const bare = parseTracklist(`${t} ${l.rest}`).entries[0]; + const decorated = `${l.time[0]}${t}${l.time[1]} ${l.wrap}${l.rest}${l.wrap}`; + const e = parseTracklist(decorated).entries[0]; + expect(e?.time?.seconds).toBe(bare?.time?.seconds); + expect(e?.kind).toBe(bare?.kind); + expect(e?.track).toEqual(bare?.track); + }), + { numRuns: 500 }, + ); + }); }); diff --git a/python/src/trackparse/_tracklist_emphasis.py b/python/src/trackparse/_tracklist_emphasis.py new file mode 100644 index 0000000..eb4ad31 --- /dev/null +++ b/python/src/trackparse/_tracklist_emphasis.py @@ -0,0 +1,65 @@ +"""R13.12 Markdown emphasis markers in a tracklist line (js/src/tracklist/emphasis.ts).""" + +from __future__ import annotations + +from typing import Optional + +from ._words import char_at, is_whitespace + + +def _run_length(s: str, at: int) -> int: + """Length of the maximal run of ``*`` or ``_`` at ``at`` (0 when there is none).""" + ch = char_at(s, at) + j = at + if ch == "*" or ch == "_": + n = len(s) + while j < n and s[j] == ch: + j += 1 + return j - at + + +def emphasis_run(s: str, at: int) -> int: + """R13.2.1 / R13.2.3: the length of an emphasis run at ``at`` (a maximal run of 1 or 2 ``*`` + or ``_``), else 0. Used next to the time, where runs are read by position, not paired.""" + n = _run_length(s, at) + return n if n <= 2 else 0 + + +def _is_outer(ch: Optional[str]) -> bool: + """R13.12.2 outer side: line edge, R0.2 whitespace, a bracket, or a ``*`` / ``_``.""" + return ch is None or is_whitespace(ch) or ch in "[]()*_" + + +def _is_inner(ch: Optional[str]) -> bool: + """R13.12.2 inner side: a character that is not R0.2 whitespace.""" + return ch is not None and not is_whitespace(ch) + + +def without_markers(raw: str, frm: int) -> str: + """R13.12: ``raw[frm:]`` without its emphasis markers. A run of 1 or 2 ``*`` or ``_`` closes + when the character before it is an inner side and the one after it an outer side, and opens + the other way round. A closer pairs with the nearest opener of the same characters; that + opener and every opener after it leave the stack. One stack per run keeps this linear.""" + n = len(raw) + marked = [False] * n + stacks: dict[str, list[int]] = {"*": [], "**": [], "_": [], "__": []} + i = 0 + while i < n: + length = _run_length(raw, i) or 1 + own = stacks.get(raw[i : i + length]) + before = raw[i - 1] if i > 0 else None + after = char_at(raw, i + length) + at: Optional[int] = None + if own and _is_inner(before) and _is_outer(after): + at = own.pop() + if at is not None: + for m in range(length): + marked[at + m] = True + marked[i + m] = True + for st in stacks.values(): + while st and st[-1] > at: + st.pop() + elif own is not None and _is_outer(before) and _is_inner(after): + own.append(i) + i += length + return "".join(raw[k] for k in range(frm, n) if not marked[k]) diff --git a/python/src/trackparse/_tracklist_parse.py b/python/src/trackparse/_tracklist_parse.py index d3f8501..1bfa6c5 100644 --- a/python/src/trackparse/_tracklist_parse.py +++ b/python/src/trackparse/_tracklist_parse.py @@ -68,11 +68,11 @@ def parse_tracklist_resolved(text: str, opts: ResolvedOptions) -> Tracklist: rows.append(row) if row.blank: continue - probe = lp.probe(scan.parts.rest) + probe = lp.probe(scan.text) # R13.4.1: the line text, without emphasis (R13.12) row.probe = probe row.dash = probe.spaced_dash row.candidate = scan.time is not None or row.dash - row.bare = bare_candidate(scan.parts.rest, probe.position) # R13.5 + row.bare = bare_candidate(scan.text, probe.position) # R13.5 candidates = 0 dashes = 0 for r in rows: @@ -90,9 +90,7 @@ def parse_tracklist_resolved(text: str, opts: ResolvedOptions) -> Tracklist: continue bare = r.bare if confirmed[i] else None probe = lp.probe(bare.stripped) if bare is not None else r.probe - r.marker = has_marker_word( - bare.stripped if bare is not None else r.scan.parts.rest, markers - ) + r.marker = has_marker_word(bare.stripped if bare is not None else r.scan.text, markers) # R13.4.2: the R6.10 tight dash only on timed lines without a marker word. track = probe.finish(list_context and r.scan.time is not None and not r.marker) if bare is not None: @@ -138,10 +136,10 @@ def _kind_of(r: _Row) -> EntryKind: marker = not r.separated and r.marker if r.scan.time is not None: return "marker" if marker else "track" - rest = r.scan.parts.rest - if is_link(rest): + text = r.scan.text + if is_link(text): return "link" - if is_header(rest): + if is_header(text): return "header" if marker: return "marker" diff --git a/python/src/trackparse/_tracklist_times.py b/python/src/trackparse/_tracklist_times.py index 9c55fa3..5f26346 100644 --- a/python/src/trackparse/_tracklist_times.py +++ b/python/src/trackparse/_tracklist_times.py @@ -6,6 +6,7 @@ from typing import NamedTuple, Optional from ._digits import digit_run +from ._tracklist_emphasis import emphasis_run, without_markers from ._tracklist_types import Parts, TimeValue from ._words import char_at, is_digit, is_whitespace @@ -33,6 +34,8 @@ class TimeScan(NamedTuple): style: Optional[TimeStyle] #: R13.2.4: a ``digits:digits`` shape after lead that fails R13.2.2. invalid: bool + #: R13.12: ``rest`` without its paired emphasis markers (the line text, before R13.13 / R13.5). + text: str def _is_gap_separator(ch: Optional[str]) -> bool: @@ -61,7 +64,20 @@ def _untimed(raw: str, invalid: bool) -> TimeScan: lead_end = 0 if _is_bullet(char_at(raw, at)) and is_whitespace(char_at(raw, at + 1)): lead_end = _skip_whitespace(raw, at + 1) - return TimeScan(Parts(raw[:lead_end], "", "", raw[lead_end:]), None, None, invalid) + return TimeScan( + Parts(raw[:lead_end], "", "", raw[lead_end:]), + None, + None, + invalid, + without_markers(raw, lead_end), + ) + + +def _closing_run(raw: str, at: int, open_ch: Optional[str]) -> int: + """R13.2.3: a closing run for an opening run of ``open_ch`` (same character, 1 or 2 long).""" + if open_ch is None or char_at(raw, at) != open_ch: + return at + return at + emphasis_run(raw, at) def seconds_of(whole: int, frac: str) -> float: @@ -113,14 +129,28 @@ def shape_seconds(parts: list[str]) -> Optional[int]: def scan_time(raw: str) -> TimeScan: """R13.2: lead, time and gap at the start of ``raw``; the rest is everything after.""" - # R13.2.1 lead: whitespace, an optional bullet, then an optional `[` / `(`. + # R13.2.1 lead: whitespace, an optional bullet, an optional emphasis run, an optional `[` / + # `(`, then (after a bracket) another optional emphasis run. A run counts only when the next + # character is a bracket (first run) or a digit. i = _skip_whitespace(raw, 0) if _is_bullet(char_at(raw, i)) and is_whitespace(char_at(raw, i + 1)): i = _skip_whitespace(raw, i + 1) + outer_open: Optional[str] = None + n = emphasis_run(raw, i) + if n: + after = char_at(raw, i + n) + if after == "[" or after == "(" or is_digit(after): + outer_open = raw[i] + i += n first_ch = char_at(raw, i) closer = "]" if first_ch == "[" else ")" if first_ch == "(" else None + inner_open: Optional[str] = None if closer is not None: i += 1 + n = emphasis_run(raw, i) + if n and is_digit(char_at(raw, i + n)): + inner_open = raw[i] + i += n lead_end = i # R13.2.2 time @@ -143,13 +173,22 @@ def scan_time(raw: str) -> TimeScan: j += 1 + n time_end = j - # R13.2.3 gap + # R13.2.3 gap: closing runs for the lead's runs (same character), around the closing bracket. + def follows_time(at: int) -> bool: + return at >= len(raw) or is_whitespace(raw[at]) or _is_gap_separator(raw[at]) + if closer is not None: + j = _closing_run(raw, j, inner_open) if char_at(raw, j) != closer: return _untimed(raw, False) j += 1 - elif j < len(raw) and not is_whitespace(raw[j]) and not _is_gap_separator(raw[j]): - return _untimed(raw, False) + k = _closing_run(raw, j, outer_open) + if k > j and follows_time(k): + j = k + else: + j = _closing_run(raw, j, outer_open) + if not follows_time(j): + return _untimed(raw, False) j = _skip_whitespace(raw, j) if _is_gap_separator(char_at(raw, j)): j = _skip_whitespace(raw, j + 1) @@ -183,6 +222,7 @@ def scan_time(raw: str) -> TimeScan: frac_digits=len(frac), ), False, + without_markers(raw, j), ) diff --git a/python/tests/test_tracklist_properties.py b/python/tests/test_tracklist_properties.py index 5a6ee1c..781d079 100644 --- a/python/tests/test_tracklist_properties.py +++ b/python/tests/test_tracklist_properties.py @@ -14,6 +14,7 @@ from runner import SPEC_DIR from trackparse import parse +from trackparse._tracklist_emphasis import without_markers from trackparse.tracklist import apply_edits, parse_tracklist @@ -42,6 +43,7 @@ def _load(name: str) -> dict[str, Any]: "0:61:00 ", "1:2", "[", "]", "(", ")", "[00:10] ", "(1:00)", " - ", " – ", "-", "|", ".", ":", "=> ", "==>", "1 ", "2 ", "01. ", "3) ", "Artist", "Title", "Noisia - Stigma", "Intro", "interview", "Tracklist:", "Part 2", "https://x.y", "www.", "_-_", "Ab-Cd", "ID", "(VIP)", + "**", "*", "__", "_", "***", "* ", "- ", "**[", "]**", "​", "𝄞", "\ud800", ] # fmt: skip @@ -355,7 +357,12 @@ def eols(t: str) -> list[str]: assert apply_edits(once.text, [{"op": "sort-by-time"}]).text == once.text -# 5. One line equals parse(rest, mode="tracklist") +# 5. One line equals parse(track part, mode="tracklist"). R13.4.1: the track part of a one-line +# text (no neighbours, so no bare position) is `rest` without its paired emphasis markers (R13.12). + + +def track_part(raw: str, rest: str) -> str: + return without_markers(raw, len(raw) - len(rest)) @fast(1500) @@ -366,7 +373,52 @@ def test_one_line_equals_parse(text: str) -> None: if not entries or entries[0].track is None: return e = entries[0] - assert e.track == parse(e.parts.rest, mode="tracklist") + assert e.track == parse(track_part(e.raw, e.parts.rest), mode="tracklist") + + +# 6. Emphasis around the time or the track part changes nothing. + +EMPHASIS_REST = [ + "Noisia - Stigma", + "01. Phace - Plastic Acid", + "Intro", + "Paperclip interview", + "Mefjus - Suicide Bassline (VIP)", + "ID - ID", + "Noisia feat. Foreign Beggars - Shellshock", +] +TIME_WRAPS = [ + ("", ""), + ("**", "**"), + ("__", "__"), + ("*", "*"), + ("_", "_"), + ("**[", "]**"), + ("[**", "**]"), + ("**[**", "**]"), + ("_[", "]_"), +] + + +@fast(500) +@given( + st.sampled_from(["M:SS", "MM:SS", "H:MM:SS", "HH:MM:SS", "MM:SS.d", "M:SS,ddd"]), + st.integers(0, 3599), + st.integers(0, 999), + st.sampled_from(EMPHASIS_REST), + st.sampled_from(TIME_WRAPS), + st.sampled_from(["", "**", "__", "*", "_"]), +) +def test_emphasis_changes_nothing( + style: str, seconds: int, frac: int, rest: str, wrap_time: tuple[str, str], wrap: str +) -> None: + t = write_time(style, seconds, frac) + bare = parse_tracklist(f"{t} {rest}").entries[0] + e = parse_tracklist(f"{wrap_time[0]}{t}{wrap_time[1]} {wrap}{rest}{wrap}").entries[0] + assert e.time is not None and bare.time is not None + assert e.time.seconds == bare.time.seconds + assert e.kind == bare.kind + assert e.track == bare.track def test_many_edits_are_linear() -> None: diff --git a/site/src/content/docs/guides/tracklists.mdx b/site/src/content/docs/guides/tracklists.mdx index 2109269..8329d57 100644 --- a/site/src/content/docs/guides/tracklists.mdx +++ b/site/src/content/docs/guides/tracklists.mdx @@ -112,9 +112,9 @@ mixed in one text, and trailing spaces survive. A last line without a newline ha | Part | Holds | |---|---| -| `lead` | spaces, a list bullet (`- `, `* `, `• `) or an opening bracket before the time | +| `lead` | spaces, a list bullet (`- `, `* `, `• `), Markdown emphasis or an opening bracket before the time | | `time` | the time as written, `52:47` | -| `gap` | whatever sits between the time and the track: `] `, ` - `, ` \| `, ` => ` | +| `gap` | whatever sits between the time and the track: `] `, ` - `, ` \| `, ` => `, `**] ` | | `rest` | the track text, which is what gets parsed | That split is what lets an editor rewrite a time without touching anything else on the line. @@ -137,6 +137,49 @@ bullet goes into `lead`. Something that looks like a time but can't be one, like `1:75` or `0:61:00`, stays in `rest` and raises an `invalid-time` warning. +## Markdown + +Lists copied from Discord, Reddit, Telegram or YouTube comments often keep their Markdown: +`**bold**`, `__underline__`, `*italic*` or `_italic_`, sometimes only around the time. trackparse +reads through it. Emphasis next to the time goes into `lead` and `gap`, so an edit keeps it. +Emphasis in the rest of the line stays in `rest`, but the parser reads the text without it. + + + + +```js +const list = parseTracklist("**[**14:21**] 10. Nitepunk - ID**\n* 18:02 Noisia - _Stigma_"); +const [a, b] = list.entries; + +a.parts; // { lead: '**[**', time: '14:21', gap: '**] ', rest: '10. Nitepunk - ID**' } +a.track.artists.map((x) => x.name); // [ 'Nitepunk' ] +a.track.title; // 'ID' +a.track.position; // { raw: '10', number: 10 } +b.track.title; // 'Stigma' +``` + + + + +```python +tl = parse_tracklist("**[**14:21**] 10. Nitepunk - ID**\n* 18:02 Noisia - _Stigma_") +a, b = tl.entries + +a.parts # Parts(lead='**[**', time='14:21', gap='**] ', rest='10. Nitepunk - ID**') +[x.name for x in a.track.artists] # ['Nitepunk'] +a.track.title # 'ID' +a.track.position # Position(raw='10', number=10) +b.track.title # 'Stigma' +``` + + + + +A `*` or `_` only counts as emphasis when it has a partner on the same line and sits against a +space, a bracket or the end of the line on its outer side. So names keep their stars and +underscores: `P*nk`, `*NSYNC`, `DJ_Name`, `Noisia_-_Stigma` and a censored `F**k` come out as +written. Runs of three or more, `~~`, `||` and backticks are never treated as Markdown. + ## Line kinds | Kind | When | diff --git a/site/src/content/docs/reference/tracklist.mdx b/site/src/content/docs/reference/tracklist.mdx index 55360dc..d4acb17 100644 --- a/site/src/content/docs/reference/tracklist.mdx +++ b/site/src/content/docs/reference/tracklist.mdx @@ -71,7 +71,7 @@ One per line, in order. | `raw` | `string` | The line exactly as written, never normalised | | `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it | | `time` | `{ raw, seconds } \| null` | The start time | -| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode. Only `track` and `marker` lines have one | +| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode, without its [Markdown emphasis](/trackparse/guides/tracklists/#markdown) and a bare track number. Only `track` and `marker` lines have one | ### TracklistWarning diff --git a/spec/SPEC.md b/spec/SPEC.md index df6ab83..5358bc0 100644 --- a/spec/SPEC.md +++ b/spec/SPEC.md @@ -542,9 +542,14 @@ section and `mode: "tracklist"`. Read at the start of `raw` (this scanner is separate from R4.1, which is unchanged): -- **R13.2.1 lead:** R0.2 whitespace, an optional *bullet*, then an optional `[` or `(`. A bullet - is one of `-` `–` `—` `*` `•` followed by at least one R0.2 whitespace (the whole run). - `* 14:21 Noisia - Stigma` → lead `* `, time `14:21`; `- [01:02] A - B` → lead `- [`. +- **R13.2.1 lead:** R0.2 whitespace, an optional *bullet*, an optional *emphasis run*, an optional + `[` or `(`, then, only after a bracket, another optional emphasis run. A bullet is one of `-` `–` + `—` `*` `•` followed by at least one R0.2 whitespace (the whole run). An emphasis run is a maximal + run of 1 or 2 `*`, or of 1 or 2 `_`; the first one counts only when the next character is `[`, + `(` or a digit, the second only when the next character is a digit. Otherwise the run is not + part of the lead (and the line has no time). + `* 14:21 Noisia - Stigma` → lead `* `, time `14:21`; `- [01:02] A - B` → lead `- [`; + `**[**14:21**] A - B` → lead `**[**`. - On a line **without** a time, `lead` holds only the optional bullet and the R0.2 whitespace before and after it. Without that shape `lead` is `""`. `- Noisia - Stigma` → lead `- `, rest `Noisia - Stigma`; `-Intro` has no bullet. @@ -559,10 +564,21 @@ Read at the start of `raw` (this scanner is separate from R4.1, which is unchang `seconds = W`; with one, `seconds` is the double nearest the decimal string `"."` (correctly rounded: JS `Number()`, Python `float()`), so ports agree bit for bit (`07.500` → 7.5). -- **R13.2.3 gap:** the matching `]` / `)` if one was opened (else no time), then R0.2 whitespace, then - optionally one separator from `-` `–` `—` `|` `.` `:` and whitespace, then optionally an arrow - `=>` / `==>` and whitespace. The time must be followed by end of line, whitespace, a separator or - the closing bracket; otherwise there is no time. +- **R13.2.3 gap:** in order: + 1. a *closing run* for the lead's second emphasis run, if it took one; + 2. the matching `]` / `)` if one was opened (else no time); + 3. a closing run for the lead's first emphasis run, if it took one. After a bracket, this run is + only taken when it is followed by end of line, R0.2 whitespace or a separator below; + 4. R0.2 whitespace, then optionally one separator from `-` `–` `—` `|` `.` `:` and whitespace, + then optionally an arrow `=>` / `==>` and whitespace. + + A closing run is an emphasis run (R13.2.1) of the same character as its opening run, of either + length (pasted bold is not always balanced). It is optional: a lead run without one is fine. + Without a bracket, the time and its closing run must be followed by end of line, whitespace or a + separator; otherwise there is no time. `**14:21** A - B` → lead `**`, gap `** `; + `**14:21**A - B` and `[14:21]_ A - B` (no opening `_`) read as without emphasis. + - Emphasis runs next to the time are read by position, not paired (R13.12), so an edit that + replaces `rest` (R13.9) never changes whether a line has a time. - **R13.2.4 invalid times:** the time candidate (after lead) is the **maximal** run `digits(:digits)+`, plus an optional fraction. When that run fails R13.2.2 (`1:75`, `0:61:00`, `1:02:75`, `1:02:03:04`), it is not a time: the entry has no time, `rest === raw`, and the @@ -580,8 +596,9 @@ Read at the start of `raw` (this scanner is separate from R4.1, which is unchang 2. Lines **with** a time: `marker` when the track part (R13.4) has no separator and has a marker word; else `track`. A line that is only a time (its track part is empty after R1) is a `track` and warns `line-unparsed` (R13.7). -3. Lines **without** a time: `link` when `rest` (trimmed) starts with `http://`, `https://` or `www.` - (ASCII case-insensitive); `header` when it (trimmed of R0.2 whitespace) ends with `:` or its +3. Lines **without** a time: `link` when the line text (R13.4.1, trimmed) starts with `http://`, + `https://` or `www.` (ASCII case-insensitive); `header` when it (trimmed of R0.2 whitespace) ends + with `:` or its first word is in [`data/header-words.json`](data/header-words.json) and it has at most one more word; `marker` as in 2; `track` when the track part has a separator; else `note`. @@ -603,8 +620,12 @@ Nothing is ever dropped. ### R13.4 The track part -- **R13.4.1** The track part is `rest`, minus a bare position (R13.5). It is parsed with `parse(rest, - { mode, knownArtists, keywords, splitAnd })`, `mode` defaulting to `"tracklist"`. +- **R13.4.1** The *line text* is `rest` without its emphasis markers (R13.12). The *track part* is + the line text minus a bare position (R13.5). The kind tests (R13.3), the probe (R13.4.2) and the + bare-position test (R13.5) read the line text; the track part is parsed with + `parse(trackPart, { mode, knownArtists, keywords, splitAnd })`, `mode` defaulting to + `"tracklist"`. `rest` itself is never changed. `**[**14:21**] 10. Nitepunk - ID**` → rest + `10. Nitepunk - ID**`, line text `10. Nitepunk - ID`. - **R13.4.2** *Candidate lines* are non-blank lines with a time or a spaced dash. The list is in *list context* when at least half of the candidate lines contain a spaced dash. R6.10's tight dash is enabled only on lines **with a time** whose track part has no marker word (R13.3.5), and @@ -616,7 +637,7 @@ Nothing is ever dropped. ### R13.5 Bare positions -A track part that starts with 1–3 ASCII digits and a space (U+0020 only, not other R0.2 whitespace), +A line text (R13.4.1) that starts with 1–3 ASCII digits and a space (U+0020 only, not other R0.2 whitespace), where R4.2 does not take a position, has a **bare position** candidate `N` if the remainder after the space is not empty or only whitespace. It is a position when the nearest preceding or the nearest following candidate line (a line with a time or a spaced dash, R13.4.2) also has a bare @@ -751,8 +772,35 @@ marker words). Bad values are ignored (R0.8). `insert` edits on 5 000 lines stay within those ceilings. 3. Locality and identity (R13.9.1). 4. Round trip (R13.9.7). -5. A one-line text's track equals `parse(rest, { mode: "tracklist" })` for a `track` or `marker` - line without a bare position (other kinds have `track: null`). +5. A one-line text's track equals `parse(lineText, { mode: "tracklist" })` for a `track` or + `marker` line (R13.4.1; one line has no bare position, other kinds have `track: null`). +6. Emphasis changes nothing: wrapping a line's time as `**T**`, `__T__`, `*T*`, `_T_`, `**[T]**`, + `[**T**]`, `**[**T**]` or `_[T]_`, or its track part as `**…**`, `__…__`, `*…*` or `_…_`, keeps + its `time.seconds`, `kind` and `track`, as long as the track part does not itself start or end + with `*`, `_` or whitespace. + +### R13.12 Emphasis markers + +Markdown emphasis (`**bold**`, `__bold__`, `*italic*`, `_italic_`, from Discord, Reddit, Telegram or +YouTube comments) is found once per line, on `raw`, by pairing runs: + +- **R13.12.1 Runs.** A run is a maximal run of `*` or of `_`. Only runs of 1 or 2 characters can be + markers; `***` and longer are always text. +- **R13.12.2 Sides.** The *outer side* of a run is acceptable when it is the line edge, R0.2 + whitespace, one of `[` `]` `(` `)`, or a `*` / `_` (of another run). The *inner side* is + acceptable when it is a character that is not R0.2 whitespace. A run can *close* when the + character before it is an inner side and the one after it an outer side, and can *open* when the + character before it is an outer side and the one after it an inner side. +- **R13.12.3 Pairing.** Scan the runs left to right with a stack of openers. A run that can close + pairs with the nearest opener on the stack with the same character and length; that opener and + every opener above it leave the stack. A run that did not close and can open is pushed. Paired + runs are *emphasis markers*; every other run is text. + +So markers never touch a letter, digit or other punctuation on their outer side: `P*nk`, +`A**hole`, `DJ_Name`, `Noisia_-_Stigma` and `_-_Intro` have none, and neither do unpaired runs +(`*NSYNC - Bye Bye Bye`, `Artist - Holy Sh**`). Backticks, `~~` and `||` are never markers. +`**[**14:21**] 10. Nitepunk - ID**` has four (two pairs), `00:00 Nitepunk - No Manners (**VIP**)` +two. Markers are left out of the line text (R13.4.1); `raw` and `parts` keep them. --- @@ -787,7 +835,9 @@ Tracklists (R13) have their own invariants: R13.11. - **Credit list** — a substring that R7.3 splits into names. - **Word key** — R0.3. - **Dedup key** — R0.4. -- **Track part** — a tracklist line's `rest` minus a bare position, parsed as a track (R13.4.1). +- **Line text** — a tracklist line's `rest` without its emphasis markers (R13.4.1, R13.12). +- **Track part** — the line text minus a bare position, parsed as a track (R13.4.1). +- **Emphasis marker** — a paired run of 1 or 2 `*` or `_` (R13.12). - **Candidate line** — a non-blank tracklist line with a time or a spaced dash (R13.4.2). - **List context** — at least half of the candidate lines have a spaced dash; enables R6.10's tight dash (R13.4.2). diff --git a/spec/fixtures/generated/summary.json b/spec/fixtures/generated/summary.json index 1360b05..3c82de1 100644 --- a/spec/fixtures/generated/summary.json +++ b/spec/fixtures/generated/summary.json @@ -1,7 +1,7 @@ { "generator": "@trackparse/fixture-gen", "seed": 20260929, - "total": 11817, + "total": 11927, "scenarios": { "artists-joiners": { "file": "artists-joiners.json", @@ -1512,6 +1512,93 @@ "set-h": 97 } } + }, + "tracklist-emphasis": { + "file": "tracklist-emphasis.json", + "fn": "parseTracklist", + "cases": 110, + "strategy": "pairwise+sample", + "productSize": 3440640, + "pairwiseCases": 110, + "sampledCases": 0, + "infeasiblePairs": 2, + "duplicateInputsDropped": 0, + "dims": { + "time": { + "m-ss": 13, + "mm-ss": 14, + "long-min": 13, + "h-mm-ss": 15, + "hh-mm-ss": 14, + "frac-dot": 14, + "frac-comma": 13, + "hms-frac": 14 + }, + "lead": { + "bold": 8, + "bold-square": 9, + "square-bold": 9, + "bold-square-bold": 9, + "underline": 10, + "star": 8, + "under-square": 9, + "bold-open-only": 10, + "bullet-star": 10, + "bullet-dash": 10, + "bullet-dot-square": 9, + "bullet-bold": 9 + }, + "wrap": { + "none": 23, + "bold": 20, + "underline": 25, + "star": 21, + "under": 21 + }, + "gap": { + "space": 15, + "two-spaces": 12, + "dash": 14, + "en-dash": 14, + "pipe": 13, + "dot": 15, + "arrow": 13, + "long-arrow": 14 + }, + "pos": { + "none": 19, + "dotted-pad": 16, + "dotted": 17, + "paren": 15, + "padded": 17, + "bare": 13, + "bare-9": 13 + }, + "eol": { + "lf": 14, + "lf-end": 13, + "crlf": 14, + "crlf-end": 13, + "cr": 13, + "cr-end": 14, + "mixed": 14, + "mixed-end": 15 + }, + "count": { + "n1": 42, + "n2": 68 + }, + "set": { + "set-a": 13, + "set-b": 14, + "set-c": 13, + "set-d": 12, + "set-e": 15, + "set-f": 14, + "set-g": 15, + "set-h": 14 + } + } } } } diff --git a/spec/fixtures/generated/tracklist-emphasis.json b/spec/fixtures/generated/tracklist-emphasis.json new file mode 100644 index 0000000..c84e72f --- /dev/null +++ b/spec/fixtures/generated/tracklist-emphasis.json @@ -0,0 +1,117 @@ +{ + "$schema": "../../schema/fixture-file.schema.json", + "description": "GENERATED by spec/generator (scenario tracklist-emphasis) — do not edit by hand. parseTracklist over 1–6 line texts with Markdown: list bullets before the time, emphasis runs around the time and its brackets (**T**, **[T]**, [**T**], **[**T**], __T__, *T*, _[T]_, an opener without a closer) and emphasis around each track line (**, __, *, _), crossed with time forms, gaps, positions and line endings. The expected track never changes: markers are left out of the line text (SPEC R13.2.1, R13.2.3, R13.4.1, R13.12).", + "defaults": { "fn": "parseTracklist", "options": {} }, + "cases": [ + {"id":"gen:tracklist-emphasis:frac-comma.bold-open-only.underline.dash.bare-9.lf.n2.set-g","input":"**[0:00,0] - __9 The xx - One More Time [Remix by Krooked]__\n**[3:45,5] - __10 Кино - Группа крови__","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[0:00,0] - __9 The xx - One More Time [Remix by Krooked]__","parts":{"lead":"**[","time":"0:00,0","gap":"] - ","rest":"__9 The xx - One More Time [Remix by Krooked]__"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"","raw":"**[3:45,5] - __10 Кино - Группа крови__","parts":{"lead":"**[","time":"3:45,5","gap":"] - ","rest":"__10 Кино - Группа крови__"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"10","number":10},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bold-square-bold.bold.two-spaces.dotted-pad.lf.n2.set-f","input":"**[**0:00,0**] **01. Camo - Levitate (VIP Mix)**\n**[**3:45,5**] **02. Noisia - Diplodocus**","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[**0:00,0**] **01. Camo - Levitate (VIP Mix)**","parts":{"lead":"**[**","time":"0:00,0","gap":"**] ","rest":"**01. Camo - Levitate (VIP Mix)**"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"**[**3:45,5**] **02. Noisia - Diplodocus**","parts":{"lead":"**[**","time":"3:45,5","gap":"**] ","rest":"**02. Noisia - Diplodocus**"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"02","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bold-square.bold.long-arrow.bare.crlf-end.n2.set-b","input":"**[0:00,0]** ==> **1 Кино - Группа крови**\r\n**[3:45,5]** ==> **2 Звери - Кукла колдуна**\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[0:00,0]** ==> **1 Кино - Группа крови**","parts":{"lead":"**[","time":"0:00,0","gap":"]** ==> ","rest":"**1 Кино - Группа крови**"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"**[3:45,5]** ==> **2 Звери - Кукла колдуна**","parts":{"lead":"**[","time":"3:45,5","gap":"]** ==> ","rest":"**2 Звери - Кукла колдуна**"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"2","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bold-square.none.arrow.dotted.lf.n1.set-h","input":"**[0:00,0]** => 1. Mr. Oizo - Numb","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[0:00,0]** => 1. Mr. Oizo - Numb","parts":{"lead":"**[","time":"0:00,0","gap":"]** => ","rest":"1. Mr. Oizo - Numb"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bold.under.en-dash.paren.lf-end.n1.set-c","input":"**0:00,0** – _1) Fox Stevenson - Bruises (Magnetude Remix)_\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**0:00,0** – _1) Fox Stevenson - Bruises (Magnetude Remix)_","parts":{"lead":"**","time":"0:00,0","gap":"** – ","rest":"_1) Fox Stevenson - Bruises (Magnetude Remix)_"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bullet-bold.underline.pipe.bare-9.crlf-end.n2.set-e","input":"- **0:00,0** | __9 A$AP Rocky - Don't Stop Me Now__\r\n- **3:45,5** | __10 P!nk - What's Up?__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"- **0:00,0** | __9 A$AP Rocky - Don't Stop Me Now__","parts":{"lead":"- **","time":"0:00,0","gap":"** | ","rest":"__9 A$AP Rocky - Don't Stop Me Now__"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"- **3:45,5** | __10 P!nk - What's Up?__","parts":{"lead":"- **","time":"3:45,5","gap":"** | ","rest":"__10 P!nk - What's Up?__"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"10","number":10},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bullet-dash.star.pipe.dotted.cr-end.n2.set-c","input":"- 0:00,0 | *1. Fox Stevenson - Bruises (Magnetude Remix)*\r- 3:45,5 | *2. Gydra - Firestarter (Radio Edit)*\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"- 0:00,0 | *1. Fox Stevenson - Bruises (Magnetude Remix)*","parts":{"lead":"- ","time":"0:00,0","gap":" | ","rest":"*1. Fox Stevenson - Bruises (Magnetude Remix)*"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r","raw":"- 3:45,5 | *2. Gydra - Firestarter (Radio Edit)*","parts":{"lead":"- ","time":"3:45,5","gap":" | ","rest":"*2. Gydra - Firestarter (Radio Edit)*"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"2","number":2},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bullet-dot-square.bold.two-spaces.bare.crlf.n2.set-e","input":"• [0:00,0] **1 A$AP Rocky - Don't Stop Me Now**\r\n• [3:45,5] **2 P!nk - What's Up?**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"• [0:00,0] **1 A$AP Rocky - Don't Stop Me Now**","parts":{"lead":"• [","time":"0:00,0","gap":"] ","rest":"**1 A$AP Rocky - Don't Stop Me Now**"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"• [3:45,5] **2 P!nk - What's Up?**","parts":{"lead":"• [","time":"3:45,5","gap":"] ","rest":"**2 P!nk - What's Up?**"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"2","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.bullet-star.bold.dot.none.mixed-end.n2.set-g","input":"* 0:00,0. **The xx - One More Time [Remix by Krooked]**\n* 3:45,5. **Кино - Группа крови**\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"* 0:00,0. **The xx - One More Time [Remix by Krooked]**","parts":{"lead":"* ","time":"0:00,0","gap":". ","rest":"**The xx - One More Time [Remix by Krooked]**"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":null,"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\r","raw":"* 3:45,5. **Кино - Группа крови**","parts":{"lead":"* ","time":"3:45,5","gap":". ","rest":"**Кино - Группа крови**"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":null,"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.square-bold.none.arrow.padded.cr.n2.set-e","input":"[**0:00,0**] => 01 A$AP Rocky - Don't Stop Me Now\r[**3:45,5**] => 02 P!nk - What's Up?","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"[**0:00,0**] => 01 A$AP Rocky - Don't Stop Me Now","parts":{"lead":"[**","time":"0:00,0","gap":"**] => ","rest":"01 A$AP Rocky - Don't Stop Me Now"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"[**3:45,5**] => 02 P!nk - What's Up?","parts":{"lead":"[**","time":"3:45,5","gap":"**] => ","rest":"02 P!nk - What's Up?"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"02","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.star.star.pipe.dotted-pad.mixed.n2.set-d","input":"*0:00,0* | *01. Sigur Rós - Hoppípolla*\r\n*3:45,5* | *02. Tiësto - Café del Mar [Extended Mix]*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"*0:00,0* | *01. Sigur Rós - Hoppípolla*","parts":{"lead":"*","time":"0:00,0","gap":"* | ","rest":"*01. Sigur Rós - Hoppípolla*"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"*3:45,5* | *02. Tiësto - Café del Mar [Extended Mix]*","parts":{"lead":"*","time":"3:45,5","gap":"* | ","rest":"*02. Tiësto - Café del Mar [Extended Mix]*"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":{"raw":"02","number":2},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.under-square.underline.space.dotted.crlf-end.n1.set-h","input":"_[0:00,0]_ __1. Mr. Oizo - Numb__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"_[0:00,0]_ __1. Mr. Oizo - Numb__","parts":{"lead":"_[","time":"0:00,0","gap":"]_ ","rest":"__1. Mr. Oizo - Numb__"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-comma.underline.underline.dot.none.crlf.n2.set-a","input":"__0:00,0__. __Noisia - Diplodocus__\r\n__3:45,5__. __Phace - Hologram (Enei Remix)__","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"__0:00,0__. __Noisia - Diplodocus__","parts":{"lead":"__","time":"0:00,0","gap":"__. ","rest":"__Noisia - Diplodocus__"},"time":{"raw":"0:00,0","seconds":0},"track":{"position":null,"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"__3:45,5__. __Phace - Hologram (Enei Remix)__","parts":{"lead":"__","time":"3:45,5","gap":"__. ","rest":"__Phace - Hologram (Enei Remix)__"},"time":{"raw":"3:45,5","seconds":225.5},"track":{"position":null,"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bold-open-only.none.long-arrow.dotted-pad.mixed.n1.set-g","input":"**[00:00.000] ==> 01. The xx - One More Time [Remix by Krooked]","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[00:00.000] ==> 01. The xx - One More Time [Remix by Krooked]","parts":{"lead":"**[","time":"00:00.000","gap":"] ==> ","rest":"01. The xx - One More Time [Remix by Krooked]"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bold-square-bold.star.space.paren.cr.n1.set-h","input":"**[**00:00.000**] *1) Mr. Oizo - Numb*","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[**00:00.000**] *1) Mr. Oizo - Numb*","parts":{"lead":"**[**","time":"00:00.000","gap":"**] ","rest":"*1) Mr. Oizo - Numb*"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bold-square.under.dot.none.mixed-end.n1.set-c","input":"**[00:00.000]**. _Fox Stevenson - Bruises (Magnetude Remix)_\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[00:00.000]**. _Fox Stevenson - Bruises (Magnetude Remix)_","parts":{"lead":"**[","time":"00:00.000","gap":"]**. ","rest":"_Fox Stevenson - Bruises (Magnetude Remix)_"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":null,"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bold.bold.arrow.bare.mixed.n2.set-g","input":"**00:00.000** => **1 The xx - One More Time [Remix by Krooked]**\r\n**03:45.500** => **2 Кино - Группа крови**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**00:00.000** => **1 The xx - One More Time [Remix by Krooked]**","parts":{"lead":"**","time":"00:00.000","gap":"** => ","rest":"**1 The xx - One More Time [Remix by Krooked]**"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"","raw":"**03:45.500** => **2 Кино - Группа крови**","parts":{"lead":"**","time":"03:45.500","gap":"** => ","rest":"**2 Кино - Группа крови**"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"2","number":2},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bullet-bold.under.dash.padded.lf.n1.set-c","input":"- **00:00.000** - _01 Fox Stevenson - Bruises (Magnetude Remix)_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"- **00:00.000** - _01 Fox Stevenson - Bruises (Magnetude Remix)_","parts":{"lead":"- **","time":"00:00.000","gap":"** - ","rest":"_01 Fox Stevenson - Bruises (Magnetude Remix)_"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bullet-dash.underline.en-dash.dotted-pad.cr.n1.set-b","input":"- 00:00.000 – __01. Кино - Группа крови__","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"- 00:00.000 – __01. Кино - Группа крови__","parts":{"lead":"- ","time":"00:00.000","gap":" – ","rest":"__01. Кино - Группа крови__"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bullet-dot-square.none.dot.bare-9.cr-end.n2.set-d","input":"• [00:00.000]. 9 Sigur Rós - Hoppípolla\r• [03:45.500]. 10 Tiësto - Café del Mar [Extended Mix]\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"• [00:00.000]. 9 Sigur Rós - Hoppípolla","parts":{"lead":"• [","time":"00:00.000","gap":"]. ","rest":"9 Sigur Rós - Hoppípolla"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"• [03:45.500]. 10 Tiësto - Café del Mar [Extended Mix]","parts":{"lead":"• [","time":"03:45.500","gap":"]. ","rest":"10 Tiësto - Café del Mar [Extended Mix]"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"10","number":10},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8"]}, + {"id":"gen:tracklist-emphasis:frac-dot.bullet-star.none.two-spaces.bare-9.crlf.n2.set-b","input":"* 00:00.000 9 Кино - Группа крови\r\n* 03:45.500 10 Звери - Кукла колдуна","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"* 00:00.000 9 Кино - Группа крови","parts":{"lead":"* ","time":"00:00.000","gap":" ","rest":"9 Кино - Группа крови"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"* 03:45.500 10 Звери - Кукла колдуна","parts":{"lead":"* ","time":"03:45.500","gap":" ","rest":"10 Звери - Кукла колдуна"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"10","number":10},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.square-bold.none.en-dash.none.cr-end.n1.set-g","input":"[**00:00.000**] – The xx - One More Time [Remix by Krooked]\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"[**00:00.000**] – The xx - One More Time [Remix by Krooked]","parts":{"lead":"[**","time":"00:00.000","gap":"**] – ","rest":"The xx - One More Time [Remix by Krooked]"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":null,"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.square-bold.underline.pipe.padded.crlf-end.n2.set-a","input":"[**00:00.000**] | __01 Noisia - Diplodocus__\r\n[**03:45.500**] | __02 Phace - Hologram (Enei Remix)__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"[**00:00.000**] | __01 Noisia - Diplodocus__","parts":{"lead":"[**","time":"00:00.000","gap":"**] | ","rest":"__01 Noisia - Diplodocus__"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"[**03:45.500**] | __02 Phace - Hologram (Enei Remix)__","parts":{"lead":"[**","time":"03:45.500","gap":"**] | ","rest":"__02 Phace - Hologram (Enei Remix)__"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"02","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.star.none.two-spaces.dotted.cr-end.n2.set-h","input":"*00:00.000* 1. Mr. Oizo - Numb\r*03:45.500* 2. Andy C - Strobe [Netsky D'n'B Remix]\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"*00:00.000* 1. Mr. Oizo - Numb","parts":{"lead":"*","time":"00:00.000","gap":"* ","rest":"1. Mr. Oizo - Numb"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"*03:45.500* 2. Andy C - Strobe [Netsky D'n'B Remix]","parts":{"lead":"*","time":"03:45.500","gap":"* ","rest":"2. Andy C - Strobe [Netsky D'n'B Remix]"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"2","number":2},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.under-square.underline.dash.dotted-pad.lf.n2.set-e","input":"_[00:00.000]_ - __01. A$AP Rocky - Don't Stop Me Now__\n_[03:45.500]_ - __02. P!nk - What's Up?__","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"_[00:00.000]_ - __01. A$AP Rocky - Don't Stop Me Now__","parts":{"lead":"_[","time":"00:00.000","gap":"]_ - ","rest":"__01. A$AP Rocky - Don't Stop Me Now__"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"_[03:45.500]_ - __02. P!nk - What's Up?__","parts":{"lead":"_[","time":"03:45.500","gap":"]_ - ","rest":"__02. P!nk - What's Up?__"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":{"raw":"02","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.underline.star.arrow.padded.lf-end.n1.set-d","input":"__00:00.000__ => *01 Sigur Rós - Hoppípolla*\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"__00:00.000__ => *01 Sigur Rós - Hoppípolla*","parts":{"lead":"__","time":"00:00.000","gap":"__ => ","rest":"*01 Sigur Rós - Hoppípolla*"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:frac-dot.underline.star.long-arrow.none.mixed.n2.set-f","input":"__00:00.000__ ==> *Camo - Levitate (VIP Mix)*\r\n__03:45.500__ ==> *Noisia - Diplodocus*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"__00:00.000__ ==> *Camo - Levitate (VIP Mix)*","parts":{"lead":"__","time":"00:00.000","gap":"__ ==> ","rest":"*Camo - Levitate (VIP Mix)*"},"time":{"raw":"00:00.000","seconds":0},"track":{"position":null,"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"__03:45.500__ ==> *Noisia - Diplodocus*","parts":{"lead":"__","time":"03:45.500","gap":"__ ==> ","rest":"*Noisia - Diplodocus*"},"time":{"raw":"03:45.500","seconds":225.5},"track":{"position":null,"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bold-open-only.underline.dot.none.crlf-end.n2.set-c","input":"**[0:00:00]. __Fox Stevenson - Bruises (Magnetude Remix)__\r\n**[0:15:05]. __Gydra - Firestarter (Radio Edit)__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[0:00:00]. __Fox Stevenson - Bruises (Magnetude Remix)__","parts":{"lead":"**[","time":"0:00:00","gap":"]. ","rest":"__Fox Stevenson - Bruises (Magnetude Remix)__"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":null,"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r\n","raw":"**[0:15:05]. __Gydra - Firestarter (Radio Edit)__","parts":{"lead":"**[","time":"0:15:05","gap":"]. ","rest":"__Gydra - Firestarter (Radio Edit)__"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":null,"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bold-square-bold.under.space.dotted-pad.mixed-end.n2.set-e","input":"**[**0:00:00**] _01. A$AP Rocky - Don't Stop Me Now_\n**[**0:15:05**] _02. P!nk - What's Up?_\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[**0:00:00**] _01. A$AP Rocky - Don't Stop Me Now_","parts":{"lead":"**[**","time":"0:00:00","gap":"**] ","rest":"_01. A$AP Rocky - Don't Stop Me Now_"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"**[**0:15:05**] _02. P!nk - What's Up?_","parts":{"lead":"**[**","time":"0:15:05","gap":"**] ","rest":"_02. P!nk - What's Up?_"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":{"raw":"02","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bold-square-bold.underline.arrow.none.mixed.n1.set-a","input":"**[**0:00:00**] => __Noisia - Diplodocus__","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[**0:00:00**] => __Noisia - Diplodocus__","parts":{"lead":"**[**","time":"0:00:00","gap":"**] => ","rest":"__Noisia - Diplodocus__"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":null,"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bold-square.star.en-dash.dotted-pad.cr.n1.set-e","input":"**[0:00:00]** – *01. A$AP Rocky - Don't Stop Me Now*","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[0:00:00]** – *01. A$AP Rocky - Don't Stop Me Now*","parts":{"lead":"**[","time":"0:00:00","gap":"]** – ","rest":"*01. A$AP Rocky - Don't Stop Me Now*"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bold.under.dash.padded.crlf.n2.set-b","input":"**0:00:00** - _01 Кино - Группа крови_\r\n**0:15:05** - _02 Звери - Кукла колдуна_","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**0:00:00** - _01 Кино - Группа крови_","parts":{"lead":"**","time":"0:00:00","gap":"** - ","rest":"_01 Кино - Группа крови_"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"**0:15:05** - _02 Звери - Кукла колдуна_","parts":{"lead":"**","time":"0:15:05","gap":"** - ","rest":"_02 Звери - Кукла колдуна_"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":{"raw":"02","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-bold.none.en-dash.none.mixed-end.n2.set-e","input":"- **0:00:00** – A$AP Rocky - Don't Stop Me Now\n- **0:15:05** – P!nk - What's Up?\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- **0:00:00** – A$AP Rocky - Don't Stop Me Now","parts":{"lead":"- **","time":"0:00:00","gap":"** – ","rest":"A$AP Rocky - Don't Stop Me Now"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":null,"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"- **0:15:05** – P!nk - What's Up?","parts":{"lead":"- **","time":"0:15:05","gap":"** – ","rest":"P!nk - What's Up?"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":null,"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-bold.underline.space.paren.mixed-end.n1.set-g","input":"- **0:00:00** __1) The xx - One More Time [Remix by Krooked]__\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- **0:00:00** __1) The xx - One More Time [Remix by Krooked]__","parts":{"lead":"- **","time":"0:00:00","gap":"** ","rest":"__1) The xx - One More Time [Remix by Krooked]__"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-dash.none.dash.bare.lf-end.n2.set-a","input":"- 0:00:00 - 1 Noisia - Diplodocus\n- 0:15:05 - 2 Phace - Hologram (Enei Remix)\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- 0:00:00 - 1 Noisia - Diplodocus","parts":{"lead":"- ","time":"0:00:00","gap":" - ","rest":"1 Noisia - Diplodocus"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\n","raw":"- 0:15:05 - 2 Phace - Hologram (Enei Remix)","parts":{"lead":"- ","time":"0:15:05","gap":" - ","rest":"2 Phace - Hologram (Enei Remix)"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-dot-square.star.en-dash.padded.mixed-end.n1.set-h","input":"• [0:00:00] – *01 Mr. Oizo - Numb*\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"• [0:00:00] – *01 Mr. Oizo - Numb*","parts":{"lead":"• [","time":"0:00:00","gap":"] – ","rest":"*01 Mr. Oizo - Numb*"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-dot-square.underline.long-arrow.none.cr.n1.set-f","input":"• [0:00:00] ==> __Camo - Levitate (VIP Mix)__","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"• [0:00:00] ==> __Camo - Levitate (VIP Mix)__","parts":{"lead":"• [","time":"0:00:00","gap":"] ==> ","rest":"__Camo - Levitate (VIP Mix)__"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":null,"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.bullet-star.under.pipe.padded.cr.n1.set-h","input":"* 0:00:00 | _01 Mr. Oizo - Numb_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"* 0:00:00 | _01 Mr. Oizo - Numb_","parts":{"lead":"* ","time":"0:00:00","gap":" | ","rest":"_01 Mr. Oizo - Numb_"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.square-bold.none.long-arrow.dotted.lf.n1.set-d","input":"[**0:00:00**] ==> 1. Sigur Rós - Hoppípolla","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"[**0:00:00**] ==> 1. Sigur Rós - Hoppípolla","parts":{"lead":"[**","time":"0:00:00","gap":"**] ==> ","rest":"1. Sigur Rós - Hoppípolla"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.star.underline.space.bare.mixed-end.n2.set-f","input":"*0:00:00* __1 Camo - Levitate (VIP Mix)__\n*0:15:05* __2 Noisia - Diplodocus__\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"*0:00:00* __1 Camo - Levitate (VIP Mix)__","parts":{"lead":"*","time":"0:00:00","gap":"* ","rest":"__1 Camo - Levitate (VIP Mix)__"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r","raw":"*0:15:05* __2 Noisia - Diplodocus__","parts":{"lead":"*","time":"0:15:05","gap":"* ","rest":"__2 Noisia - Diplodocus__"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":{"raw":"2","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.under-square.bold.two-spaces.paren.lf-end.n1.set-e","input":"_[0:00:00]_ **1) A$AP Rocky - Don't Stop Me Now**\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"_[0:00:00]_ **1) A$AP Rocky - Don't Stop Me Now**","parts":{"lead":"_[","time":"0:00:00","gap":"]_ ","rest":"**1) A$AP Rocky - Don't Stop Me Now**"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:h-mm-ss.underline.none.space.bare-9.cr-end.n2.set-g","input":"__0:00:00__ 9 The xx - One More Time [Remix by Krooked]\r__0:15:05__ 10 Кино - Группа крови\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"__0:00:00__ 9 The xx - One More Time [Remix by Krooked]","parts":{"lead":"__","time":"0:00:00","gap":"__ ","rest":"9 The xx - One More Time [Remix by Krooked]"},"time":{"raw":"0:00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\r","raw":"__0:15:05__ 10 Кино - Группа крови","parts":{"lead":"__","time":"0:15:05","gap":"__ ","rest":"10 Кино - Группа крови"},"time":{"raw":"0:15:05","seconds":905},"track":{"position":{"raw":"10","number":10},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bold-open-only.star.long-arrow.bare.crlf.n2.set-f","input":"**[00:00:00] ==> *1 Camo - Levitate (VIP Mix)*\r\n**[00:20:34] ==> *2 Noisia - Diplodocus*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[00:00:00] ==> *1 Camo - Levitate (VIP Mix)*","parts":{"lead":"**[","time":"00:00:00","gap":"] ==> ","rest":"*1 Camo - Levitate (VIP Mix)*"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"**[00:20:34] ==> *2 Noisia - Diplodocus*","parts":{"lead":"**[","time":"00:20:34","gap":"] ==> ","rest":"*2 Noisia - Diplodocus*"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"2","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bold-square-bold.underline.pipe.padded.cr-end.n2.set-b","input":"**[**00:00:00**] | __01 Кино - Группа крови__\r**[**00:20:34**] | __02 Звери - Кукла колдуна__\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**[**00:00:00**] | __01 Кино - Группа крови__","parts":{"lead":"**[**","time":"00:00:00","gap":"**] | ","rest":"__01 Кино - Группа крови__"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"**[**00:20:34**] | __02 Звери - Кукла колдуна__","parts":{"lead":"**[**","time":"00:20:34","gap":"**] | ","rest":"__02 Звери - Кукла колдуна__"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"02","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bold-square.under.space.paren.lf.n1.set-d","input":"**[00:00:00]** _1) Sigur Rós - Hoppípolla_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[00:00:00]** _1) Sigur Rós - Hoppípolla_","parts":{"lead":"**[","time":"00:00:00","gap":"]** ","rest":"_1) Sigur Rós - Hoppípolla_"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bold.star.two-spaces.dotted-pad.crlf-end.n2.set-d","input":"**00:00:00** *01. Sigur Rós - Hoppípolla*\r\n**00:20:34** *02. Tiësto - Café del Mar [Extended Mix]*\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**00:00:00** *01. Sigur Rós - Hoppípolla*","parts":{"lead":"**","time":"00:00:00","gap":"** ","rest":"*01. Sigur Rós - Hoppípolla*"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"**00:20:34** *02. Tiësto - Café del Mar [Extended Mix]*","parts":{"lead":"**","time":"00:20:34","gap":"** ","rest":"*02. Tiësto - Café del Mar [Extended Mix]*"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"02","number":2},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-bold.bold.space.dotted.mixed.n2.set-b","input":"- **00:00:00** **1. Кино - Группа крови**\r\n- **00:20:34** **2. Звери - Кукла колдуна**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"- **00:00:00** **1. Кино - Группа крови**","parts":{"lead":"- **","time":"00:00:00","gap":"** ","rest":"**1. Кино - Группа крови**"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"- **00:20:34** **2. Звери - Кукла колдуна**","parts":{"lead":"- **","time":"00:20:34","gap":"** ","rest":"**2. Звери - Кукла колдуна**"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"2","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-dash.under.arrow.bare-9.crlf.n2.set-h","input":"- 00:00:00 => _9 Mr. Oizo - Numb_\r\n- 00:20:34 => _10 Andy C - Strobe [Netsky D'n'B Remix]_","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"- 00:00:00 => _9 Mr. Oizo - Numb_","parts":{"lead":"- ","time":"00:00:00","gap":" => ","rest":"_9 Mr. Oizo - Numb_"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"- 00:20:34 => _10 Andy C - Strobe [Netsky D'n'B Remix]_","parts":{"lead":"- ","time":"00:20:34","gap":" => ","rest":"_10 Andy C - Strobe [Netsky D'n'B Remix]_"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"10","number":10},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-dash.underline.dot.dotted.mixed.n1.set-b","input":"- 00:00:00. __1. Кино - Группа крови__","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"- 00:00:00. __1. Кино - Группа крови__","parts":{"lead":"- ","time":"00:00:00","gap":". ","rest":"__1. Кино - Группа крови__"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-dot-square.none.space.padded.lf-end.n1.set-e","input":"• [00:00:00] 01 A$AP Rocky - Don't Stop Me Now\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"• [00:00:00] 01 A$AP Rocky - Don't Stop Me Now","parts":{"lead":"• [","time":"00:00:00","gap":"] ","rest":"01 A$AP Rocky - Don't Stop Me Now"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-star.bold.long-arrow.dotted.cr-end.n2.set-c","input":"* 00:00:00 ==> **1. Fox Stevenson - Bruises (Magnetude Remix)**\r* 00:20:34 ==> **2. Gydra - Firestarter (Radio Edit)**\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"* 00:00:00 ==> **1. Fox Stevenson - Bruises (Magnetude Remix)**","parts":{"lead":"* ","time":"00:00:00","gap":" ==> ","rest":"**1. Fox Stevenson - Bruises (Magnetude Remix)**"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r","raw":"* 00:20:34 ==> **2. Gydra - Firestarter (Radio Edit)**","parts":{"lead":"* ","time":"00:20:34","gap":" ==> ","rest":"**2. Gydra - Firestarter (Radio Edit)**"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"2","number":2},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.bullet-star.underline.en-dash.dotted-pad.cr-end.n2.set-f","input":"* 00:00:00 – __01. Camo - Levitate (VIP Mix)__\r* 00:20:34 – __02. Noisia - Diplodocus__\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"* 00:00:00 – __01. Camo - Levitate (VIP Mix)__","parts":{"lead":"* ","time":"00:00:00","gap":" – ","rest":"__01. Camo - Levitate (VIP Mix)__"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r","raw":"* 00:20:34 – __02. Noisia - Diplodocus__","parts":{"lead":"* ","time":"00:20:34","gap":" – ","rest":"__02. Noisia - Diplodocus__"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"02","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.square-bold.bold.dot.bare-9.mixed.n2.set-h","input":"[**00:00:00**]. **9 Mr. Oizo - Numb**\r\n[**00:20:34**]. **10 Andy C - Strobe [Netsky D'n'B Remix]**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"[**00:00:00**]. **9 Mr. Oizo - Numb**","parts":{"lead":"[**","time":"00:00:00","gap":"**]. ","rest":"**9 Mr. Oizo - Numb**"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"[**00:20:34**]. **10 Andy C - Strobe [Netsky D'n'B Remix]**","parts":{"lead":"[**","time":"00:20:34","gap":"**]. ","rest":"**10 Andy C - Strobe [Netsky D'n'B Remix]**"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"10","number":10},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.star.under.en-dash.none.crlf.n1.set-g","input":"*00:00:00* – _The xx - One More Time [Remix by Krooked]_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"*00:00:00* – _The xx - One More Time [Remix by Krooked]_","parts":{"lead":"*","time":"00:00:00","gap":"* – ","rest":"_The xx - One More Time [Remix by Krooked]_"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":null,"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.under-square.star.en-dash.bare-9.mixed-end.n2.set-a","input":"_[00:00:00]_ – *9 Noisia - Diplodocus*\n_[00:20:34]_ – *10 Phace - Hologram (Enei Remix)*\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"_[00:00:00]_ – *9 Noisia - Diplodocus*","parts":{"lead":"_[","time":"00:00:00","gap":"]_ – ","rest":"*9 Noisia - Diplodocus*"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"_[00:20:34]_ – *10 Phace - Hologram (Enei Remix)*","parts":{"lead":"_[","time":"00:20:34","gap":"]_ – ","rest":"*10 Phace - Hologram (Enei Remix)*"},"time":{"raw":"00:20:34","seconds":1234},"track":{"position":{"raw":"10","number":10},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1234}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hh-mm-ss.underline.none.dash.dotted.cr.n1.set-c","input":"__00:00:00__ - 1. Fox Stevenson - Bruises (Magnetude Remix)","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"__00:00:00__ - 1. Fox Stevenson - Bruises (Magnetude Remix)","parts":{"lead":"__","time":"00:00:00","gap":"__ - ","rest":"1. Fox Stevenson - Bruises (Magnetude Remix)"},"time":{"raw":"00:00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bold-open-only.none.space.paren.lf-end.n2.set-h","input":"**[0:00:00.0] 1) Mr. Oizo - Numb\n**[0:15:05.5] 2) Andy C - Strobe [Netsky D'n'B Remix]\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[0:00:00.0] 1) Mr. Oizo - Numb","parts":{"lead":"**[","time":"0:00:00.0","gap":"] ","rest":"1) Mr. Oizo - Numb"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"\n","raw":"**[0:15:05.5] 2) Andy C - Strobe [Netsky D'n'B Remix]","parts":{"lead":"**[","time":"0:15:05.5","gap":"] ","rest":"2) Andy C - Strobe [Netsky D'n'B Remix]"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"2","number":2},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bold-square-bold.star.long-arrow.dotted-pad.crlf.n1.set-c","input":"**[**0:00:00.0**] ==> *01. Fox Stevenson - Bruises (Magnetude Remix)*","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**[**0:00:00.0**] ==> *01. Fox Stevenson - Bruises (Magnetude Remix)*","parts":{"lead":"**[**","time":"0:00:00.0","gap":"**] ==> ","rest":"*01. Fox Stevenson - Bruises (Magnetude Remix)*"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bold-square.under.pipe.bare-9.lf-end.n2.set-g","input":"**[0:00:00.0]** | _9 The xx - One More Time [Remix by Krooked]_\n**[0:15:05.5]** | _10 Кино - Группа крови_\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[0:00:00.0]** | _9 The xx - One More Time [Remix by Krooked]_","parts":{"lead":"**[","time":"0:00:00.0","gap":"]** | ","rest":"_9 The xx - One More Time [Remix by Krooked]_"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\n","raw":"**[0:15:05.5]** | _10 Кино - Группа крови_","parts":{"lead":"**[","time":"0:15:05.5","gap":"]** | ","rest":"_10 Кино - Группа крови_"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"10","number":10},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bold.bold.dot.none.cr-end.n2.set-e","input":"**0:00:00.0**. **A$AP Rocky - Don't Stop Me Now**\r**0:15:05.5**. **P!nk - What's Up?**\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**0:00:00.0**. **A$AP Rocky - Don't Stop Me Now**","parts":{"lead":"**","time":"0:00:00.0","gap":"**. ","rest":"**A$AP Rocky - Don't Stop Me Now**"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":null,"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"**0:15:05.5**. **P!nk - What's Up?**","parts":{"lead":"**","time":"0:15:05.5","gap":"**. ","rest":"**P!nk - What's Up?**"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":null,"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bullet-bold.star.arrow.none.crlf.n1.set-f","input":"- **0:00:00.0** => *Camo - Levitate (VIP Mix)*","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"- **0:00:00.0** => *Camo - Levitate (VIP Mix)*","parts":{"lead":"- **","time":"0:00:00.0","gap":"** => ","rest":"*Camo - Levitate (VIP Mix)*"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":null,"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bullet-dash.underline.space.padded.crlf-end.n2.set-d","input":"- 0:00:00.0 __01 Sigur Rós - Hoppípolla__\r\n- 0:15:05.5 __02 Tiësto - Café del Mar [Extended Mix]__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"- 0:00:00.0 __01 Sigur Rós - Hoppípolla__","parts":{"lead":"- ","time":"0:00:00.0","gap":" ","rest":"__01 Sigur Rós - Hoppípolla__"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"- 0:15:05.5 __02 Tiësto - Café del Mar [Extended Mix]__","parts":{"lead":"- ","time":"0:15:05.5","gap":" ","rest":"__02 Tiësto - Café del Mar [Extended Mix]__"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"02","number":2},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bullet-dot-square.none.dash.padded.crlf-end.n2.set-g","input":"• [0:00:00.0] - 01 The xx - One More Time [Remix by Krooked]\r\n• [0:15:05.5] - 02 Кино - Группа крови\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"• [0:00:00.0] - 01 The xx - One More Time [Remix by Krooked]","parts":{"lead":"• [","time":"0:00:00.0","gap":"] - ","rest":"01 The xx - One More Time [Remix by Krooked]"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\r\n","raw":"• [0:15:05.5] - 02 Кино - Группа крови","parts":{"lead":"• [","time":"0:15:05.5","gap":"] - ","rest":"02 Кино - Группа крови"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"02","number":2},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bullet-star.under.long-arrow.bare.lf.n2.set-d","input":"* 0:00:00.0 ==> _1 Sigur Rós - Hoppípolla_\n* 0:15:05.5 ==> _2 Tiësto - Café del Mar [Extended Mix]_","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"* 0:00:00.0 ==> _1 Sigur Rós - Hoppípolla_","parts":{"lead":"* ","time":"0:00:00.0","gap":" ==> ","rest":"_1 Sigur Rós - Hoppípolla_"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"* 0:15:05.5 ==> _2 Tiësto - Café del Mar [Extended Mix]_","parts":{"lead":"* ","time":"0:15:05.5","gap":" ==> ","rest":"_2 Tiësto - Café del Mar [Extended Mix]_"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"2","number":2},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.bullet-star.under.space.dotted-pad.cr-end.n2.set-a","input":"* 0:00:00.0 _01. Noisia - Diplodocus_\r* 0:15:05.5 _02. Phace - Hologram (Enei Remix)_\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"* 0:00:00.0 _01. Noisia - Diplodocus_","parts":{"lead":"* ","time":"0:00:00.0","gap":" ","rest":"_01. Noisia - Diplodocus_"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"* 0:15:05.5 _02. Phace - Hologram (Enei Remix)_","parts":{"lead":"* ","time":"0:15:05.5","gap":" ","rest":"_02. Phace - Hologram (Enei Remix)_"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"02","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.square-bold.underline.two-spaces.bare.mixed.n2.set-f","input":"[**0:00:00.0**] __1 Camo - Levitate (VIP Mix)__\r\n[**0:15:05.5**] __2 Noisia - Diplodocus__","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"[**0:00:00.0**] __1 Camo - Levitate (VIP Mix)__","parts":{"lead":"[**","time":"0:00:00.0","gap":"**] ","rest":"__1 Camo - Levitate (VIP Mix)__"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"[**0:15:05.5**] __2 Noisia - Diplodocus__","parts":{"lead":"[**","time":"0:15:05.5","gap":"**] ","rest":"__2 Noisia - Diplodocus__"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"2","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.star.underline.dash.dotted.cr.n2.set-a","input":"*0:00:00.0* - __1. Noisia - Diplodocus__\r*0:15:05.5* - __2. Phace - Hologram (Enei Remix)__","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"*0:00:00.0* - __1. Noisia - Diplodocus__","parts":{"lead":"*","time":"0:00:00.0","gap":"* - ","rest":"__1. Noisia - Diplodocus__"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"*0:15:05.5* - __2. Phace - Hologram (Enei Remix)__","parts":{"lead":"*","time":"0:15:05.5","gap":"* - ","rest":"__2. Phace - Hologram (Enei Remix)__"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.under-square.under.arrow.padded.mixed-end.n1.set-b","input":"_[0:00:00.0]_ => _01 Кино - Группа крови_\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"_[0:00:00.0]_ => _01 Кино - Группа крови_","parts":{"lead":"_[","time":"0:00:00.0","gap":"]_ => ","rest":"_01 Кино - Группа крови_"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.under-square.under.dot.none.mixed.n1.set-f","input":"_[0:00:00.0]_. _Camo - Levitate (VIP Mix)_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"_[0:00:00.0]_. _Camo - Levitate (VIP Mix)_","parts":{"lead":"_[","time":"0:00:00.0","gap":"]_. ","rest":"_Camo - Levitate (VIP Mix)_"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":null,"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:hms-frac.underline.none.en-dash.paren.lf.n2.set-h","input":"__0:00:00.0__ – 1) Mr. Oizo - Numb\n__0:15:05.5__ – 2) Andy C - Strobe [Netsky D'n'B Remix]","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"__0:00:00.0__ – 1) Mr. Oizo - Numb","parts":{"lead":"__","time":"0:00:00.0","gap":"__ – ","rest":"1) Mr. Oizo - Numb"},"time":{"raw":"0:00:00.0","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"__0:15:05.5__ – 2) Andy C - Strobe [Netsky D'n'B Remix]","parts":{"lead":"__","time":"0:15:05.5","gap":"__ – ","rest":"2) Andy C - Strobe [Netsky D'n'B Remix]"},"time":{"raw":"0:15:05.5","seconds":905.5},"track":{"position":{"raw":"2","number":2},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":905.5}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bold-open-only.none.two-spaces.bare-9.cr.n2.set-c","input":"**[00:00] 9 Fox Stevenson - Bruises (Magnetude Remix)\r**[30:05] 10 Gydra - Firestarter (Radio Edit)","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**[00:00] 9 Fox Stevenson - Bruises (Magnetude Remix)","parts":{"lead":"**[","time":"00:00","gap":"] ","rest":"9 Fox Stevenson - Bruises (Magnetude Remix)"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"**[30:05] 10 Gydra - Firestarter (Radio Edit)","parts":{"lead":"**[","time":"30:05","gap":"] ","rest":"10 Gydra - Firestarter (Radio Edit)"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"10","number":10},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bold-square-bold.star.dash.bare-9.mixed.n2.set-d","input":"**[**00:00**] - *9 Sigur Rós - Hoppípolla*\r\n**[**30:05**] - *10 Tiësto - Café del Mar [Extended Mix]*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[**00:00**] - *9 Sigur Rós - Hoppípolla*","parts":{"lead":"**[**","time":"00:00","gap":"**] - ","rest":"*9 Sigur Rós - Hoppípolla*"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"**[**30:05**] - *10 Tiësto - Café del Mar [Extended Mix]*","parts":{"lead":"**[**","time":"30:05","gap":"**] - ","rest":"*10 Tiësto - Café del Mar [Extended Mix]*"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"10","number":10},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bold-square.underline.en-dash.dotted.crlf.n2.set-a","input":"**[00:00]** – __1. Noisia - Diplodocus__\r\n**[30:05]** – __2. Phace - Hologram (Enei Remix)__","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[00:00]** – __1. Noisia - Diplodocus__","parts":{"lead":"**[","time":"00:00","gap":"]** – ","rest":"__1. Noisia - Diplodocus__"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"**[30:05]** – __2. Phace - Hologram (Enei Remix)__","parts":{"lead":"**[","time":"30:05","gap":"]** – ","rest":"__2. Phace - Hologram (Enei Remix)__"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bold.none.long-arrow.dotted-pad.mixed-end.n1.set-h","input":"**00:00** ==> 01. Mr. Oizo - Numb\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**00:00** ==> 01. Mr. Oizo - Numb","parts":{"lead":"**","time":"00:00","gap":"** ==> ","rest":"01. Mr. Oizo - Numb"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bullet-bold.star.long-arrow.paren.cr-end.n2.set-a","input":"- **00:00** ==> *1) Noisia - Diplodocus*\r- **30:05** ==> *2) Phace - Hologram (Enei Remix)*\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"- **00:00** ==> *1) Noisia - Diplodocus*","parts":{"lead":"- **","time":"00:00","gap":"** ==> ","rest":"*1) Noisia - Diplodocus*"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"- **30:05** ==> *2) Phace - Hologram (Enei Remix)*","parts":{"lead":"- **","time":"30:05","gap":"** ==> ","rest":"*2) Phace - Hologram (Enei Remix)*"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bullet-dash.bold.dot.paren.crlf.n1.set-f","input":"- 00:00. **1) Camo - Levitate (VIP Mix)**","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"- 00:00. **1) Camo - Levitate (VIP Mix)**","parts":{"lead":"- ","time":"00:00","gap":". ","rest":"**1) Camo - Levitate (VIP Mix)**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bullet-dot-square.bold.arrow.dotted-pad.lf.n2.set-a","input":"• [00:00] => **01. Noisia - Diplodocus**\n• [30:05] => **02. Phace - Hologram (Enei Remix)**","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"• [00:00] => **01. Noisia - Diplodocus**","parts":{"lead":"• [","time":"00:00","gap":"] => ","rest":"**01. Noisia - Diplodocus**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"• [30:05] => **02. Phace - Hologram (Enei Remix)**","parts":{"lead":"• [","time":"30:05","gap":"] => ","rest":"**02. Phace - Hologram (Enei Remix)**"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"02","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.bullet-star.under.dash.dotted.crlf-end.n2.set-f","input":"* 00:00 - _1. Camo - Levitate (VIP Mix)_\r\n* 30:05 - _2. Noisia - Diplodocus_\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"* 00:00 - _1. Camo - Levitate (VIP Mix)_","parts":{"lead":"* ","time":"00:00","gap":" - ","rest":"_1. Camo - Levitate (VIP Mix)_"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r\n","raw":"* 30:05 - _2. Noisia - Diplodocus_","parts":{"lead":"* ","time":"30:05","gap":" - ","rest":"_2. Noisia - Diplodocus_"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"2","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.square-bold.under.space.none.lf-end.n1.set-b","input":"[**00:00**] _Кино - Группа крови_\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"[**00:00**] _Кино - Группа крови_","parts":{"lead":"[**","time":"00:00","gap":"**] ","rest":"_Кино - Группа крови_"},"time":{"raw":"00:00","seconds":0},"track":{"position":null,"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.star.star.dot.padded.lf.n1.set-e","input":"*00:00*. *01 A$AP Rocky - Don't Stop Me Now*","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"*00:00*. *01 A$AP Rocky - Don't Stop Me Now*","parts":{"lead":"*","time":"00:00","gap":"*. ","rest":"*01 A$AP Rocky - Don't Stop Me Now*"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.under-square.underline.arrow.bare.cr-end.n2.set-c","input":"_[00:00]_ => __1 Fox Stevenson - Bruises (Magnetude Remix)__\r_[30:05]_ => __2 Gydra - Firestarter (Radio Edit)__\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"_[00:00]_ => __1 Fox Stevenson - Bruises (Magnetude Remix)__","parts":{"lead":"_[","time":"00:00","gap":"]_ => ","rest":"__1 Fox Stevenson - Bruises (Magnetude Remix)__"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\r","raw":"_[30:05]_ => __2 Gydra - Firestarter (Radio Edit)__","parts":{"lead":"_[","time":"30:05","gap":"]_ => ","rest":"__2 Gydra - Firestarter (Radio Edit)__"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"2","number":2},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.underline.bold.dash.dotted.lf-end.n1.set-e","input":"__00:00__ - **1. A$AP Rocky - Don't Stop Me Now**\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"__00:00__ - **1. A$AP Rocky - Don't Stop Me Now**","parts":{"lead":"__","time":"00:00","gap":"__ - ","rest":"**1. A$AP Rocky - Don't Stop Me Now**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:long-min.underline.bold.pipe.paren.crlf-end.n2.set-g","input":"__00:00__ | **1) The xx - One More Time [Remix by Krooked]**\r\n__30:05__ | **2) Кино - Группа крови**\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"__00:00__ | **1) The xx - One More Time [Remix by Krooked]**","parts":{"lead":"__","time":"00:00","gap":"__ | ","rest":"**1) The xx - One More Time [Remix by Krooked]**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\r\n","raw":"__30:05__ | **2) Кино - Группа крови**","parts":{"lead":"__","time":"30:05","gap":"__ | ","rest":"**2) Кино - Группа крови**"},"time":{"raw":"30:05","seconds":1805},"track":{"position":{"raw":"2","number":2},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":1805}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bold-open-only.bold.pipe.paren.cr.n2.set-a","input":"**[0:00] | **1) Noisia - Diplodocus**\r**[3:45] | **2) Phace - Hologram (Enei Remix)**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**[0:00] | **1) Noisia - Diplodocus**","parts":{"lead":"**[","time":"0:00","gap":"] | ","rest":"**1) Noisia - Diplodocus**"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"**[3:45] | **2) Phace - Hologram (Enei Remix)**","parts":{"lead":"**[","time":"3:45","gap":"] | ","rest":"**2) Phace - Hologram (Enei Remix)**"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bold-open-only.under.arrow.dotted.cr-end.n2.set-e","input":"**[0:00] => _1. A$AP Rocky - Don't Stop Me Now_\r**[3:45] => _2. P!nk - What's Up?_\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**[0:00] => _1. A$AP Rocky - Don't Stop Me Now_","parts":{"lead":"**[","time":"0:00","gap":"] => ","rest":"_1. A$AP Rocky - Don't Stop Me Now_"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"**[3:45] => _2. P!nk - What's Up?_","parts":{"lead":"**[","time":"3:45","gap":"] => ","rest":"_2. P!nk - What's Up?_"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bold-square-bold.star.en-dash.bare.crlf-end.n2.set-h","input":"**[**0:00**] – *1 Mr. Oizo - Numb*\r\n**[**3:45**] – *2 Andy C - Strobe [Netsky D'n'B Remix]*\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[**0:00**] – *1 Mr. Oizo - Numb*","parts":{"lead":"**[**","time":"0:00","gap":"**] – ","rest":"*1 Mr. Oizo - Numb*"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"**[**3:45**] – *2 Andy C - Strobe [Netsky D'n'B Remix]*","parts":{"lead":"**[**","time":"3:45","gap":"**] – ","rest":"*2 Andy C - Strobe [Netsky D'n'B Remix]*"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Andy C"],"title":"Strobe","versions":[{"type":"remix","raw":"Netsky D'n'B Remix","artists":["Netsky"],"descriptor":"D'n'B","delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bold-square.none.two-spaces.padded.mixed.n2.set-f","input":"**[0:00]** 01 Camo - Levitate (VIP Mix)\r\n**[3:45]** 02 Noisia - Diplodocus","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[0:00]** 01 Camo - Levitate (VIP Mix)","parts":{"lead":"**[","time":"0:00","gap":"]** ","rest":"01 Camo - Levitate (VIP Mix)"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"**[3:45]** 02 Noisia - Diplodocus","parts":{"lead":"**[","time":"3:45","gap":"]** ","rest":"02 Noisia - Diplodocus"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"02","number":2},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bold.bold.space.dotted.cr.n1.set-a","input":"**0:00** **1. Noisia - Diplodocus**","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"**0:00** **1. Noisia - Diplodocus**","parts":{"lead":"**","time":"0:00","gap":"** ","rest":"**1. Noisia - Diplodocus**"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bullet-bold.underline.dot.bare.cr.n2.set-d","input":"- **0:00**. __1 Sigur Rós - Hoppípolla__\r- **3:45**. __2 Tiësto - Café del Mar [Extended Mix]__","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"- **0:00**. __1 Sigur Rós - Hoppípolla__","parts":{"lead":"- **","time":"0:00","gap":"**. ","rest":"__1 Sigur Rós - Hoppípolla__"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"- **3:45**. __2 Tiësto - Café del Mar [Extended Mix]__","parts":{"lead":"- **","time":"3:45","gap":"**. ","rest":"__2 Tiësto - Café del Mar [Extended Mix]__"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Tiësto"],"title":"Café del Mar","versions":[{"type":"extended","raw":"Extended Mix","artists":[],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bullet-dash.underline.long-arrow.padded.crlf-end.n1.set-e","input":"- 0:00 ==> __01 A$AP Rocky - Don't Stop Me Now__\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"- 0:00 ==> __01 A$AP Rocky - Don't Stop Me Now__","parts":{"lead":"- ","time":"0:00","gap":" ==> ","rest":"__01 A$AP Rocky - Don't Stop Me Now__"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bullet-dot-square.under.en-dash.paren.mixed.n1.set-c","input":"• [0:00] – _1) Fox Stevenson - Bruises (Magnetude Remix)_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"• [0:00] – _1) Fox Stevenson - Bruises (Magnetude Remix)_","parts":{"lead":"• [","time":"0:00","gap":"] – ","rest":"_1) Fox Stevenson - Bruises (Magnetude Remix)_"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.bullet-star.star.arrow.paren.lf-end.n1.set-f","input":"* 0:00 => *1) Camo - Levitate (VIP Mix)*\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"* 0:00 => *1) Camo - Levitate (VIP Mix)*","parts":{"lead":"* ","time":"0:00","gap":" => ","rest":"*1) Camo - Levitate (VIP Mix)*"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.square-bold.underline.dash.paren.mixed-end.n2.set-g","input":"[**0:00**] - __1) The xx - One More Time [Remix by Krooked]__\n[**3:45**] - __2) Кино - Группа крови__\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"[**0:00**] - __1) The xx - One More Time [Remix by Krooked]__","parts":{"lead":"[**","time":"0:00","gap":"**] - ","rest":"__1) The xx - One More Time [Remix by Krooked]__"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"\r","raw":"[**3:45**] - __2) Кино - Группа крови__","parts":{"lead":"[**","time":"3:45","gap":"**] - ","rest":"__2) Кино - Группа крови__"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.star.bold.long-arrow.bare-9.lf-end.n2.set-c","input":"*0:00* ==> **9 Fox Stevenson - Bruises (Magnetude Remix)**\n*3:45* ==> **10 Gydra - Firestarter (Radio Edit)**\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"*0:00* ==> **9 Fox Stevenson - Bruises (Magnetude Remix)**","parts":{"lead":"*","time":"0:00","gap":"* ==> ","rest":"**9 Fox Stevenson - Bruises (Magnetude Remix)**"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"\n","raw":"*3:45* ==> **10 Gydra - Firestarter (Radio Edit)**","parts":{"lead":"*","time":"3:45","gap":"* ==> ","rest":"**10 Gydra - Firestarter (Radio Edit)**"},"time":{"raw":"3:45","seconds":225},"track":{"position":{"raw":"10","number":10},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.under-square.none.pipe.none.crlf.n1.set-d","input":"_[0:00]_ | Sigur Rós - Hoppípolla","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"_[0:00]_ | Sigur Rós - Hoppípolla","parts":{"lead":"_[","time":"0:00","gap":"]_ | ","rest":"Sigur Rós - Hoppípolla"},"time":{"raw":"0:00","seconds":0},"track":{"position":null,"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:m-ss.underline.under.dot.dotted-pad.lf.n1.set-b","input":"__0:00__. _01. Кино - Группа крови_","expected":{"entries":[{"line":1,"kind":"track","eol":"","raw":"__0:00__. _01. Кино - Группа крови_","parts":{"lead":"__","time":"0:00","gap":"__. ","rest":"_01. Кино - Группа крови_"},"time":{"raw":"0:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bold-open-only.bold.en-dash.padded.mixed-end.n1.set-d","input":"**[00:00] – **01 Sigur Rós - Hoppípolla**\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[00:00] – **01 Sigur Rós - Hoppípolla**","parts":{"lead":"**[","time":"00:00","gap":"] – ","rest":"**01 Sigur Rós - Hoppípolla**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Sigur Rós"],"title":"Hoppípolla","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bold-open-only.star.dot.none.crlf.n2.set-b","input":"**[00:00]. *Кино - Группа крови*\r\n**[03:45]. *Звери - Кукла колдуна*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"**[00:00]. *Кино - Группа крови*","parts":{"lead":"**[","time":"00:00","gap":"]. ","rest":"*Кино - Группа крови*"},"time":{"raw":"00:00","seconds":0},"track":{"position":null,"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"**[03:45]. *Звери - Кукла колдуна*","parts":{"lead":"**[","time":"03:45","gap":"]. ","rest":"*Звери - Кукла колдуна*"},"time":{"raw":"03:45","seconds":225},"track":{"position":null,"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bold-square-bold.none.dot.dotted.lf-end.n1.set-g","input":"**[**00:00**]. 1. The xx - One More Time [Remix by Krooked]\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**[**00:00**]. 1. The xx - One More Time [Remix by Krooked]","parts":{"lead":"**[**","time":"00:00","gap":"**]. ","rest":"1. The xx - One More Time [Remix by Krooked]"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bold-square.bold.dash.none.cr-end.n1.set-h","input":"**[00:00]** - **Mr. Oizo - Numb**\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"**[00:00]** - **Mr. Oizo - Numb**","parts":{"lead":"**[","time":"00:00","gap":"]** - ","rest":"**Mr. Oizo - Numb**"},"time":{"raw":"00:00","seconds":0},"track":{"position":null,"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bold.underline.pipe.bare-9.lf.n2.set-f","input":"**00:00** | __9 Camo - Levitate (VIP Mix)__\n**03:45** | __10 Noisia - Diplodocus__","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"**00:00** | __9 Camo - Levitate (VIP Mix)__","parts":{"lead":"**","time":"00:00","gap":"** | ","rest":"__9 Camo - Levitate (VIP Mix)__"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"9","number":9},"artists":["Camo"],"title":"Levitate","versions":[{"type":"vip","raw":"VIP Mix","artists":[],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"**03:45** | __10 Noisia - Diplodocus__","parts":{"lead":"**","time":"03:45","gap":"** | ","rest":"__10 Noisia - Diplodocus__"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"10","number":10},"artists":["Noisia"],"title":"Diplodocus","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bullet-bold.underline.two-spaces.dotted-pad.lf-end.n1.set-h","input":"- **00:00** __01. Mr. Oizo - Numb__\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- **00:00** __01. Mr. Oizo - Numb__","parts":{"lead":"- **","time":"00:00","gap":"** ","rest":"__01. Mr. Oizo - Numb__"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Mr. Oizo"],"title":"Numb","versions":[]}}],"warnings":[],"stats":{"lines":1,"tracks":1,"markers":0,"timed":1,"firstTime":0,"lastTime":0}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bullet-dash.none.dash.none.mixed-end.n2.set-b","input":"- 00:00 - Кино - Группа крови\n- 03:45 - Звери - Кукла колдуна\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- 00:00 - Кино - Группа крови","parts":{"lead":"- ","time":"00:00","gap":" - ","rest":"Кино - Группа крови"},"time":{"raw":"00:00","seconds":0},"track":{"position":null,"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"- 03:45 - Звери - Кукла колдуна","parts":{"lead":"- ","time":"03:45","gap":" - ","rest":"Звери - Кукла колдуна"},"time":{"raw":"03:45","seconds":225},"track":{"position":null,"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bullet-dash.star.two-spaces.none.lf.n2.set-g","input":"- 00:00 *The xx - One More Time [Remix by Krooked]*\n- 03:45 *Кино - Группа крови*","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"- 00:00 *The xx - One More Time [Remix by Krooked]*","parts":{"lead":"- ","time":"00:00","gap":" ","rest":"*The xx - One More Time [Remix by Krooked]*"},"time":{"raw":"00:00","seconds":0},"track":{"position":null,"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"","raw":"- 03:45 *Кино - Группа крови*","parts":{"lead":"- ","time":"03:45","gap":" ","rest":"*Кино - Группа крови*"},"time":{"raw":"03:45","seconds":225},"track":{"position":null,"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bullet-dot-square.star.pipe.dotted.mixed-end.n2.set-b","input":"• [00:00] | *1. Кино - Группа крови*\n• [03:45] | *2. Звери - Кукла колдуна*\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"• [00:00] | *1. Кино - Группа крови*","parts":{"lead":"• [","time":"00:00","gap":"] | ","rest":"*1. Кино - Группа крови*"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"• [03:45] | *2. Звери - Кукла колдуна*","parts":{"lead":"• [","time":"03:45","gap":"] | ","rest":"*2. Звери - Кукла колдуна*"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.bullet-star.bold.pipe.bare.mixed.n2.set-e","input":"* 00:00 | **1 A$AP Rocky - Don't Stop Me Now**\r\n* 03:45 | **2 P!nk - What's Up?**","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"* 00:00 | **1 A$AP Rocky - Don't Stop Me Now**","parts":{"lead":"* ","time":"00:00","gap":" | ","rest":"**1 A$AP Rocky - Don't Stop Me Now**"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["A$AP Rocky"],"title":"Don't Stop Me Now","versions":[]}},{"line":2,"kind":"track","eol":"","raw":"* 03:45 | **2 P!nk - What's Up?**","parts":{"lead":"* ","time":"03:45","gap":" | ","rest":"**2 P!nk - What's Up?**"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["P!nk"],"title":"What's Up?","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.square-bold.star.space.dotted-pad.crlf.n2.set-c","input":"[**00:00**] *01. Fox Stevenson - Bruises (Magnetude Remix)*\r\n[**03:45**] *02. Gydra - Firestarter (Radio Edit)*","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"[**00:00**] *01. Fox Stevenson - Bruises (Magnetude Remix)*","parts":{"lead":"[**","time":"00:00","gap":"**] ","rest":"*01. Fox Stevenson - Bruises (Magnetude Remix)*"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["Fox Stevenson"],"title":"Bruises","versions":[{"type":"remix","raw":"Magnetude Remix","artists":["Magnetude"],"delimiter":"("}]}},{"line":2,"kind":"track","eol":"","raw":"[**03:45**] *02. Gydra - Firestarter (Radio Edit)*","parts":{"lead":"[**","time":"03:45","gap":"**] ","rest":"*02. Gydra - Firestarter (Radio Edit)*"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"02","number":2},"artists":["Gydra"],"title":"Firestarter","versions":[{"type":"radio","raw":"Radio Edit","artists":[],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.star.none.arrow.paren.crlf-end.n2.set-b","input":"*00:00* => 1) Кино - Группа крови\r\n*03:45* => 2) Звери - Кукла колдуна\r\n","expected":{"entries":[{"line":1,"kind":"track","eol":"\r\n","raw":"*00:00* => 1) Кино - Группа крови","parts":{"lead":"*","time":"00:00","gap":"* => ","rest":"1) Кино - Группа крови"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Кино"],"title":"Группа крови","versions":[]}},{"line":2,"kind":"track","eol":"\r\n","raw":"*03:45* => 2) Звери - Кукла колдуна","parts":{"lead":"*","time":"03:45","gap":"* => ","rest":"2) Звери - Кукла колдуна"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Звери"],"title":"Кукла колдуна","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R6.10","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.under-square.under.long-arrow.padded.cr.n2.set-g","input":"_[00:00]_ ==> _01 The xx - One More Time [Remix by Krooked]_\r_[03:45]_ ==> _02 Кино - Группа крови_","expected":{"entries":[{"line":1,"kind":"track","eol":"\r","raw":"_[00:00]_ ==> _01 The xx - One More Time [Remix by Krooked]_","parts":{"lead":"_[","time":"00:00","gap":"]_ ==> ","rest":"_01 The xx - One More Time [Remix by Krooked]_"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"01","number":1},"artists":["The xx"],"title":"One More Time","versions":[{"type":"remix","raw":"Remix by Krooked","artists":["Krooked"],"delimiter":"["}]}},{"line":2,"kind":"track","eol":"","raw":"_[03:45]_ ==> _02 Кино - Группа крови_","parts":{"lead":"_[","time":"03:45","gap":"]_ ==> ","rest":"_02 Кино - Группа крови_"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"02","number":2},"artists":["Кино"],"title":"Группа крови","versions":[]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R4.2","R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.8","R13.12"]}, + {"id":"gen:tracklist-emphasis:mm-ss.underline.under.two-spaces.bare.mixed-end.n2.set-a","input":"__00:00__ _1 Noisia - Diplodocus_\n__03:45__ _2 Phace - Hologram (Enei Remix)_\r","expected":{"entries":[{"line":1,"kind":"track","eol":"\n","raw":"__00:00__ _1 Noisia - Diplodocus_","parts":{"lead":"__","time":"00:00","gap":"__ ","rest":"_1 Noisia - Diplodocus_"},"time":{"raw":"00:00","seconds":0},"track":{"position":{"raw":"1","number":1},"artists":["Noisia"],"title":"Diplodocus","versions":[]}},{"line":2,"kind":"track","eol":"\r","raw":"__03:45__ _2 Phace - Hologram (Enei Remix)_","parts":{"lead":"__","time":"03:45","gap":"__ ","rest":"_2 Phace - Hologram (Enei Remix)_"},"time":{"raw":"03:45","seconds":225},"track":{"position":{"raw":"2","number":2},"artists":["Phace"],"title":"Hologram","versions":[{"type":"remix","raw":"Enei Remix","artists":["Enei"],"delimiter":"("}]}}],"warnings":[],"stats":{"lines":2,"tracks":2,"markers":0,"timed":2,"firstTime":0,"lastTime":225}},"rules":["R5.7","R6.10","R8.1","R9.4","R13.1.1","R13.1.2","R13.1.3","R13.2.1","R13.2.2","R13.2.3","R13.2.5","R13.3","R13.4.1","R13.5","R13.8","R13.12"]} + ] +} diff --git a/spec/fixtures/handwritten/tracklist-edits.json b/spec/fixtures/handwritten/tracklist-edits.json index 320ab4e..188e269 100644 --- a/spec/fixtures/handwritten/tracklist-edits.json +++ b/spec/fixtures/handwritten/tracklist-edits.json @@ -1799,6 +1799,82 @@ "R13.9" ], "note": "A gap that already ends with whitespace is kept as is." + }, + { + "id": "tracklist-edits-076", + "input": "**[**14:21**] Nitepunk - ID**", + "edits": [ + { + "op": "set-time", + "line": 1, + "seconds": 900 + } + ], + "expected": { + "text": "**[**15:00**] Nitepunk - ID**", + "changed": [ + 1 + ], + "warnings": [] + }, + "rules": [ + "R13.9", + "R13.2.1", + "R13.2.3" + ], + "note": "The emphasis sits in lead and gap, so a rewritten time keeps it." + }, + { + "id": "tracklist-edits-077", + "input": "**14:21** Nitepunk - ID\r\n__[15:00]__ Noisia - Stigma", + "edits": [ + { + "op": "shift", + "seconds": 60 + } + ], + "expected": { + "text": "**15:21** Nitepunk - ID\r\n__[16:00]__ Noisia - Stigma", + "changed": [ + 1, + 2 + ], + "warnings": [] + }, + "rules": [ + "R13.9", + "R13.2.1", + "R13.2.3" + ] + }, + { + "id": "tracklist-edits-078", + "input": "**[**14:21**] Nitepunk - ID**", + "edits": [ + { + "op": "set-rest", + "line": 1, + "rest": "Noisia - Stigma" + }, + { + "op": "set-time", + "line": 1, + "seconds": 0 + } + ], + "expected": { + "text": "**[**00:00**] Noisia - Stigma", + "changed": [ + 1 + ], + "warnings": [] + }, + "rules": [ + "R13.9", + "R13.2.1", + "R13.2.3" + ], + "note": "Replacing rest removes the closing ** at the end of the line; the time is still read, because runs next to it are read by position." } ] } diff --git a/spec/fixtures/handwritten/tracklist-lines.json b/spec/fixtures/handwritten/tracklist-lines.json index cfac6a3..3916f68 100644 --- a/spec/fixtures/handwritten/tracklist-lines.json +++ b/spec/fixtures/handwritten/tracklist-lines.json @@ -1623,6 +1623,111 @@ "R13.7" ], "note": "Near miss: 'Introduction' is not a marker word, so a timed track that warns line-unparsed." + }, + { + "id": "tracklist-lines-042", + "input": "**Intro**", + "expected": { + "entries": [ + { + "kind": "marker", + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "**Intro**" + }, + "track": { + "artists": [], + "title": "Intro" + } + } + ] + }, + "rules": [ + "R13.3", + "R13.12" + ], + "note": "Kinds are decided on the text without emphasis." + }, + { + "id": "tracklist-lines-043", + "input": "**Part 2:**", + "expected": { + "entries": [ + { + "kind": "header", + "track": null + } + ] + }, + "rules": [ + "R13.3", + "R13.12" + ] + }, + { + "id": "tracklist-lines-044", + "input": "**https://example.com/set**", + "expected": { + "entries": [ + { + "kind": "link", + "track": null + } + ] + }, + "rules": [ + "R13.3", + "R13.12" + ] + }, + { + "id": "tracklist-lines-045", + "input": "**Nitepunk - No Manners**", + "expected": { + "entries": [ + { + "kind": "track", + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "**Nitepunk - No Manners**" + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners" + } + } + ] + }, + "rules": [ + "R13.3", + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-lines-046", + "input": "00:00 **Intro**", + "expected": { + "entries": [ + { + "kind": "marker", + "track": { + "artists": [], + "title": "Intro" + } + } + ] + }, + "rules": [ + "R13.3", + "R13.12" + ] } ] } diff --git a/spec/fixtures/handwritten/tracklist-mode.json b/spec/fixtures/handwritten/tracklist-mode.json index 689aacd..1c3caf4 100644 --- a/spec/fixtures/handwritten/tracklist-mode.json +++ b/spec/fixtures/handwritten/tracklist-mode.json @@ -1633,6 +1633,270 @@ "R6.10" ], "note": "Control for tracklist-mode-053: a timed line without a marker word still uses the tight dash." + }, + { + "id": "tracklist-mode-055", + "input": "00:00 **Nitepunk** - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "**Nitepunk** - ID" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-mode-056", + "input": "00:00 Nitepunk - **No Manners**", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "Nitepunk - **No Manners**" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-mode-057", + "input": "00:00 __**Nitepunk - No Manners**__", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "__**Nitepunk - No Manners**__" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ], + "note": "Discord underline around bold." + }, + { + "id": "tracklist-mode-058", + "input": "00:00 Nitepunk - No Manners (**VIP**)", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "Nitepunk - No Manners (**VIP**)" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners", + "versions": [ + { + "type": "vip" + } + ] + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ], + "note": "A bracket is an outer side, so the VIP inside the bold is still a version." + }, + { + "id": "tracklist-mode-059", + "input": "00:00 *Nitepunk - No Manners*", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "*Nitepunk - No Manners*" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-mode-060", + "input": "00:00 _Nitepunk - No Manners_", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "00:00", + "gap": " ", + "rest": "_Nitepunk - No Manners_" + }, + "time": { + "raw": "00:00", + "seconds": 0 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-mode-061", + "input": "00:00 P*nk - Raise Your Glass\n01:00 *NSYNC - Bye Bye Bye\n02:00 A**hole - Title\n03:00 Artist - Holy Sh**\n04:00 DJ_Name - Title\n05:00 Art_ist - Don`t Stop\n06:00 Mr_Bill - F**k It\n07:00 Noisia_-_Stigma", + "expected": { + "entries": [ + { + "track": { + "artists": [ + "P*nk" + ], + "title": "Raise Your Glass" + } + }, + { + "track": { + "artists": [ + "*NSYNC" + ], + "title": "Bye Bye Bye" + } + }, + { + "track": { + "artists": [ + "A**hole" + ], + "title": "Title" + } + }, + { + "track": { + "artists": [ + "Artist" + ], + "title": "Holy Sh**" + } + }, + { + "track": { + "artists": [ + "DJ_Name" + ], + "title": "Title" + } + }, + { + "track": { + "artists": [ + "Art_ist" + ], + "title": "Don't Stop" + } + }, + { + "track": { + "artists": [ + "Mr_Bill" + ], + "title": "F**k It" + } + }, + { + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.12", + "R13.4.1" + ], + "note": "Near misses: stars and underscores inside words, unpaired ones, backticks and the _-_ separator are text, never emphasis." } ] } diff --git a/spec/fixtures/handwritten/tracklist-times.json b/spec/fixtures/handwritten/tracklist-times.json index 29e8900..880422e 100644 --- a/spec/fixtures/handwritten/tracklist-times.json +++ b/spec/fixtures/handwritten/tracklist-times.json @@ -1101,6 +1101,463 @@ "R13.8" ], "note": "A bulleted list pasted from Discord or Reddit." + }, + { + "id": "tracklist-times-036", + "input": "**[**14:21**] 10. Nitepunk - ID**", + "expected": { + "entries": [ + { + "parts": { + "lead": "**[**", + "time": "14:21", + "gap": "**] ", + "rest": "10. Nitepunk - ID**" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID", + "position": { + "number": 10 + } + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12", + "R13.4.1" + ], + "note": "Two bold spans around a styled time, from a list pasted with Markdown. The closing ** at the end pairs with the opening one and is left out of the track part.", + "source": "real DJ set tracklist (Nitepunk)" + }, + { + "id": "tracklist-times-037", + "input": "**[**14:21**] Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "**[**", + "time": "14:21", + "gap": "**] ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ], + "note": "Runs next to the time are read by position, so the line keeps its time without the closing run at the end." + }, + { + "id": "tracklist-times-038", + "input": "**14:21** Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "**", + "time": "14:21", + "gap": "** ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ] + }, + { + "id": "tracklist-times-039", + "input": "[**14:21**] Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "[**", + "time": "14:21", + "gap": "**] ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ] + }, + { + "id": "tracklist-times-040", + "input": "**[14:21]** Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "**[", + "time": "14:21", + "gap": "]** ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ] + }, + { + "id": "tracklist-times-041", + "input": "__[14:21] Nitepunk - ID__", + "expected": { + "entries": [ + { + "parts": { + "lead": "__[", + "time": "14:21", + "gap": "] ", + "rest": "Nitepunk - ID__" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12", + "R13.4.1" + ] + }, + { + "id": "tracklist-times-042", + "input": "*[14:21] Nitepunk - ID*", + "expected": { + "entries": [ + { + "parts": { + "lead": "*[", + "time": "14:21", + "gap": "] ", + "rest": "Nitepunk - ID*" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12", + "R13.4.1" + ], + "note": "YouTube comments write bold with single stars." + }, + { + "id": "tracklist-times-043", + "input": "_[14:21]_ Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "_[", + "time": "14:21", + "gap": "]_ ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ] + }, + { + "id": "tracklist-times-044", + "input": "[14:21]_ Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "[", + "time": "14:21", + "gap": "]", + "rest": "_ Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ], + "note": "Near miss: a closing run needs an opening run of the same character in the lead, so the _ stays in rest as before." + }, + { + "id": "tracklist-times-045", + "input": "**14:21**Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "**14:21**Nitepunk - ID" + }, + "time": null + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ], + "note": "Near miss: without a bracket, the closing run must be followed by the end of the line, whitespace or a gap separator." + }, + { + "id": "tracklist-times-046", + "input": "**[**1:75**] Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "**[**1:75**] Nitepunk - ID" + }, + "time": null + } + ], + "warnings": [ + { + "code": "invalid-time", + "line": 1, + "severity": "warning", + "suggestion": null + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12", + "R13.2.4" + ] + }, + { + "id": "tracklist-times-047", + "input": "* **14:21** Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "* **", + "time": "14:21", + "gap": "** ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ], + "note": "A bullet, then a bold time." + }, + { + "id": "tracklist-times-048", + "input": "**14:21 - Nitepunk - ID**", + "expected": { + "entries": [ + { + "parts": { + "lead": "**", + "time": "14:21", + "gap": " - ", + "rest": "Nitepunk - ID**" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12", + "R13.4.1" + ], + "note": "One bold span over the whole line." + }, + { + "id": "tracklist-times-049", + "input": "***14:21*** Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "***14:21*** Nitepunk - ID" + }, + "time": null + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ], + "note": "Near miss: a run of three is not an emphasis run." + }, + { + "id": "tracklist-times-050", + "input": "**14:21**- Nitepunk - ID", + "expected": { + "entries": [ + { + "parts": { + "lead": "**", + "time": "14:21", + "gap": "**- ", + "rest": "Nitepunk - ID" + }, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID" + } + } + ] + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.12" + ] } ] } diff --git a/spec/generator/README.md b/spec/generator/README.md index d4221ab..af8f1af 100644 --- a/spec/generator/README.md +++ b/spec/generator/README.md @@ -41,6 +41,7 @@ When the SPEC changes, update the atom expectations and `problem()` in the same | `dedup` | repeated credits in every placement (R0.4, R7.6, R9.2), exhaustive | | `kitchen-sink` | all dimensions at once | | `tracklist` | `fn: "parseTracklist"` over 1–6 line texts: time forms × lead/brackets × gaps × dotted/padded/bare positions × line endings × extra line kinds × time orders (R13, R6.10) | +| `tracklist-emphasis` | `fn: "parseTracklist"` with Markdown: list bullets and emphasis runs around the time (`**T**`, `**[T]**`, `[**T**]`, `_[T]_`…) × emphasis around each track line (`**`, `__`, `*`, `_`) × time forms × gaps × positions × line endings (R13.2, R13.12) | Scenarios whose product is at most `exhaustiveLimit` are exhaustive. The others use a greedy pairwise covering array (every pair of atom values from two dimensions appears in at least one @@ -60,8 +61,8 @@ valid case) plus a seeded random sample (`sample` per scenario, `kitchenSinkSamp - `expected.fullTitle` is present only when there are versions (otherwise it equals `title`). - The `versions` and `dash-suffix` scenarios spell every version field out. The others assert `type`, `raw`, `artists`, `delimiter` and the non-default fields. -- `tracklist` cases (`defaults.fn: "parseTracklist"`) assert every entry (arrays match in length) - with partial objects, plus `warnings` and `stats`. +- `tracklist` and `tracklist-emphasis` cases (`defaults.fn: "parseTracklist"`) assert every entry + (arrays match in length) with partial objects, plus `warnings` and `stats`. - No per-case `tags`: the id already names the atoms. `summary.json` has per-dimension counts. ## Commands diff --git a/spec/generator/src/atoms.ts b/spec/generator/src/atoms.ts index 5af25cd..0f7b0c0 100644 --- a/spec/generator/src/atoms.ts +++ b/spec/generator/src/atoms.ts @@ -783,6 +783,38 @@ export const LEADS: LeadAtom[] = [ { id: "spaces-square", text: " [", close: "]" }, ]; +/** + * Leads with Markdown emphasis or a list bullet (R13.2.1, R13.2.3, R13.12). `close` is everything + * between the time and the gap atom: closing runs and the closing bracket. + */ +export const EMPHASIS_LEADS: LeadAtom[] = [ + { id: "bold", text: "**", close: "**" }, + { id: "bold-square", text: "**[", close: "]**" }, + { id: "square-bold", text: "[**", close: "**]" }, + { id: "bold-square-bold", text: "**[**", close: "**]" }, + { id: "underline", text: "__", close: "__" }, + { id: "star", text: "*", close: "*" }, + { id: "under-square", text: "_[", close: "]_" }, + { id: "bold-open-only", text: "**[", close: "]" }, + { id: "bullet-star", text: "* ", close: "" }, + { id: "bullet-dash", text: "- ", close: "" }, + { id: "bullet-dot-square", text: "• [", close: "]" }, + { id: "bullet-bold", text: "- **", close: "**" }, +]; + +export interface WrapAtom extends Atom { + /** Written before and after a track line's text (R13.12). */ + text: string; +} + +export const WRAPS: WrapAtom[] = [ + { id: "none", text: "" }, + { id: "bold", text: "**" }, + { id: "underline", text: "__" }, + { id: "star", text: "*" }, + { id: "under", text: "_" }, +]; + export interface GapAtom extends Atom { /** `parts.gap` after the closing bracket (R13.2.3). Never empty: the time must be followed by whitespace or a separator. */ text: string; diff --git a/spec/generator/src/scenarios/index.ts b/spec/generator/src/scenarios/index.ts index 08ec55e..e41c1a3 100644 --- a/spec/generator/src/scenarios/index.ts +++ b/spec/generator/src/scenarios/index.ts @@ -8,6 +8,7 @@ import { junkYoutube } from "./junk-youtube.js"; import { kitchenSink } from "./kitchen-sink.js"; import { prefixes } from "./prefixes.js"; import { tracklist } from "./tracklist.js"; +import { tracklistEmphasis } from "./tracklist-emphasis.js"; import { unicode } from "./unicode.js"; import { versions } from "./versions.js"; @@ -23,4 +24,5 @@ export const SCENARIOS: Scenario[] = [ dedupScenario, kitchenSink, tracklist, + tracklistEmphasis, ]; diff --git a/spec/generator/src/scenarios/tracklist-emphasis.ts b/spec/generator/src/scenarios/tracklist-emphasis.ts new file mode 100644 index 0000000..200f329 --- /dev/null +++ b/spec/generator/src/scenarios/tracklist-emphasis.ts @@ -0,0 +1,56 @@ +import { + EMPHASIS_LEADS, + type EolAtom, + EOLS, + type FrameAtom, + FRAMES, + type GapAtom, + GAPS, + type LeadAtom, + type PositionStyleAtom, + POSITION_STYLES, + TIME_FORMS, + type TimeFormAtom, + TRACK_COUNTS, + TRACK_SETS, + type TrackSetAtom, + type WrapAtom, + WRAPS, +} from "../atoms.js"; +import type { Scenario } from "../scenario.js"; +import { renderTracklist, tracklistProblem, type TracklistComposition } from "../tracklist.js"; + +/** Tracklists pasted with Markdown: bullets and emphasis around times and track lines (SPEC R13.2, R13.12). */ +export const tracklistEmphasis: Scenario = { + name: "tracklist-emphasis", + fn: "parseTracklist", + description: + "parseTracklist over 1–6 line texts with Markdown: list bullets before the time, emphasis runs around the time and its brackets (**T**, **[T]**, [**T**], **[**T**], __T__, *T*, _[T]_, an opener without a closer) and emphasis around each track line (**, __, *, _), crossed with time forms, gaps, positions and line endings. The expected track never changes: markers are left out of the line text (SPEC R13.2.1, R13.2.3, R13.4.1, R13.12).", + dims: [ + { name: "time", values: TIME_FORMS.filter((t) => t.fmt !== null) }, + { name: "lead", values: EMPHASIS_LEADS }, + { name: "wrap", values: WRAPS }, + { name: "gap", values: GAPS }, + { name: "pos", values: POSITION_STYLES }, + { name: "eol", values: EOLS }, + { name: "count", values: TRACK_COUNTS.filter((c) => c.n <= 2) }, + { name: "set", values: TRACK_SETS }, + ], + sample: 0, + buildCase: (p) => { + const n = (p.count as (typeof TRACK_COUNTS)[number]).n; + const c: TracklistComposition = { + time: p.time as TimeFormAtom, + lead: p.lead as LeadAtom, + gap: p.gap as GapAtom, + pos: p.pos as PositionStyleAtom, + eol: p.eol as EolAtom, + // Extra header/blank/note lines carry no emphasis; the tracklist scenario covers them. + frame: FRAMES[0] as FrameAtom, + order: "zero", + tracks: (p.set as TrackSetAtom).tracks.slice(0, n), + wrap: p.wrap as WrapAtom, + }; + return tracklistProblem(c) === null ? renderTracklist(c) : null; + }, +}; diff --git a/spec/generator/src/tracklist.ts b/spec/generator/src/tracklist.ts index ff497f3..f85a684 100644 --- a/spec/generator/src/tracklist.ts +++ b/spec/generator/src/tracklist.ts @@ -16,6 +16,7 @@ import { type TimeFormAtom, type TimeOrder, type TrackAtom, + type WrapAtom, modeById, sepById, } from "./atoms.js"; @@ -33,6 +34,13 @@ export interface TracklistComposition { order: TimeOrder; /** The track parts, in line order. */ tracks: TrackAtom[]; + /** Markdown emphasis around each track line's text (R13.12); absent = none. */ + wrap?: WrapAtom; +} + +/** R13.12: the composition writes `*` or `_` (emphasis or a `*` bullet). */ +function hasEmphasis(c: TracklistComposition): boolean { + return /[*_]/.test(c.lead.text + c.lead.close) || (c.wrap?.text ?? "") !== ""; } export type LineKind = "track" | "marker" | "header" | "link" | "note" | "blank"; @@ -160,7 +168,9 @@ function plan(c: TracklistComposition): Planned[] { const n = c.pos.first + fl.index; const posText = c.pos.raw ? `${c.pos.raw(n)}${c.pos.after}` : ""; const part = render(trackComposition(t), "tracklist").input; - out.push({ frame: fl, rest: posText + part, bare: c.pos.bare ? n : null, timed: isTimed(c, fl, fl.index) }); + const w = c.wrap?.text ?? ""; + // R13.12: the wrap is left out of the line text, so the track expectation does not change. + out.push({ frame: fl, rest: w + posText + part + w, bare: c.pos.bare ? n : null, timed: isTimed(c, fl, fl.index) }); } else { out.push({ frame: fl, rest: fl.text, bare: null, timed: isTimed(c, fl, -1) }); } @@ -187,6 +197,8 @@ export function tracklistProblem(c: TracklistComposition): string | null { for (const t of c.tracks) { const p = trackProblem(t); if (p) return `track ${t.id}: ${p}`; + // R13.12: a `*` or `_` of the track's own would take part in the pairing. + if (hasEmphasis(c) && /[*_]/.test(render(trackComposition(t), "tracklist").input)) return `track ${t.id}: contains * or _ (R13.12)`; } const lines = plan(c); if (lines.length > 6) return "more than 6 lines"; @@ -310,6 +322,7 @@ function rulesOf(c: TracklistComposition, r: RenderedTracklist): string[] { } c.pos.rules.forEach((x) => s.add(x)); c.frame.rules.forEach((x) => s.add(x)); + if (hasEmphasis(c)) s.add("R13.12"); for (const t of c.tracks) trackRules(t).forEach((x) => s.add(x)); if (r.warnings.length) s.add("R13.7"); return [...s].sort(ruleCmp); @@ -332,6 +345,12 @@ export function renderTracklist(c: TracklistComposition): Rendered { options: {}, expected: { entries: r.entries, warnings: r.warnings, stats: r.stats }, rules: rulesOf(c, r), - tags: ["tracklist", `time-${c.time.id}`, `frame-${c.frame.id}`, `order-${c.order}`], + tags: [ + "tracklist", + `time-${c.time.id}`, + `frame-${c.frame.id}`, + `order-${c.order}`, + ...(hasEmphasis(c) ? ["emphasis"] : []), + ], }; } diff --git a/spec/generator/test/generated.test.ts b/spec/generator/test/generated.test.ts index 0f7ad1d..42051c7 100644 --- a/spec/generator/test/generated.test.ts +++ b/spec/generator/test/generated.test.ts @@ -76,7 +76,7 @@ describe("generated fixtures", () => { for (const [name, content] of first.files) { if (name === "summary.json") continue; const file = JSON.parse(content) as FixtureFile; - expect(file.defaults.fn, name).toBe(name === "tracklist.json" ? "parseTracklist" : "parse"); + expect(file.defaults.fn, name).toBe(name.startsWith("tracklist") ? "parseTracklist" : "parse"); } expect(allCases(first, "parseTracklist").length).toBeGreaterThanOrEqual(800); for (const c of allCases(first, "parseTracklist")) expect(c.options, c.id).toEqual({}); From b61b215e0b7b24e3cdf4bef486c7fab1af3c91bc Mon Sep 17 00:00:00 2001 From: 4matic Date: Wed, 11 Nov 2026 00:34:00 +0200 Subject: [PATCH 4/5] feat(spec): layered "w/" lines in tracklists 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. --- README.md | 5 +- js/README.md | 6 + js/src/data.generated.ts | 7 + js/src/tracklist/kinds.ts | 18 +- js/src/tracklist/parse.ts | 33 ++- js/src/tracklist/types.ts | 2 + js/src/tracklist/warnings.ts | 4 +- js/test/tracklist.api.test.ts | 2 +- js/test/tracklist.properties.test.ts | 10 +- python/README.md | 8 +- python/src/trackparse/_data.py | 7 + python/src/trackparse/_tracklist_kinds.py | 21 +- python/src/trackparse/_tracklist_parse.py | 26 ++- python/src/trackparse/_tracklist_types.py | 3 + python/src/trackparse/_tracklist_warnings.py | 3 +- python/tests/test_tracklist_api.py | 11 +- python/tests/test_tracklist_properties.py | 9 +- site/src/content/docs/guides/tracklists.mdx | 42 ++++ site/src/content/docs/reference/tracklist.mdx | 3 +- site/src/content/docs/reference/warnings.md | 2 +- spec/SPEC.md | 32 ++- spec/data/feat-markers.json | 2 +- spec/data/layered-words.json | 4 + .../fixtures/handwritten/tracklist-edits.json | 23 ++ .../fixtures/handwritten/tracklist-lines.json | 208 +++++++++++++++++- .../handwritten/tracklist-positions.json | 86 ++++++++ .../handwritten/tracklist-warnings.json | 120 ++++++++++ spec/schema/tracklist.schema.json | 8 +- 28 files changed, 659 insertions(+), 46 deletions(-) create mode 100644 spec/data/layered-words.json diff --git a/README.md b/README.md index 325a67f..9136d94 100644 --- a/README.md +++ b/README.md @@ -565,7 +565,8 @@ that only parses single tracks never loads it. | `raw` | `string` | The line exactly as written, never normalized | | `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it. `lead` is spaces, a list bullet, Markdown emphasis or an opening bracket, `gap` is what sits between the time and the track (`] `, ` - `, ` \| `, ` => `) | | `time` | `{ raw, seconds } \| null` | `12:34`, `1:02:03`, `125:30` (long mixes), `00:00:07.500` (7.5 s) | -| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode. Only `track` and `marker` lines have one | +| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode, without Markdown emphasis, a leading `w/` and a bare track number. Only `track` and `marker` lines have one | +| `layered` | `boolean` | The line starts with `w/`: a track played over the previous one | Kinds: a line with a time is a `marker` when it has no separator and a word like `intro`, `break` or `interview` ([`spec/data/marker-words.json`](spec/data/marker-words.json)), otherwise a @@ -580,7 +581,7 @@ warnings stay on `entries[i].track.warnings` and are not repeated here. | Code | Severity | When | |---|---|---| -| `time-missing` | warning | A track line has no time while other lines do | +| `time-missing` | warning | A track line has no time while other lines do (not raised on a `w/` line) | | `time-out-of-order` | warning | Earlier than the previous timed line. May carry a `suggestion` | | `time-duplicate` | warning | Same time as the previous timed line | | `no-start-at-zero` | info | The first time isn't `0:00` | diff --git a/js/README.md b/js/README.md index ef9b563..b8effe8 100644 --- a/js/README.md +++ b/js/README.md @@ -289,6 +289,12 @@ Warning codes: `time-missing`, `time-out-of-order` (with a one- or two-digit `su exactly one fix fits), `time-duplicate`, `no-start-at-zero`, `time-after-audio-end` (pass `audioSeconds`), `invalid-time`, `position-gap`, `position-duplicate`, `line-unparsed`. +Lists pasted with list bullets or Markdown emphasis (`* 14:21 Artist - Title`, +`**[**14:21**] Artist - Title**`) read like plain lines; the decoration stays in `raw` and `parts`. +A line starting with `w/` is `layered`: a track played over the previous one +([Markdown](https://4matic.github.io/trackparse/guides/tracklists/#markdown), +[layered tracks](https://4matic.github.io/trackparse/guides/tracklists/#layered-tracks)). + Options: `mode` (default `"tracklist"`), `knownArtists`, `splitAnd`, `keywords`, `audioSeconds`, `markerWords`. Every type is exported (`import type { Tracklist, Edit } from "trackparse/tracklist"`). diff --git a/js/src/data.generated.ts b/js/src/data.generated.ts index f5c0667..938db27 100644 --- a/js/src/data.generated.ts +++ b/js/src/data.generated.ts @@ -346,6 +346,13 @@ export const junkData = { ] } as const; +/** spec/data/layered-words.json */ +export const layeredWordsData = { + "words": [ + "w/" + ] +} as const; + /** spec/data/marker-words.json */ export const markerWordsData = { "words": [ diff --git a/js/src/tracklist/kinds.ts b/js/src/tracklist/kinds.ts index fc5171e..c13451d 100644 --- a/js/src/tracklist/kinds.ts +++ b/js/src/tracklist/kinds.ts @@ -1,10 +1,11 @@ /** R13.3 line kinds and R13.4.2 candidate lines. */ -import { headerWordsData, markerWordsData } from "../data.generated.js"; +import { headerWordsData, layeredWordsData, markerWordsData } from "../data.generated.js"; import { stringList } from "../tables.js"; import type { ParsedTrack } from "../types.js"; import { asciiLower, inVocab, isWhitespace, PhraseTable, splitWords } from "../words.js"; const headerWords: ReadonlySet = new Set(headerWordsData.words); +const layeredWords: ReadonlySet = new Set(layeredWordsData.words); let defaultMarkers: PhraseTable | null = null; /** @@ -48,6 +49,21 @@ export function markerWords(text: string): string[] { return out; } +/** + * R13.13: the length of a layered prefix at the start of the line text: R0.2 whitespace, a word + * of `data/layered-words.json` (word key, R0.3), then R0.2 whitespace, with more text after it. + * 0 when there is none. + */ +export function layeredPrefix(text: string): number { + let i = 0; + while (i < text.length && isWhitespace(text[i])) i++; + let j = i; + while (j < text.length && !isWhitespace(text[j])) j++; + if (j === i || j === text.length || !inVocab(text.slice(i, j), layeredWords)) return 0; + while (j < text.length && isWhitespace(text[j])) j++; + return j < text.length ? j : 0; +} + /** R13.3.1 */ export function isBlank(raw: string): boolean { for (let i = 0; i < raw.length; i++) if (!isWhitespace(raw[i])) return false; diff --git a/js/src/tracklist/parse.ts b/js/src/tracklist/parse.ts index c4ea4e3..e40ec43 100644 --- a/js/src/tracklist/parse.ts +++ b/js/src/tracklist/parse.ts @@ -2,7 +2,15 @@ import { SPEC_VERSION } from "../data.generated.js"; import { createListParser, type LineProbe } from "../parser.js"; import type { ParsedTrack } from "../types.js"; -import { hasMarkerWord, hasSeparator, isBlank, isHeader, isLink, markerTable } from "./kinds.js"; +import { + hasMarkerWord, + hasSeparator, + isBlank, + isHeader, + isLink, + layeredPrefix, + markerTable, +} from "./kinds.js"; import { resolveOptions } from "./options.js"; import { type BareCandidate, bareCandidate, confirmPositions } from "./positions.js"; import { type Line, splitLines } from "./split.js"; @@ -13,6 +21,10 @@ import { tracklistWarnings } from "./warnings.js"; interface Row { line: Line; scan: TimeScan; + /** R13.4.1 line text: rest without emphasis markers (R13.12) and a layered prefix (R13.13). */ + text: string; + /** R13.13 */ + layered: boolean; blank: boolean; /** R13.4.2 */ candidate: boolean; @@ -38,9 +50,12 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl const rows: Row[] = lines.map((line) => { const scan = scanTime(line.raw); const blank = isBlank(line.raw); + const layered = blank ? 0 : layeredPrefix(scan.text); const row: Row = { line, scan, + text: scan.text.slice(layered), + layered: layered > 0, blank, candidate: false, dash: false, @@ -51,11 +66,12 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl marker: false, }; if (blank) return row; - const probe = lp.probe(scan.text); // R13.4.1: the line text, without emphasis (R13.12) + const probe = lp.probe(row.text); // R13.4.1 row.probe = probe; row.dash = probe.spacedDash; row.candidate = scan.time !== null || row.dash; - row.bare = bareCandidate(scan.text, probe.position); // R13.5 + // R13.5 / R13.13.3: a layered line never has a bare position. + row.bare = row.layered ? null : bareCandidate(row.text, probe.position); return row; }); let candidates = 0; @@ -68,15 +84,16 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl const listContext = candidates > 0 && 2 * dashes >= candidates; // R13.5: confirmed bare positions are removed before parsing. R13.4.1: one parse per line. + // R13.13.3: layered lines are not neighbours for the R13.5 search. const confirmed = confirmPositions( rows.map((r) => r.bare), - rows.map((r) => r.candidate), + rows.map((r) => r.candidate && !r.layered), ); rows.forEach((r, i) => { if (r.blank || !r.probe) return; const bare = confirmed[i] ? r.bare : null; const probe = bare ? lp.probe(bare.stripped) : r.probe; - r.marker = hasMarkerWord(bare ? bare.stripped : r.scan.text, markers); + r.marker = hasMarkerWord(bare ? bare.stripped : r.text, markers); // R13.4.2: the R6.10 tight dash only on timed lines without a marker word. const track = probe.finish(listContext && r.scan.time !== null && !r.marker); if (bare) track.position = { raw: bare.raw, number: bare.number }; @@ -96,6 +113,7 @@ export function parseTracklist(text: string, options?: TracklistOptions): Trackl parts: r.scan.parts, time: r.scan.time, track: keep ? r.track : null, + layered: r.layered, }; }); @@ -113,9 +131,8 @@ function kindOf(r: Row): EntryKind { if (r.blank || !r.track) return "blank"; const marker = !r.separated && r.marker; if (r.scan.time) return marker ? "marker" : "track"; - const text = r.scan.text; - if (isLink(text)) return "link"; - if (isHeader(text)) return "header"; + if (isLink(r.text)) return "link"; + if (isHeader(r.text)) return "header"; if (marker) return "marker"; return r.separated ? "track" : "note"; } diff --git a/js/src/tracklist/types.ts b/js/src/tracklist/types.ts index 63d266b..3db8b79 100644 --- a/js/src/tracklist/types.ts +++ b/js/src/tracklist/types.ts @@ -27,6 +27,8 @@ export interface TracklistEntry { parts: EntryParts; time: TracklistTime | null; track: ParsedTrack | null; + /** R13.13: the line starts with `w/`: played over the previous track. */ + layered: boolean; } export type TracklistWarningCode = diff --git a/js/src/tracklist/warnings.ts b/js/src/tracklist/warnings.ts index 4ad7271..4ccec5d 100644 --- a/js/src/tracklist/warnings.ts +++ b/js/src/tracklist/warnings.ts @@ -171,7 +171,9 @@ export function tracklistWarnings(input: WarningInput): TracklistWarning[] { }); entries.forEach((e, i) => { - if (e.kind === "track" && e.time === null && timed.length > 0) add(i, "time-missing"); + // R13.13.3: an untimed layered line plays over the previous track, at its time. + if (e.kind === "track" && e.time === null && !e.layered && timed.length > 0) + add(i, "time-missing"); if (invalid[i]) add(i, "invalid-time"); if (unparsed[i]) add(i, "line-unparsed"); }); diff --git a/js/test/tracklist.api.test.ts b/js/test/tracklist.api.test.ts index 14f9594..ecc419e 100644 --- a/js/test/tracklist.api.test.ts +++ b/js/test/tracklist.api.test.ts @@ -40,7 +40,7 @@ describe("subpath export trackparse/tracklist", () => { expect(Object.keys(tl).sort()).toEqual(["entries", "specVersion", "stats", "warnings"]); expect(tl.specVersion).toBe(SPEC_VERSION); expect(Object.keys(tl.entries[0] ?? {}).sort()).toEqual( - ["eol", "kind", "line", "parts", "raw", "time", "track"].sort(), + ["eol", "kind", "layered", "line", "parts", "raw", "time", "track"].sort(), ); expect(tl.entries[0]?.track?.mode).toBe("tracklist"); }); diff --git a/js/test/tracklist.properties.test.ts b/js/test/tracklist.properties.test.ts index fbae42d..6e37797 100644 --- a/js/test/tracklist.properties.test.ts +++ b/js/test/tracklist.properties.test.ts @@ -7,6 +7,7 @@ import { describe, expect, it } from "vitest"; import { parse } from "../src/index.js"; import { withoutMarkers } from "../src/tracklist/emphasis.js"; import { applyEdits, type Edit, parseTracklist } from "../src/tracklist/index.js"; +import { layeredPrefix } from "../src/tracklist/kinds.js"; import { specDir } from "./runner.js"; const ajv = new Ajv2020({ allErrors: true, strict: false }); @@ -83,6 +84,8 @@ const fragment = fc.constantFrom( "- ", "**[", "]**", + "w/ ", + "W/", "​", "𝄞", "\ud800", @@ -390,8 +393,11 @@ describe("R13.11 tracklist invariants", () => { }); // R13.4.1: the track part of a one-line text (no neighbours, so no bare position) is `rest` - // without its paired emphasis markers (R13.12). - const trackPart = (raw: string, rest: string) => withoutMarkers(raw, raw.length - rest.length); + // without its emphasis markers (R13.12) and a layered prefix (R13.13). + const trackPart = (raw: string, rest: string) => { + const text = withoutMarkers(raw, raw.length - rest.length); + return text.slice(layeredPrefix(text)); + }; it("5. a one-line text's track equals parse(trackPart, { mode: 'tracklist' })", () => { const oneLine = fc diff --git a/python/README.md b/python/README.md index 523a694..aecdd37 100644 --- a/python/README.md +++ b/python/README.md @@ -428,7 +428,7 @@ apply_edits(text, edits, *, ) -> EditResult | Result | Fields | |---|---| | `Tracklist` | `spec_version`, `entries`, `warnings`, `stats` | -| `TracklistEntry` | `line` (1-based), `kind` (`track`, `marker`, `header`, `link`, `note`, `blank`), `eol`, `raw`, `parts`, `time`, `track` (`ParsedTrack` or `None`) | +| `TracklistEntry` | `line` (1-based), `kind` (`track`, `marker`, `header`, `link`, `note`, `blank`), `eol`, `raw`, `parts`, `time`, `track` (`ParsedTrack` or `None`), `layered` (the line starts with `w/`) | | `Parts` | `lead`, `time`, `gap`, `rest`, joined they give `raw` | | `TracklistWarning` | `code`, `line`, `severity` (`info` or `warning`), `suggestion` | | `TimeValue` | `raw`, `seconds` (`entry.time`, or `None` on untimed lines) | @@ -436,6 +436,12 @@ apply_edits(text, edits, *, ) -> EditResult | `Stats` | `lines`, `tracks`, `markers`, `timed`, `first_time`, `last_time` | | `EditResult` | `text`, `changed`, `warnings` (`EditWarning(code, edit, line)`) | +Lists pasted with list bullets or Markdown emphasis (`* 14:21 Artist - Title`, +`**[**14:21**] Artist - Title**`) read like plain lines; the decoration stays in `raw` and `parts`. +A line starting with `w/` is `layered`: a track played over the previous one +([Markdown](https://4matic.github.io/trackparse/guides/tracklists/#markdown), +[layered tracks](https://4matic.github.io/trackparse/guides/tracklists/#layered-tracks)). + Warning codes: `time-missing`, `time-out-of-order`, `time-duplicate`, `no-start-at-zero`, `time-after-audio-end` (needs `audio_seconds`), `invalid-time`, `position-gap`, `position-duplicate`, `line-unparsed`. Edits: `set-time {line, seconds}`, `shift {seconds, lines? | from?}` diff --git a/python/src/trackparse/_data.py b/python/src/trackparse/_data.py index 866cced..bfde4e4 100644 --- a/python/src/trackparse/_data.py +++ b/python/src/trackparse/_data.py @@ -350,6 +350,13 @@ ], } +# spec/data/layered-words.json +LAYERED_WORDS_DATA: dict[str, Any] = { + "words": [ + "w/", + ], +} + # spec/data/marker-words.json MARKER_WORDS_DATA: dict[str, Any] = { "words": [ diff --git a/python/src/trackparse/_tracklist_kinds.py b/python/src/trackparse/_tracklist_kinds.py index b4fe24f..583edc7 100644 --- a/python/src/trackparse/_tracklist_kinds.py +++ b/python/src/trackparse/_tracklist_kinds.py @@ -4,12 +4,13 @@ from typing import Optional -from ._data import HEADER_WORDS_DATA, MARKER_WORDS_DATA +from ._data import HEADER_WORDS_DATA, LAYERED_WORDS_DATA, MARKER_WORDS_DATA from ._tables import _str_list from ._words import PhraseTable, ascii_lower, in_vocab, is_whitespace, split_words from .types import ParsedTrack _HEADER_WORDS: frozenset[str] = frozenset(HEADER_WORDS_DATA["words"]) +_LAYERED_WORDS: frozenset[str] = frozenset(LAYERED_WORDS_DATA["words"]) _default_markers: Optional[PhraseTable[bool]] = None @@ -63,6 +64,24 @@ def marker_words(text: str) -> list[str]: return out +def layered_prefix(text: str) -> int: + """R13.13: the length of a layered prefix at the start of the line text: R0.2 whitespace, a + word of ``data/layered-words.json`` (word key, R0.3), then R0.2 whitespace, with more text + after it. 0 when there is none.""" + n = len(text) + i = 0 + while i < n and is_whitespace(text[i]): + i += 1 + j = i + while j < n and not is_whitespace(text[j]): + j += 1 + if j in (i, n) or not in_vocab(text[i:j], _LAYERED_WORDS): + return 0 + while j < n and is_whitespace(text[j]): + j += 1 + return j if j < n else 0 + + def is_blank(raw: str) -> bool: """R13.3.1""" return all(is_whitespace(c) for c in raw) diff --git a/python/src/trackparse/_tracklist_parse.py b/python/src/trackparse/_tracklist_parse.py index 1bfa6c5..225cb3d 100644 --- a/python/src/trackparse/_tracklist_parse.py +++ b/python/src/trackparse/_tracklist_parse.py @@ -13,6 +13,7 @@ is_blank, is_header, is_link, + layered_prefix, marker_table, ) from ._tracklist_options import ResolvedOptions @@ -30,11 +31,13 @@ class _Row: "blank", "candidate", "dash", + "layered", "line", "marker", "probe", "scan", "separated", + "text", "track", ) @@ -42,6 +45,11 @@ def __init__(self, line: Line, scan: TimeScan, blank: bool) -> None: self.line = line self.scan = scan self.blank = blank + layered = 0 if blank else layered_prefix(scan.text) + #: R13.4.1 line text: rest without emphasis markers (R13.12) and a layered prefix (R13.13). + self.text = scan.text[layered:] + #: R13.13 + self.layered = layered > 0 #: R13.4.2 self.candidate = False self.dash = False @@ -68,11 +76,12 @@ def parse_tracklist_resolved(text: str, opts: ResolvedOptions) -> Tracklist: rows.append(row) if row.blank: continue - probe = lp.probe(scan.text) # R13.4.1: the line text, without emphasis (R13.12) + probe = lp.probe(row.text) # R13.4.1 row.probe = probe row.dash = probe.spaced_dash row.candidate = scan.time is not None or row.dash - row.bare = bare_candidate(scan.text, probe.position) # R13.5 + # R13.5 / R13.13.3: a layered line never has a bare position. + row.bare = None if row.layered else bare_candidate(row.text, probe.position) candidates = 0 dashes = 0 for r in rows: @@ -84,13 +93,16 @@ def parse_tracklist_resolved(text: str, opts: ResolvedOptions) -> Tracklist: list_context = candidates > 0 and 2 * dashes >= candidates # R13.5: confirmed bare positions are removed before parsing. R13.4.1: one parse per line. - confirmed = confirm_positions([r.bare for r in rows], [r.candidate for r in rows]) + # R13.13.3: layered lines are not neighbours for the R13.5 search. + confirmed = confirm_positions( + [r.bare for r in rows], [r.candidate and not r.layered for r in rows] + ) for i, r in enumerate(rows): if r.blank or r.probe is None: continue bare = r.bare if confirmed[i] else None probe = lp.probe(bare.stripped) if bare is not None else r.probe - r.marker = has_marker_word(bare.stripped if bare is not None else r.scan.text, markers) + r.marker = has_marker_word(bare.stripped if bare is not None else r.text, markers) # R13.4.2: the R6.10 tight dash only on timed lines without a marker word. track = probe.finish(list_context and r.scan.time is not None and not r.marker) if bare is not None: @@ -112,6 +124,7 @@ def parse_tracklist_resolved(text: str, opts: ResolvedOptions) -> Tracklist: parts=r.scan.parts, time=r.scan.time, track=r.track if keep else None, + layered=r.layered, ) ) @@ -136,10 +149,9 @@ def _kind_of(r: _Row) -> EntryKind: marker = not r.separated and r.marker if r.scan.time is not None: return "marker" if marker else "track" - text = r.scan.text - if is_link(text): + if is_link(r.text): return "link" - if is_header(text): + if is_header(r.text): return "header" if marker: return "marker" diff --git a/python/src/trackparse/_tracklist_types.py b/python/src/trackparse/_tracklist_types.py index 54884b6..1625598 100644 --- a/python/src/trackparse/_tracklist_types.py +++ b/python/src/trackparse/_tracklist_types.py @@ -77,6 +77,8 @@ class TracklistEntry: time: Optional[TimeValue] #: The line's ParsedTrack (``track`` and ``marker`` entries only). track: Optional[ParsedTrack] + #: R13.13: the line starts with ``w/``: played over the previous track. + layered: bool def to_dict(self) -> dict[str, Any]: return { @@ -87,6 +89,7 @@ def to_dict(self) -> dict[str, Any]: "parts": self.parts.to_dict(), "time": None if self.time is None else self.time.to_dict(), "track": None if self.track is None else self.track.to_dict(), + "layered": self.layered, } diff --git a/python/src/trackparse/_tracklist_warnings.py b/python/src/trackparse/_tracklist_warnings.py index bb1169e..1d720f7 100644 --- a/python/src/trackparse/_tracklist_warnings.py +++ b/python/src/trackparse/_tracklist_warnings.py @@ -181,7 +181,8 @@ def add(i: int, code: TracklistWarningCode, suggestion: Optional[Suggestion] = N timed = [i for i, e in enumerate(entries) if e.time is not None] for i, e in enumerate(entries): - if e.kind == "track" and e.time is None and len(timed) > 0: + # R13.13.3: an untimed layered line plays over the previous track, at its time. + if e.kind == "track" and e.time is None and not e.layered and len(timed) > 0: add(i, "time-missing") if invalid[i]: add(i, "invalid-time") diff --git a/python/tests/test_tracklist_api.py b/python/tests/test_tracklist_api.py index 126c3a2..cece5a0 100644 --- a/python/tests/test_tracklist_api.py +++ b/python/tests/test_tracklist_api.py @@ -40,7 +40,16 @@ def test_parse_tracklist_returns_every_key() -> None: d = tl.to_dict() assert list(d) == ["specVersion", "entries", "warnings", "stats"] assert d["specVersion"] == SPEC_VERSION - assert list(d["entries"][0]) == ["line", "kind", "eol", "raw", "parts", "time", "track"] + assert list(d["entries"][0]) == [ + "line", + "kind", + "eol", + "raw", + "parts", + "time", + "track", + "layered", + ] assert list(d["stats"]) == ["lines", "tracks", "markers", "timed", "firstTime", "lastTime"] entry = tl.entries[0] assert isinstance(entry, TracklistEntry) diff --git a/python/tests/test_tracklist_properties.py b/python/tests/test_tracklist_properties.py index 781d079..b091be8 100644 --- a/python/tests/test_tracklist_properties.py +++ b/python/tests/test_tracklist_properties.py @@ -15,6 +15,7 @@ from runner import SPEC_DIR from trackparse import parse from trackparse._tracklist_emphasis import without_markers +from trackparse._tracklist_kinds import layered_prefix from trackparse.tracklist import apply_edits, parse_tracklist @@ -43,7 +44,7 @@ def _load(name: str) -> dict[str, Any]: "0:61:00 ", "1:2", "[", "]", "(", ")", "[00:10] ", "(1:00)", " - ", " – ", "-", "|", ".", ":", "=> ", "==>", "1 ", "2 ", "01. ", "3) ", "Artist", "Title", "Noisia - Stigma", "Intro", "interview", "Tracklist:", "Part 2", "https://x.y", "www.", "_-_", "Ab-Cd", "ID", "(VIP)", - "**", "*", "__", "_", "***", "* ", "- ", "**[", "]**", + "**", "*", "__", "_", "***", "* ", "- ", "**[", "]**", "w/ ", "W/", "​", "𝄞", "\ud800", ] # fmt: skip @@ -358,11 +359,13 @@ def eols(t: str) -> list[str]: # 5. One line equals parse(track part, mode="tracklist"). R13.4.1: the track part of a one-line -# text (no neighbours, so no bare position) is `rest` without its paired emphasis markers (R13.12). +# text (no neighbours, so no bare position) is `rest` without its emphasis markers (R13.12) and a +# layered prefix (R13.13). def track_part(raw: str, rest: str) -> str: - return without_markers(raw, len(raw) - len(rest)) + text = without_markers(raw, len(raw) - len(rest)) + return text[layered_prefix(text) :] @fast(1500) diff --git a/site/src/content/docs/guides/tracklists.mdx b/site/src/content/docs/guides/tracklists.mdx index 8329d57..159398d 100644 --- a/site/src/content/docs/guides/tracklists.mdx +++ b/site/src/content/docs/guides/tracklists.mdx @@ -180,6 +180,48 @@ space, a bracket or the end of the line on its outer side. So names keep their s underscores: `P*nk`, `*NSYNC`, `DJ_Name`, `Noisia_-_Stigma` and a censored `F**k` come out as written. Runs of three or more, `~~`, `||` and backticks are never treated as Markdown. +## Layered tracks + +DJ tracklists mark a track played over the previous one, like an acapella on the second deck, with +`w/` where the track number would go. Such a line gets `layered: true`. The `w/` stays in `rest` and +is left out of the parsed track. An untimed layered line plays at the previous track's time, so it +doesn't warn `time-missing`, and it doesn't count as a neighbour for bare track numbers. + + + + +```js +const list = parseTracklist("00:00 Noisia - Stigma\nw/ Phace - Psycho (Acapella)\n03:10 Mefjus - Sleepless"); +const e = list.entries[1]; + +e.layered; // true +e.time; // null +e.track.artists.map((a) => a.name); // [ 'Phace' ] +e.track.title; // 'Psycho' +list.warnings; // [] +``` + + + + +```python +tl = parse_tracklist("00:00 Noisia - Stigma\nw/ Phace - Psycho (Acapella)\n03:10 Mefjus - Sleepless") +e = tl.entries[1] + +e.layered # True +e.time # None +[a.name for a in e.track.artists] # ['Phace'] +e.track.title # 'Psycho' +tl.warnings # () +``` + + + + +Only a leading `w/` (or `W/`) followed by a space counts. `w/` inside a line +(`Noisia w/ Phace - Stigma`), right after a track number (`10. w/ …`) or glued to the name +(`w/Noisia`) is left alone, and so are `with`, `+` and `x`. + ## Line kinds | Kind | When | diff --git a/site/src/content/docs/reference/tracklist.mdx b/site/src/content/docs/reference/tracklist.mdx index d4acb17..76fcf20 100644 --- a/site/src/content/docs/reference/tracklist.mdx +++ b/site/src/content/docs/reference/tracklist.mdx @@ -71,7 +71,8 @@ One per line, in order. | `raw` | `string` | The line exactly as written, never normalised | | `parts` | `{ lead, time, gap, rest }` | `raw` cut into four strings that join back into it | | `time` | `{ raw, seconds } \| null` | The start time | -| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode, without its [Markdown emphasis](/trackparse/guides/tracklists/#markdown) and a bare track number. Only `track` and `marker` lines have one | +| `track` | `ParsedTrack \| null` | Parsed from `rest` in tracklist mode, without its [Markdown emphasis](/trackparse/guides/tracklists/#markdown), a leading `w/` and a bare track number. Only `track` and `marker` lines have one | +| `layered` | `boolean` | The line starts with `w/`: a [layered track](/trackparse/guides/tracklists/#layered-tracks), played over the previous one | ### TracklistWarning diff --git a/site/src/content/docs/reference/warnings.md b/site/src/content/docs/reference/warnings.md index 02427d9..b39cd1e 100644 --- a/site/src/content/docs/reference/warnings.md +++ b/site/src/content/docs/reference/warnings.md @@ -29,7 +29,7 @@ candidate for a human to look at. For scrobbling, most of them are fine to accep | Code | Severity | When | |---|---|---| -| `time-missing` | warning | A track line has no time while other lines do | +| `time-missing` | warning | A track line has no time while other lines do (not raised on a `w/` line, which plays at the previous track's time) | | `time-out-of-order` | warning | Earlier than the previous timed line. May carry a `suggestion` | | `time-duplicate` | warning | Same time as the previous timed line | | `no-start-at-zero` | info | The first time isn't `0:00` | diff --git a/spec/SPEC.md b/spec/SPEC.md index 5358bc0..582d49a 100644 --- a/spec/SPEC.md +++ b/spec/SPEC.md @@ -620,8 +620,8 @@ Nothing is ever dropped. ### R13.4 The track part -- **R13.4.1** The *line text* is `rest` without its emphasis markers (R13.12). The *track part* is - the line text minus a bare position (R13.5). The kind tests (R13.3), the probe (R13.4.2) and the +- **R13.4.1** The *line text* is `rest` without its emphasis markers (R13.12) and without a layered + prefix (R13.13). The *track part* is the line text minus a bare position (R13.5). The kind tests (R13.3), the probe (R13.4.2) and the bare-position test (R13.5) read the line text; the track part is parsed with `parse(trackPart, { mode, knownArtists, keywords, splitAnd })`, `mode` defaulting to `"tracklist"`. `rest` itself is never changed. `**[**14:21**] 10. Nitepunk - ID**` → rest @@ -658,7 +658,7 @@ repeated. | Code | Severity | When | |---|---|---| -| `time-missing` | warning | a `track` entry has no time while at least one other entry has one | +| `time-missing` | warning | a `track` entry that is not layered (R13.13) has no time while at least one other entry has one | | `time-out-of-order` | warning | a timed entry's seconds are below the previous timed entry's | | `time-duplicate` | warning | equal to the previous timed entry's seconds | | `no-start-at-zero` | info | the first timed entry is not at 0 | @@ -687,7 +687,7 @@ out-of-order line. (`00:06:29` between `01:04:39` and `01:08:10` → line itself ### R13.8 Output `{ specVersion, entries, warnings, stats }`. Each entry is `{ line, kind, eol, raw, parts, time, -track }`. `stats` = `{ lines, tracks, markers, timed, firstTime, lastTime }`: entry count, `track` +track, layered }`. `stats` = `{ lines, tracks, markers, timed, firstTime, lastTime }`: entry count, `track` count, `marker` count, entries with a time, the first and the last timed entry's seconds in line order (`null` when none). Every key is always present. @@ -802,6 +802,26 @@ So markers never touch a letter, digit or other punctuation on their outer side: `**[**14:21**] 10. Nitepunk - ID**` has four (two pairs), `00:00 Nitepunk - No Manners (**VIP**)` two. Markers are left out of the line text (R13.4.1); `raw` and `parts` keep them. +### R13.13 Layered tracks + +DJ tracklists mark a track played over the previous one (an acapella, a second deck) with `w/` in +place of the track number: `w/ Nitepunk & Habstrakt - Point`. + +- **R13.13.1** After its emphasis markers are left out (R13.12), a line whose text starts with R0.2 + whitespace, a word of [`data/layered-words.json`](data/layered-words.json) (word key, R0.3, so + `W/` counts), at least one R0.2 whitespace and then more text is *layered*. That prefix is left + out of the line text (R13.4.1); `rest` keeps it. +- **R13.13.2** Each entry has `layered` (boolean): `true` for a layered line, else `false`. +- **R13.13.3** A layered line: + - never has a bare position, and is not a neighbour in the R13.5 search, so `1 A - B` / + `w/ C - D` / `2 E - F` still confirms 1 and 2; + - does not warn `time-missing` (R13.7): without a time it plays at the previous track's time; + - is otherwise an ordinary line: its kind follows R13.3, it can have its own time, it counts in + `stats.tracks`, and `sort-by-time` moves an untimed one with the timed line above it (R13.9.4). +- Not layered: `w/` without whitespace after it (`w/Noisia - Stigma`), `w/` alone, `w/` after a + position (`10. w/ A - B`), and `w/` inside the line (`Noisia w/ Phace - Stigma`, which R5.2 + leaves alone outside brackets). `with`, `+` and `x` are not layered words. + --- ## Invariants @@ -835,9 +855,11 @@ Tracklists (R13) have their own invariants: R13.11. - **Credit list** — a substring that R7.3 splits into names. - **Word key** — R0.3. - **Dedup key** — R0.4. -- **Line text** — a tracklist line's `rest` without its emphasis markers (R13.4.1, R13.12). +- **Line text** — a tracklist line's `rest` without its emphasis markers and a layered prefix + (R13.4.1, R13.12, R13.13). - **Track part** — the line text minus a bare position, parsed as a track (R13.4.1). - **Emphasis marker** — a paired run of 1 or 2 `*` or `_` (R13.12). +- **Layered** — a tracklist line starting with `w/`, played over the previous track (R13.13). - **Candidate line** — a non-blank tracklist line with a time or a spaced dash (R13.4.2). - **List context** — at least half of the candidate lines have a spaced dash; enables R6.10's tight dash (R13.4.2). diff --git a/spec/data/feat-markers.json b/spec/data/feat-markers.json index dff9ab8..792e8e0 100644 --- a/spec/data/feat-markers.json +++ b/spec/data/feat-markers.json @@ -1,5 +1,5 @@ { - "$comment": "Featuring markers (SPEC.md R5.2, R7.2, R8.3). titleMarkers / titleProducer are the only unbracketed markers recognised on the title side (R8.3). ASCII lowercase. A marker matches a whole whitespace-delimited word (case-insensitive). 'bracketOnly' markers only count at the start of a bracket group.", + "$comment": "Featuring markers (SPEC.md R5.2, R7.2, R8.3). titleMarkers / titleProducer are the only unbracketed markers recognised on the title side (R8.3). ASCII lowercase. A marker matches a whole whitespace-delimited word (case-insensitive). 'bracketOnly' markers only count at the start of a bracket group. A leading `w/` on a tracklist line is a different thing: layered-words.json (R13.13).", "markers": ["feat.", "feat", "ft.", "ft", "featuring", "feat:", "ft:"], "bracketOnly": ["with", "w/"], "producer": ["prod.", "prod", "produced", "prod.by", "prod:"], diff --git a/spec/data/layered-words.json b/spec/data/layered-words.json new file mode 100644 index 0000000..67da174 --- /dev/null +++ b/spec/data/layered-words.json @@ -0,0 +1,4 @@ +{ + "$comment": "R13.13: a tracklist line whose text starts with one of these words (word key, R0.3) and whitespace is a layered track, played over the previous one (1001tracklists writes `w/` in place of the track number). Not the same as feat-markers.json bracketOnly `w/`, which marks a featured artist inside a bracket.", + "words": ["w/"] +} diff --git a/spec/fixtures/handwritten/tracklist-edits.json b/spec/fixtures/handwritten/tracklist-edits.json index 188e269..f716fea 100644 --- a/spec/fixtures/handwritten/tracklist-edits.json +++ b/spec/fixtures/handwritten/tracklist-edits.json @@ -1875,6 +1875,29 @@ "R13.2.3" ], "note": "Replacing rest removes the closing ** at the end of the line; the time is still read, because runs next to it are read by position." + }, + { + "id": "tracklist-edits-079", + "input": "03:00 Mefjus - Sleepless\nw/ Phace - Psycho\n00:00 Noisia - Stigma", + "edits": [ + { + "op": "sort-by-time" + } + ], + "expected": { + "text": "00:00 Noisia - Stigma\n03:00 Mefjus - Sleepless\nw/ Phace - Psycho", + "changed": [ + 1, + 2, + 3 + ], + "warnings": [] + }, + "rules": [ + "R13.9.4", + "R13.13" + ], + "note": "An untimed layered line moves with the timed line above it." } ] } diff --git a/spec/fixtures/handwritten/tracklist-lines.json b/spec/fixtures/handwritten/tracklist-lines.json index 3916f68..5c90f5f 100644 --- a/spec/fixtures/handwritten/tracklist-lines.json +++ b/spec/fixtures/handwritten/tracklist-lines.json @@ -218,7 +218,8 @@ "rest": "" }, "time": null, - "track": null + "track": null, + "layered": false } ], "warnings": [], @@ -801,7 +802,8 @@ "warnings": [ "noSeparator" ] - } + }, + "layered": false }, { "line": 2, @@ -846,7 +848,8 @@ }, "junk": [], "warnings": [] - } + }, + "layered": false } ], "warnings": [], @@ -959,7 +962,8 @@ "rest": "Tracklist:" }, "time": null, - "track": null + "track": null, + "layered": false }, { "line": 2, @@ -973,7 +977,8 @@ "rest": "https://neuropunk.ru" }, "time": null, - "track": null + "track": null, + "layered": false }, { "line": 3, @@ -987,7 +992,8 @@ "rest": "" }, "time": null, - "track": null + "track": null, + "layered": false }, { "line": 4, @@ -1001,7 +1007,8 @@ "rest": "Recorded live at Fabric, 2024" }, "time": null, - "track": null + "track": null, + "layered": false } ], "warnings": [], @@ -1728,6 +1735,193 @@ "R13.3", "R13.12" ] + }, + { + "id": "tracklist-lines-047", + "input": "w/ Nitepunk & Habstrakt - Point", + "expected": { + "entries": [ + { + "kind": "track", + "layered": true, + "time": null, + "parts": { + "lead": "", + "time": "", + "gap": "", + "rest": "w/ Nitepunk & Habstrakt - Point" + }, + "track": { + "artists": [ + "Nitepunk", + "Habstrakt" + ], + "title": "Point" + } + } + ] + }, + "rules": [ + "R13.13", + "R13.4.1" + ], + "note": "A layered track, played over the previous one. w/ stays in rest and is left out of the track part.", + "source": "real DJ set tracklist (Nitepunk)" + }, + { + "id": "tracklist-lines-048", + "input": "[14:21] w/ Nitepunk - Flow (Acapella)", + "expected": { + "entries": [ + { + "kind": "track", + "layered": true, + "time": { + "raw": "14:21", + "seconds": 861 + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "Flow", + "versions": [ + { + "type": "acapella" + } + ] + } + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "A layered line can have its own time.", + "source": "real DJ set tracklist (Nitepunk)" + }, + { + "id": "tracklist-lines-049", + "input": "W/ Noisia - Stigma", + "expected": { + "entries": [ + { + "layered": true, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.13", + "R0.3" + ], + "note": "Word key: W/ counts too." + }, + { + "id": "tracklist-lines-050", + "input": "**w/ Noisia - Stigma**", + "expected": { + "entries": [ + { + "layered": true, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.13", + "R13.12" + ] + }, + { + "id": "tracklist-lines-051", + "input": "Noisia w/ Phace - Stigma", + "expected": { + "entries": [ + { + "layered": false, + "track": { + "artists": [ + "Noisia w/ Phace" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "Near miss: w/ in the middle is not layered (and outside brackets it is not a feat marker either, R5.2)." + }, + { + "id": "tracklist-lines-052", + "input": "w/Noisia - Stigma", + "expected": { + "entries": [ + { + "layered": false, + "track": { + "artists": [ + "w/Noisia" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "Near miss: w/ needs whitespace after it." + }, + { + "id": "tracklist-lines-053", + "input": "With You - Stigma", + "expected": { + "entries": [ + { + "layered": false, + "track": { + "artists": [ + "With You" + ], + "title": "Stigma" + } + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "Near miss: with is not a layered word." + }, + { + "id": "tracklist-lines-054", + "input": "w/", + "expected": { + "entries": [ + { + "kind": "note", + "layered": false, + "track": null + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "Near miss: nothing after w/." } ] } diff --git a/spec/fixtures/handwritten/tracklist-positions.json b/spec/fixtures/handwritten/tracklist-positions.json index d528049..77049dd 100644 --- a/spec/fixtures/handwritten/tracklist-positions.json +++ b/spec/fixtures/handwritten/tracklist-positions.json @@ -1511,6 +1511,92 @@ "R13.5" ], "note": "A bare position needs U+0020 after the digits; a tab is not enough, even with N ± 1 neighbours." + }, + { + "id": "tracklist-positions-014", + "input": "1 Noisia - Stigma\nw/ Phace - Psycho\n2 Mefjus - Sleepless", + "expected": { + "entries": [ + { + "layered": false, + "track": { + "artists": [ + "Noisia" + ], + "title": "Stigma", + "position": { + "raw": "1", + "number": 1 + } + } + }, + { + "layered": true, + "track": { + "artists": [ + "Phace" + ], + "title": "Psycho", + "position": null + } + }, + { + "layered": false, + "track": { + "artists": [ + "Mefjus" + ], + "title": "Sleepless", + "position": { + "raw": "2", + "number": 2 + } + } + } + ], + "warnings": [] + }, + "rules": [ + "R13.5", + "R13.13" + ], + "note": "A layered line between two bare numbers does not break the neighbour search (R13.13.3)." + }, + { + "id": "tracklist-positions-015", + "input": "09. Phace - Psycho\n10. w/ Noisia - Stigma", + "expected": { + "entries": [ + { + "layered": false, + "track": { + "artists": [ + "Phace" + ], + "title": "Psycho", + "position": { + "number": 9 + } + } + }, + { + "layered": false, + "track": { + "artists": [ + "w/ Noisia" + ], + "title": "Stigma", + "position": { + "number": 10 + } + } + } + ] + }, + "rules": [ + "R13.13" + ], + "note": "Near miss: w/ after a position is not layered (1001tracklists writes w/ instead of the number)." } ] } diff --git a/spec/fixtures/handwritten/tracklist-warnings.json b/spec/fixtures/handwritten/tracklist-warnings.json index 2947320..caa2409 100644 --- a/spec/fixtures/handwritten/tracklist-warnings.json +++ b/spec/fixtures/handwritten/tracklist-warnings.json @@ -796,6 +796,126 @@ "R6.10" ], "note": "A split with an empty artist side counts as no separator (R13.3.4): the timed track warns line-unparsed." + }, + { + "id": "tracklist-warnings-037", + "input": "00:00 Noisia - Stigma\nw/ Phace - Psycho\n03:00 Mefjus - Sleepless", + "expected": { + "entries": [ + { + "layered": false + }, + { + "kind": "track", + "layered": true, + "time": null + }, + { + "layered": false + } + ], + "warnings": [] + }, + "rules": [ + "R13.7", + "R13.13" + ], + "note": "An untimed layered line plays at the previous track's time: no time-missing." + }, + { + "id": "tracklist-warnings-038", + "input": "12. Nitepunk - No Manners\n**[**14:21**] 10. Nitepunk - ID**\nw/ Nitepunk & Habstrakt - Point", + "expected": { + "entries": [ + { + "kind": "track", + "time": null, + "layered": false, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "No Manners", + "position": { + "number": 12 + } + } + }, + { + "kind": "track", + "time": { + "raw": "14:21", + "seconds": 861 + }, + "layered": false, + "parts": { + "lead": "**[**", + "time": "14:21", + "gap": "**] ", + "rest": "10. Nitepunk - ID**" + }, + "track": { + "artists": [ + "Nitepunk" + ], + "title": "ID", + "position": { + "number": 10 + } + } + }, + { + "kind": "track", + "time": null, + "layered": true, + "track": { + "artists": [ + "Nitepunk", + "Habstrakt" + ], + "title": "Point", + "position": null + } + } + ], + "warnings": [ + { + "code": "time-missing", + "line": 1, + "severity": "warning", + "suggestion": null + }, + { + "code": "no-start-at-zero", + "line": 2, + "severity": "info", + "suggestion": null + }, + { + "code": "position-gap", + "line": 2, + "severity": "warning", + "suggestion": null + } + ], + "stats": { + "lines": 3, + "tracks": 3, + "markers": 0, + "timed": 1, + "firstTime": 861, + "lastTime": 861 + } + }, + "rules": [ + "R13.2.1", + "R13.2.3", + "R13.7", + "R13.12", + "R13.13" + ], + "source": "real DJ set tracklist (Nitepunk)", + "note": "Untimed numbered lines, a bold timed line and a layered line, as pasted." } ] } diff --git a/spec/schema/tracklist.schema.json b/spec/schema/tracklist.schema.json index 49ae22c..052c349 100644 --- a/spec/schema/tracklist.schema.json +++ b/spec/schema/tracklist.schema.json @@ -28,7 +28,7 @@ "entry": { "type": "object", "additionalProperties": false, - "required": ["line", "kind", "eol", "raw", "parts", "time", "track"], + "required": ["line", "kind", "eol", "raw", "parts", "time", "track", "layered"], "properties": { "line": { "type": "integer", "minimum": 1 }, "kind": { "enum": ["track", "marker", "header", "link", "note", "blank"] }, @@ -56,7 +56,11 @@ } ] }, - "track": { "oneOf": [{ "type": "null" }, { "$ref": "parsed-track.schema.json" }] } + "track": { "oneOf": [{ "type": "null" }, { "$ref": "parsed-track.schema.json" }] }, + "layered": { + "type": "boolean", + "description": "R13.13: the line starts with a layered word (`w/`): played over the previous track." + } } }, "warning": { From ae8fa1e229c09293ed95a8e0eb64ad30fd04d59b Mon Sep 17 00:00:00 2001 From: 4matic Date: Wed, 11 Nov 2026 00:37:43 +0200 Subject: [PATCH 5/5] docs: update the fixture and test counts and the tracklist bundle size 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. --- README.md | 40 +++++++++++--------- js/README.md | 4 +- python/README.md | 2 +- site/src/components/Stats.astro | 2 +- site/src/content/docs/guides/tracklists.mdx | 2 +- site/src/content/docs/index.mdx | 2 +- site/src/content/docs/project/ports.md | 4 +- site/src/content/docs/project/testing.md | 23 +++++------ site/src/content/docs/start/introduction.mdx | 2 +- 9 files changed, 43 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 9136d94..f5035fb 100644 --- a/README.md +++ b/README.md @@ -99,13 +99,13 @@ Every key is always present. When a guess was involved, `warnings` says which on | Number | What it means | |---|---| -| **12,965** shared fixtures | 1,148 written by hand, 11,817 generated from combinations. 100% pass in JS and Python, nothing skipped. | -| **1,074** of them on tracklists | 248 handwritten, 826 generated. Line splitting, times, warnings, edits | -| **1,293** JS tests | every fixture, a schema check on every output, property-based tests of the spec invariants, API tests | +| **13,124** shared fixtures | 1,197 written by hand, 11,927 generated from combinations. 100% pass in JS and Python, nothing skipped. | +| **1,233** of them on tracklists | 297 handwritten, 936 generated. Line splitting, times, bullets and Markdown, warnings, edits | +| **1,346** JS tests | every fixture, a schema check on every output, property-based tests of the spec invariants, API tests | | **27** version types | remix, VIP, bootleg, extended, radio, original, live, remaster, sped up, … | -| **0** dependencies | ESM + CJS + TypeScript types, about 17 kB gzipped. `trackparse/tracklist` adds about 7.6 kB, only if you import it | +| **0** dependencies | ESM + CJS + TypeScript types, about 17 kB gzipped. `trackparse/tracklist` adds about 8.3 kB, only if you import it | | **Node 18+** | CI runs the full suite on 22 and 24, and every fixture against the built package on 18 and 20 | -| **Python 3.9+** | 1,283 pytest tests on 3.9 to 3.14, plus every fixture against the built wheel. Output is byte-identical to JS | +| **Python 3.9+** | 1,336 pytest tests on 3.9 to 3.14, plus every fixture against the built wheel. Output is byte-identical to JS | | **5,031** real tracklist lines | 117 podcast tracklists the tracklist rules were checked against. Every line round-trips byte for byte | | **1 spec** | [`spec/SPEC.md`](spec/SPEC.md) defines the behaviour; the Python port passes the same fixtures, and so will Rust | @@ -351,14 +351,14 @@ of the list uses spaced dashes. The fixtures in [`spec/fixtures`](spec/fixtures) are the source of truth. The spec says what should happen, the fixtures pin it down, and every port has to pass all of them. The JS and Python -packages both do: **12,965 of 12,965**, with empty skip lists, in CI on every push. +packages both do: **13,124 of 13,124**, with empty skip lists, in CI on every push. Passing a fixture only checks the fields the case asserts, so [`scripts/compare-ports.mjs`](scripts/compare-ports.mjs) also runs every fixture input through both ports and diffs the complete outputs, tracklists and edits included. Result: 0 differences, byte for byte. -### Handwritten: 1,148 cases in 27 files +### Handwritten: 1,197 cases in 27 files Each case cites the spec rules it exercises. 62 of them spell out the complete output field by field, so nothing can drift unnoticed. @@ -374,13 +374,13 @@ field, so nothing can drift unnoticed. | Modes | 65 | YouTube pipes, `"Title" by Artist`, uploader fallback, filenames | | Unicode and normalization | 71 | NFC, zero-width characters, fullwidth brackets, Cyrillic, CJK, Turkish İ | | `format`, `parseArtists`, unknown IDs | 94 | Round-trips, canonical joiners, `ID - ID` | -| Tracklist mode | 54 | All 17 real podcast lines that single-line `parse()` gets wrong, the 6 real lines with no separator at all, `parse(s, { mode: "tracklist" })` | -| Tracklist lines and times | 70 | LF/CRLF/CR, trailing spaces, line kinds, every time form, brackets, gap separators, `=>` arrows, invalid times | -| Tracklist positions | 13 | The real 81-line list numbered `1 ` to `81 ` without dots, and the `2 Unlimited` guard | -| Tracklist warnings | 36 | Each code with its near-miss, and the 10 real out-of-order lists with their suggestions | -| Tracklist edits | 75 | `set-time` style keeping, shift, clamp, `sort-by-time`, insert/delete line endings, invalid edits, locality | +| Tracklist mode | 61 | All 17 real podcast lines that single-line `parse()` gets wrong, the 6 real lines with no separator at all, `parse(s, { mode: "tracklist" })`, Markdown emphasis around names, and names that keep their `*` and `_` | +| Tracklist lines and times | 104 | LF/CRLF/CR, trailing spaces, line kinds, every time form, brackets, gap separators, `=>` arrows, invalid times, list bullets, Markdown around times, `w/` lines | +| Tracklist positions | 15 | The real 81-line list numbered `1 ` to `81 ` without dots, and the `2 Unlimited` guard, with a `w/` line in between | +| Tracklist warnings | 38 | Each code with its near-miss, and the 10 real out-of-order lists with their suggestions | +| Tracklist edits | 79 | `set-time` style keeping, shift, clamp, `sort-by-time`, insert/delete line endings, invalid edits, locality | -### Generated: 11,817 cases +### Generated: 11,927 cases A deterministic generator in [`spec/generator`](spec/generator) builds inputs from small "atoms": an artist, a joiner, a feat placement, a version group, a junk suffix. Each atom carries its own @@ -394,11 +394,13 @@ running a parser, so the generator can't just agree with the code it is testing. | dash suffixes | 1,174 | | filenames | 780 | | dedup | 1,008 | | unicode | 674 | | feat placement | 922 | | prefixes | 577 | -| tracklists | 826 | | | | +| tracklists | 826 | | tracklists with Markdown | 110 | The tracklist scenario crosses time forms (`MM:SS`, `H:MM:SS`, fractions, long minutes) with brackets, gap separators, position styles, line endings, an extra blank, header or note line, and -the warning each combination should raise. +the warning each combination should raise. A second scenario crosses list bullets and Markdown +emphasis around the time (`**T**`, `**[T]**`, `[**T**]`, `_[T]_`…) with emphasis around each track +line; the expected tracks are the plain lines' tracks. ### Properties @@ -418,7 +420,9 @@ For tracklists, on random multi-line text and random edit lists: - `applyEdits(t, [])` returns `t`, and an edit never touches a line it doesn't name; - `shift(+s)` then `shift(-s)` restores the text when nothing was clamped or upgraded; - 10,000 lines parse in linear time (the JS suite allows 3 s; it takes about 0.6 s); -- a one-line list gives the same track as `parse(rest, { mode: "tracklist" })`. +- a one-line list gives the same track as `parse()` in tracklist mode on its text without Markdown + emphasis or a leading `w/`; +- Markdown emphasis around a time or a track line changes nothing. ### Real tracklists @@ -670,8 +674,8 @@ spaced dashes. The checks run last, over the finished entries. | Language | Package | Status | |---|---|---| -| JavaScript / TypeScript | [`trackparse`](https://www.npmjs.com/package/trackparse) on npm | reference implementation, 12,965 / 12,965 fixtures, tracklists as `trackparse/tracklist` | -| Python | [`trackparse`](https://pypi.org/project/trackparse/) on PyPI | 12,965 / 12,965 fixtures, output identical to JS, tracklists as `trackparse.tracklist` | +| JavaScript / TypeScript | [`trackparse`](https://www.npmjs.com/package/trackparse) on npm | reference implementation, 13,124 / 13,124 fixtures, tracklists as `trackparse/tracklist` | +| Python | [`trackparse`](https://pypi.org/project/trackparse/) on PyPI | 13,124 / 13,124 fixtures, output identical to JS, tracklists as `trackparse.tracklist` | | Rust | `trackparse` on crates.io | planned, same fixtures | Want another language? The porting checklist is in [AGENTS.md](AGENTS.md). diff --git a/js/README.md b/js/README.md index b8effe8..fbab782 100644 --- a/js/README.md +++ b/js/README.md @@ -11,7 +11,7 @@ Parse music track names into structured metadata: artists, featured artists, rem This is the JavaScript/TypeScript reference implementation of the [trackparse spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md). It passes all -12,965 shared fixtures. Zero dependencies, ESM and CommonJS, TypeScript types included, never +13,124 shared fixtures. Zero dependencies, ESM and CommonJS, TypeScript types included, never throws. The principle is **extract, don't delete**: everything recognised lands in a field (artists with @@ -227,7 +227,7 @@ The full field reference, a gallery of examples and the comparison with other li `trackparse/tracklist` parses a whole tracklist: one entry per line with its kind, start time and a full `ParsedTrack`, plus checks with line numbers. Joining `raw + eol` over the entries gives the -input back byte for byte, whatever the line endings. It's a separate entry point (about 7.6 KiB +input back byte for byte, whatever the line endings. It's a separate entry point (about 8.3 KiB gzipped), so you only pay for it if you import it. ```js diff --git a/python/README.md b/python/README.md index aecdd37..fa22e2c 100644 --- a/python/README.md +++ b/python/README.md @@ -21,7 +21,7 @@ doesn't recognise stays in the title, word for word. This is the Python port of [trackparse](https://github.com/4matic/trackparse). Its behaviour is defined by a [shared spec](https://github.com/4matic/trackparse/blob/main/spec/SPEC.md) and pinned -by 12,965 fixtures. It passes all of them, and for every fixture input its output is byte-identical +by 13,124 fixtures. It passes all of them, and for every fixture input its output is byte-identical to the JavaScript package. - Python 3.9 to 3.14 diff --git a/site/src/components/Stats.astro b/site/src/components/Stats.astro index 34c2695..7221064 100644 --- a/site/src/components/Stats.astro +++ b/site/src/components/Stats.astro @@ -1,7 +1,7 @@ --- // Monochrome numbers in one row. Keep them in sync with the fixtures (see AGENTS.md). const stats = [ - { n: "12,965", label: "shared fixtures, 100% passing in both ports" }, + { n: "13,124", label: "shared fixtures, 100% passing in both ports" }, { n: "0", label: "runtime dependencies" }, { n: "27", label: "version types, remix to nightcore" }, { n: "0", label: "differences between JS and Python output" }, diff --git a/site/src/content/docs/guides/tracklists.mdx b/site/src/content/docs/guides/tracklists.mdx index 159398d..282bab3 100644 --- a/site/src/content/docs/guides/tracklists.mdx +++ b/site/src/content/docs/guides/tracklists.mdx @@ -27,7 +27,7 @@ from trackparse.tracklist import parse_tracklist -It's a separate entry point, about 7.6 KiB gzipped, so code that only parses single tracks never +It's a separate entry point, about 8.3 KiB gzipped, so code that only parses single tracks never loads it. ## A first list diff --git a/site/src/content/docs/index.mdx b/site/src/content/docs/index.mdx index adb8f88..fb934e4 100644 --- a/site/src/content/docs/index.mdx +++ b/site/src/content/docs/index.mdx @@ -47,7 +47,7 @@ in the title, word for word. { title: "27 version types", body: "Remix, VIP, bootleg, extended, radio edit, live, remaster, sped up, slowed and the rest, each with its remixers, modifiers and year." }, { title: "Noise, labelled", body: "[Official Video], [HD], - YouTube and [NCS Release] leave the title but land in junk with a kind, instead of disappearing." }, { title: "Whole tracklists", body: "Paste the tracklist of a mix: every line is parsed, times are checked, and an out-of-order time often comes with the fix. Edits rewrite only the lines you name." }, - { title: "One spec, two languages", body: "The JavaScript and Python packages pass the same 12,965 fixtures and return byte-identical JSON. A Rust port is next." }, + { title: "One spec, two languages", body: "The JavaScript and Python packages pass the same 13,124 fixtures and return byte-identical JSON. A Rust port is next." }, { title: "Small and total", body: "No dependencies, about 17 kB gzipped, linear time. It never throws on a string, and bad options fall back to defaults." }, ]} /> diff --git a/site/src/content/docs/project/ports.md b/site/src/content/docs/project/ports.md index 04823f5..02ba898 100644 --- a/site/src/content/docs/project/ports.md +++ b/site/src/content/docs/project/ports.md @@ -5,8 +5,8 @@ description: The JavaScript, Python and upcoming Rust implementations, and what | Language | Package | Status | |---|---|---| -| JavaScript / TypeScript | [`trackparse`](https://www.npmjs.com/package/trackparse) on npm | Reference implementation. 12,965 / 12,965 fixtures. Tracklists in `trackparse/tracklist` | -| Python | [`trackparse`](https://pypi.org/project/trackparse/) on PyPI | 12,965 / 12,965 fixtures, output identical to JS. Tracklists in `trackparse.tracklist` | +| JavaScript / TypeScript | [`trackparse`](https://www.npmjs.com/package/trackparse) on npm | Reference implementation. 13,124 / 13,124 fixtures. Tracklists in `trackparse/tracklist` | +| Python | [`trackparse`](https://pypi.org/project/trackparse/) on PyPI | 13,124 / 13,124 fixtures, output identical to JS. Tracklists in `trackparse.tracklist` | | Rust | `trackparse` on crates.io | Planned, same fixtures | All three share one version number. The spec, the JavaScript package and the Python package are diff --git a/site/src/content/docs/project/testing.md b/site/src/content/docs/project/testing.md index 1ceeab4..f0021b4 100644 --- a/site/src/content/docs/project/testing.md +++ b/site/src/content/docs/project/testing.md @@ -1,14 +1,14 @@ --- title: How it's tested -description: 12,965 shared fixtures, a generator that can't agree with the code by accident, property tests, and a byte-level diff between the ports. +description: 13,124 shared fixtures, a generator that can't agree with the code by accident, property tests, and a byte-level diff between the ports. --- The fixtures in [`spec/fixtures`](https://github.com/4matic/trackparse/tree/main/spec/fixtures) are the source of truth. The spec says what should happen, the fixtures pin it down, and every port has -to pass all of them. Both packages do: **12,965 of 12,965**, with empty skip lists, in CI on every +to pass all of them. Both packages do: **13,124 of 13,124**, with empty skip lists, in CI on every push. -## Handwritten: 1,148 cases +## Handwritten: 1,197 cases Each case cites the spec rules it exercises, and 62 of them spell out the complete output, field by field, so nothing drifts unnoticed. @@ -24,13 +24,13 @@ field, so nothing drifts unnoticed. | Modes | 65 | YouTube pipes, `"Title" by Artist`, uploader fallback, file names | | Unicode and normalisation | 71 | NFC, zero-width characters, fullwidth brackets, Cyrillic, CJK, Turkish İ | | `format`, `parseArtists`, unknown IDs | 94 | Round trips, canonical joiners, `ID - ID` | -| Tracklist mode | 54 | Real lines that single-line `parse()` gets wrong, and real lines with no separator at all | -| Tracklist lines and times | 70 | LF/CRLF/CR, trailing spaces, line kinds, every time form, brackets, gap separators, invalid times | -| Tracklist positions | 13 | A real 81-line list numbered without dots, and the `2 Unlimited` guard | -| Tracklist warnings | 36 | Each code with its near-miss, and real out-of-order lists with their suggestions | -| Tracklist edits | 75 | Style keeping, shift, clamp, sort, insert/delete line endings, invalid edits, locality | +| Tracklist mode | 61 | Real lines that single-line `parse()` gets wrong, real lines with no separator at all, Markdown around names, and names that keep their `*` and `_` | +| Tracklist lines and times | 104 | LF/CRLF/CR, trailing spaces, line kinds, every time form, brackets, gap separators, invalid times, list bullets, Markdown around times, `w/` lines | +| Tracklist positions | 15 | A real 81-line list numbered without dots, and the `2 Unlimited` guard | +| Tracklist warnings | 38 | Each code with its near-miss, and real out-of-order lists with their suggestions | +| Tracklist edits | 79 | Style keeping, shift, clamp, sort, insert/delete line endings, invalid edits, locality | -## Generated: 11,817 cases +## Generated: 11,927 cases A deterministic generator builds inputs from small "atoms": an artist, a joiner, a feat placement, a version group, a junk suffix. Each atom carries its own expected contribution, and the expected @@ -45,7 +45,7 @@ don't model are rejected instead of guessed. | dash suffixes | 1,174 | file names | 780 | | dedup | 1,008 | unicode | 674 | | feat placement | 922 | prefixes | 577 | -| tracklists | 826 | | | +| tracklists | 826 | tracklists with Markdown | 110 | ## Properties @@ -64,7 +64,8 @@ For tracklists, on random multi-line text and random edit lists: - `raw + eol` over all entries gives back the input, and `lead + time + gap + rest` gives `raw`; - `applyEdits(t, [])` returns `t`, and an edit never touches a line it doesn't name; - shifting forward and back restores the text, unless something was clamped or upgraded; -- 10,000 lines parse in linear time (the JS suite allows 3 s; it takes about 0.6 s). +- 10,000 lines parse in linear time (the JS suite allows 3 s; it takes about 0.6 s); +- Markdown emphasis around a time or a track line changes nothing. ## Port against port diff --git a/site/src/content/docs/start/introduction.mdx b/site/src/content/docs/start/introduction.mdx index 252673f..3776ac9 100644 --- a/site/src/content/docs/start/introduction.mdx +++ b/site/src/content/docs/start/introduction.mdx @@ -94,7 +94,7 @@ explains every field. ## Spec first Behaviour isn't defined by the JavaScript code. It's defined by a written -[spec](/trackparse/reference/spec/) with numbered rules, and by 12,965 fixtures that pin those rules +[spec](/trackparse/reference/spec/) with numbered rules, and by 13,124 fixtures that pin those rules down. The JavaScript package is the reference implementation. The Python package passes the same fixtures and produces the same JSON, byte for byte. A Rust port will do the same.