no-chris / chord-symbol

The definitive chord symbol parser and renderer for Javascript/NodeJS.
https://chord-symbol.netlify.app
MIT License
151 stars 8 forks source link

Chords like A7+5 is parsed incorrectly #609

Closed perivar closed 1 year ago

perivar commented 1 year ago

A7+5 is incorrectly parsed into A5, the same is A7(+5) instead of A7(#5). However A7+ is correctly parsed into A7(#5). The same error applies to A7-5, which is parsed into A5, instead of A7(b5).

My fix which seem to work for now is: let valueCleaned = value; valueCleaned = valueCleaned.replace(/+5/g, '(#5)'); valueCleaned = valueCleaned.replace(/-5/g, '(b5)');

no-chris commented 1 year ago

Thanks for the report! This will be fixed in 4.0.0

no-chris commented 1 year ago

Available in v4.0.0-beta.4