musicbrainz-scripts icon indicating copy to clipboard operation
musicbrainz-scripts copied to clipboard

A case where surrounding HYPHEN-MINUS are not replaced by EN DASH

Open jesus2099 opened this issue 3 years ago • 3 comments
trafficstars

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.

jesus2099 avatar Oct 03 '22 12:10 jesus2099

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.

jesus2099 avatar Oct 03 '22 15:10 jesus2099

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

kellnerd avatar Oct 03 '22 16:10 kellnerd

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.

jesus2099 avatar Oct 03 '22 17:10 jesus2099