no-chris / chord-symbol

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

UltimateGuitar replace entries will likely fail for several entries?! #618

Closed perivar closed 7 months ago

perivar commented 1 year ago

I believe the current replace entries will fail in several instances.

An updated version I use is: const chordSymbolUltimateGuitarRenderer = (chord: any) => { chord.formatted.symbol = chord.formatted.symbol .replace(/[(), ]/g, '') .replace(/mM(?!aj)/g, 'mMaj') .replace(/M(?!aj)/g, 'Maj') .replace('°', 'dim');

return chord; };

no-chris commented 1 year ago

Nice! Would you mind doing a pull request with the fix and updated tests cases that would be failing today? 🙏

perivar commented 1 year ago

I will look at this later. I did not find any immediate errors trying our more chords so I might have been to quick believing these changes are necessary.... I'll get back to this :)

no-chris commented 1 year ago

No worries, let's keep this open just in case

no-chris commented 7 months ago

closing since no actual case has been submitted