Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jesus2099 opened this issue Oct 3, 2022 · 3 comments
Open
Labels
punctuation Guess Unicode punctuation script

Comments

@jesus2099
Copy link
Contributor

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
Copy link
Contributor Author

jesus2099 commented Oct 3, 2022

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.

@kellnerd
Copy link
Owner

kellnerd commented Oct 3, 2022

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):

Japanese: [
[/(?<=[^\p{L}\d]|^)-(.+?)-(?=[^\p{L}\d]|$)/ug, '–$1–'], // dashes used as brackets
],

@kellnerd kellnerd added the punctuation Guess Unicode punctuation script label Oct 3, 2022
@jesus2099
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
punctuation Guess Unicode punctuation script
Projects
None yet
Development

No branches or pull requests

2 participants