martijnversluis / ChordSheetJS

A JavaScript library for parsing and formatting chords and chord sheets
https://github.com/users/martijnversluis/projects/4
GNU General Public License v2.0
318 stars 51 forks source link

`ChordProParser` throws an error if lyrics contain a `%` character #1450

Open edonv opened 3 days ago

edonv commented 3 days ago

I currently get a parsing error if the chord sheet has a % symbol.

See here: https://www.chordpro.org/chordpro/directives-env_grid/

edonv commented 3 days ago

Actually, it turns out it wasn't the % character in the grid, but rather a % I had in the lyrics. Here's the exact error message:

Uncaught PeggySyntaxError: Expected "#", "%{", "[", "[*", "\\", "\r", "]", "{", "|", "}", [\n,\r], [^|,[,\],\\,{,},%,#,\r,\n,\t, ], end of input, or space but "%" found.