standardebooks / manual

The source code for the Standard Ebooks Manual of Style.
https://standardebooks.org/manual
Other
131 stars 33 forks source link

Use figure dashes to obscure single digits #157

Closed bentley closed 5 months ago

bentley commented 5 months ago

According to Unicode, figure dash is semantically identical to hyphen‐minus. Having a digit’s width seems desirable in this case.

Before After
Before After

[^0-9a-zA-Z][0-9][0-9][0-9]-[^0-9a-zA-Z] should pick up all existing cases in the corpus. To make sure, I also tried the broader [0-9][0-9]*-[^a-zA-Z], but it didn’t catch anything new except false positives.

acabal commented 5 months ago

Good idea, thanks! However a word joiner is not necessary because a figure dash only breaks after and not before. Can you remove the word joiner from the changes?

bentley commented 5 months ago

Done. (I’m unable to squash at the moment, sorry.)

acabal commented 5 months ago

Thanks!