3 ms·
I'm gonna say I'm rather happy that \w doesn't match apostrophes, aka string literal delimiters in some environments.
by ben0x539 11y ago
I'm gonna say I'm rather happy that \w doesn't match apostrophes, aka string literal delimiters in some environments.
- sp332 11y agoMODIFIER LETTER APOSTOPHE shouldn't delimit anything. Use RIGHT SINGLE QUOTATION MARK or an ASCII apostrophe.
- GauntletWizard 11y agoIf this proposal is accepted, \w will still not match the apostrophe character you use in coding (Ascii 0x27, unicode U+0027); Rather, it will match an apostrophe character (U+02BC) that represents a part of a word, intended for conveying the semantics of the apostrophe when used in books and language, not in common code.
- dragonwriter 11y agoU+0027 (APOSTROPHE) is a string (or character) literal delimiter in some environments, and it might be sane (though inconvenient, for typing) to have an environment where U+2018 and U+2019 (LEFT and RIGHT SINGLE QUOTATION MARK) were character/string delimiters, but there is no sane reason U+02BC (APOSTROPHE, MODIFIER LETTER) should ever be a delimiter of any kind. This article is about the argument that Unicode Committee recommendation that U+2019 (RIGHT SINGLE QUOTATION MARK) is the preferred character for apostrophe in English text is wrong (since, among other things, it breaks detecting matched pairs of quotation marks), and that the preferred character for that use should be U+02BC (APOSTROPHE, MODIFIER LETTER).
- anjbe 11y agoThere are other situations where pairs of quotation marks can be unmatched. For example, in English it’s common to have an opening quote at the beginning of each paragraph of a multi‐paragraph quote, but only close it on the final paragraph.