musicbrainz-scripts
musicbrainz-scripts copied to clipboard
A case where surrounding HYPHEN-MINUS are not replaced by EN DASH
Usually surrounding U+002D HYPHEN-MINUS are replaced by U+2013 EN DASH. But it does not work for this tracklist or recording (fixed by typing EN DASH manually on MBS so I'm linking test). It even worked for the same title, when I typed HYPHEN-MINUS by hand, if I remember correctly.
Ah here is a current example where it works: Last medium on /release/1fdd5c7f-e475-4b3f-ab2a-5f3fc4070e38.
In fact this release is big but still the script can replace HYPHEN-MINUS by EN DASH, on this same THANATOS –IF I CAN’T BE YOURS– title.
The important difference is that the release where it worked has the language set to Japanese, while the one where it does not work is set to English. Currently the relevant rule is only applied for Japanese tracklists (see also #20): https://github.com/kellnerd/musicbrainz-scripts/blob/9989edc0039cfc4581a7e883ee049ba8fabbfbf1/utils/string/punctuation.js#L68-L70
Oh! Thanks! Now I understand! It explains why sometimes I see some replacements not working as I expect.
Not sure if we should remove this limitation, though.