Skip to content

Implement spec 1.1.0: universal medial-n elision veto - #1

Merged
rogulia merged 1 commit into
mainfrom
spec-1.1.0-medial-n
Sep 9, 2026
Merged

rogulia merged 1 commit into
mainfrom
spec-1.1.0-medial-n

Conversation

@rogulia

@rogulia rogulia commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

input before after
rock 'n' roll unchanged outside en-US rock ’n’ roll
"это 'моё' дело" «это 'моё' дело» «это „моё“ дело»
The letter 'n' is common. unchanged The letter ’n’ is common. (accepted false positive, spec §3.2)

compute_ambiguous_indices narrows the general veto to a single enclosed n/N, widens it to the whole NARROW class (an idempotency obligation — a veto that produces U+2019 must recognise U+2019), and returns one veto set instead of (veto, preserve). apostrophe.py drops the preserve lookup and reads no locale data again.

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)
@rogulia
rogulia merged commit 3ed4f8d into main Sep 9, 2026
4 checks passed
@rogulia
rogulia deleted the spec-1.1.0-medial-n branch September 9, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant