diff --git a/src/chordsUtils.ts b/src/chordsUtils.ts index 448863d..ff1102c 100644 --- a/src/chordsUtils.ts +++ b/src/chordsUtils.ts @@ -105,7 +105,7 @@ export function tokenizeLine(line: string, lineIndex: number, chordLineMarker: s const textLineMarkerPattern = escapeStringRegexp(textLineMarker); const tokenPattern = new RegExp( - `(?
(?<=^\\s*)(\\[)([^\\]]+)(])(?=\\s*$))|(?${textLineMarkerPattern}|${chordLineMarkerPattern})\\s*$|(?(\\[)(\\S+)([^\\[()]*)(]))|(?([A-Z][A-Za-z0-9#()+-°/]*)\\[(([0-9]+)\\|)?([0-9x_]+)])|(?([[\\]/|%]+)|[^\\s\\[]+)|(?\\s+)`, + `(?
(?<=^\\s*)(\\[)([^\\]]+)(])(?=\\s*$))|(?${textLineMarkerPattern}|${chordLineMarkerPattern})\\s*$|(?(\\[)(\\S+)([^\\[()]*)(]))|(?([A-Z][A-Za-z0-9#()+-°/*]*)\\[(([0-9]+)\\|)?([0-9x_]+)])|(?([[\\]/|%]+)|[^\\s\\[]+)|(?\\s+)`, "gd"); const tokens: Token[] = [];