fix SSC parser not recognizing comma+comment measure separators
Commas followed by comments (e.g. ', // measure 1') were not recognized as measure separators, causing all notes to be parsed as a single measure with compressed timing. This is why all arrows spawned at once on most songs (except Get Lucky which had plain commas). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>main
parent
4e2abdd857
commit
b22a9be20b
|
|
@ -126,7 +126,7 @@ function parseNoteSection(
|
||||||
let currentMeasure: string[] = []
|
let currentMeasure: string[] = []
|
||||||
|
|
||||||
for (const line of noteLines) {
|
for (const line of noteLines) {
|
||||||
if (line === ',') {
|
if (line === ',' || line.startsWith(',')) {
|
||||||
measures.push(currentMeasure)
|
measures.push(currentMeasure)
|
||||||
currentMeasure = []
|
currentMeasure = []
|
||||||
} else if (line.length >= 4 && /^[0-9MLF]+$/.test(line.slice(0, 4))) {
|
} else if (line.length >= 4 && /^[0-9MLF]+$/.test(line.slice(0, 4))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue