Skip to content

Commit

Permalink
Allow * in user defined chord names
Browse files Browse the repository at this point in the history
  • Loading branch information
olvidalo committed Dec 13, 2024
1 parent f88956e commit 0ce859a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chordsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function tokenizeLine(line: string, lineIndex: number, chordLineMarker: s
const textLineMarkerPattern = escapeStringRegexp(textLineMarker);

const tokenPattern = new RegExp(
`(?<header>(?<=^\\s*)(\\[)([^\\]]+)(])(?=\\s*$))|(?<marker>${textLineMarkerPattern}|${chordLineMarkerPattern})\\s*$|(?<inline_chord>(\\[)(\\S+)([^\\[()]*)(]))|(?<user_defined_chord>([A-Z][A-Za-z0-9#()+-°/]*)\\[(([0-9]+)\\|)?([0-9x_]+)])|(?<word>([[\\]/|%]+)|[^\\s\\[]+)|(?<ws>\\s+)`,
`(?<header>(?<=^\\s*)(\\[)([^\\]]+)(])(?=\\s*$))|(?<marker>${textLineMarkerPattern}|${chordLineMarkerPattern})\\s*$|(?<inline_chord>(\\[)(\\S+)([^\\[()]*)(]))|(?<user_defined_chord>([A-Z][A-Za-z0-9#()+-°/*]*)\\[(([0-9]+)\\|)?([0-9x_]+)])|(?<word>([[\\]/|%]+)|[^\\s\\[]+)|(?<ws>\\s+)`,
"gd");

const tokens: Token[] = [];
Expand Down

0 comments on commit 0ce859a

Please sign in to comment.