Repository navigation
Implement spec 1.1.0: universal medial-n elision veto - #1
Merged
Merged
Conversation
Vendors canonical spec 1.1.0 (spec-v1.1.0) and implements the rule change it specifies. _quote_ambiguity.compute_ambiguous_indices narrows the general veto from 1-3 LETTER code points to exactly one, U+006E or U+004E, and widens it from straight ASCII to the whole NARROW class. The widening is an idempotency obligation, not a preference: the veto's marks are now converted to U+2019 by `apostrophe`, so a straight-only predicate would not recognise its own output and pass 2 would pair `rock ’n’ roll` as an ordinary NARROW quotation on the next run. The function now returns a single veto set instead of (veto, preserve). The preserve set existed to stop `apostrophe`'s case ladder from converting marks spec 0.5.0 wanted preserved; conversion is now the specified outcome, so apostrophe.py drops the lookup and its import, skips no position, and reads no locale data again (order.json: localeData [] for `apostrophe`). Observable change, all ten locales: rock 'n' roll -> rock ’n’ roll (was: unchanged outside en-US) "это 'моё' дело" -> «это „моё“ дело» The letter 'n' ... -> The letter ’n’ ... (accepted false positive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vendors canonical spec 1.1.0 (
spec-v1.1.0) and implements the rule change it specifies. Bumps the package to 1.1.0.Observable change, all ten locales
rock 'n' rollen-USrock ’n’ roll"это 'моё' дело"«это 'моё' дело»«это „моё“ дело»The letter 'n' is common.The letter ’n’ is common.(accepted false positive, spec §3.2)compute_ambiguous_indicesnarrows the general veto to a single enclosedn/N, widens it to the wholeNARROWclass (an idempotency obligation — a veto that produces U+2019 must recognise U+2019), and returns one veto set instead of(veto, preserve).apostrophe.pydrops the preserve lookup and reads no locale data again.