polytypo 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bb01ab8478817898277fc5b6d1f1654cc847a3f82ab1975e043e1a58409d2db
4
- data.tar.gz: 559fdc9ca8756129e28d9762f2f3cc5666384f4c470960d84f181448dba56a0b
3
+ metadata.gz: cf167fa991d92f3a4e63e03b4b4f96882a5842a2c80759941533cde64b0cf5a4
4
+ data.tar.gz: 8337a2ad5508d5d698b5130329753eacf8534ec5b7ead365981f8d42fa85931f
5
5
  SHA512:
6
- metadata.gz: 69173cb92815bc03d120ea753d9cf1304c31786bdc576f7ac7f358679cbcac558b789d1d742622728d9cc23486de58b7185832e5e768c939032a24a7b8a94cca
7
- data.tar.gz: ed92be4e7fe8d8d026fee4aaff03936553c4d086fe44a1eccf6bd8f890ba17c58710856e0b08a486722022d034ac432c623ccac28610c7c76f2994240e1e83c7
6
+ metadata.gz: d408de52fe21124d92a29ef3492fccaeca452ae11c80924a2e96dd6f69509d23b21263efb4635db3d7b41b79d02798eb261eb8be87b72d24ad8f1f139a13cb59
7
+ data.tar.gz: a9a451994c2b99626c5eaa702c50bd2d6b4cb2c68ee754b9711343cb51a0cf59893c3e9443203483f33adf5513a3e5431cc72d274f089004759034570610084b
@@ -20,12 +20,15 @@ canonical's `spec/` changes, re-copy the affected files here.
20
20
 
21
21
  CI checks that it was done. `script/check-vendored-spec.sh` compares every file in this
22
22
  directory against canonical `polytypo/polytypo` at tag `spec-v` + this directory's own
23
- `VERSION`, and fails on any difference. Three details: the files this repository authors
24
- itself are listed in `.not-canonical` and skipped; `locales/*.json` are compared with the
25
- `sources` array dropped from both sides, which is the one field a vendored copy may
26
- legitimately differ in; and a file here with no canonical counterpart is a failure, so a
27
- canonical rename cannot pass unnoticed. Completeness is deliberately not checked — each
28
- runtime vendors its own subset, and the subsets differ.
23
+ `VERSION`, and fails on any difference. Three details. The files this repository authors
24
+ itself are listed in `.not-canonical` and skipped — and a listed path that canonical *does*
25
+ have is an error, so that list cannot be used to keep a forked copy of a canonical file. A
26
+ `locales/*.json` file is compared in full when it carries its `sources` array, and against
27
+ canonical minus that array when it does not, which is the shipped form three of the five
28
+ runtimes vendor; the script reads which case it is off the file rather than being told. And a
29
+ file here with no canonical counterpart is a failure, so a canonical rename cannot pass
30
+ unnoticed. Completeness is deliberately not checked — each runtime vendors its own subset,
31
+ and the subsets differ.
29
32
 
30
33
  Before that check existed, this half of the tree went stale unnoticed in four of the five
31
34
  ports at once: the data half is proved by the test suite, and nothing at all read the prose.
@@ -1 +1 @@
1
- 1.6.1
1
+ 1.6.2
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "cs",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "de-CH",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "de-DE",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "el",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "en-GB",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "en-US",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "es",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "fi",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "fr-CA",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "fr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "it",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "cases": [
4
4
  {
5
5
  "id": "exact-en-us",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "nl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "pl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "pt-BR",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "pt-PT",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "ru",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "sv",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "tr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "locale": "uk",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "$comment": "Locale resolution input. Algorithm is specified in spec/rules/locale-resolution.md and is identical in every runtime — never delegate it to a platform locale-negotiation library. \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
4
4
  "locales": [
5
5
  "en-US",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.6.1",
2
+ "spec": "1.6.2",
3
3
  "$comment": "Single source of truth for pipeline order. Rules run in ascending `order`. Disabling a rule removes it from the sequence and never reorders the rest. Rule ids are public API (see docs/ARCHITECTURE.md section 5). \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
4
4
  "rules": [
5
5
  {
@@ -605,21 +605,40 @@ spec 1.4.0. Measured on this change, `markdown`/`commonmark`, `en-GB`:
605
605
  words early and the author's own closing mark is left to `apostrophe` as a stray U+2019. §1 of
606
606
  that issue is closed by the veto above; §3 is not, and is not going to be.
607
607
 
608
- **Why §3 is decided and not merely unfixed.** Two measurements, both on the published 1.6.0
609
- package. First, **the glyph at the possessive's own position is correct either way** — U+2019,
610
- whether the mark is taken as a closing quotation mark or left unmatched for `apostrophe`. What
611
- the defect costs is never the character a reader sees there; it is the *pairing it consumes*,
612
- which is why the visible symptom always appears somewhere else (a stray U+0027 at the real
613
- closing mark, or a middle paragraph re-nested from `‘ ’` to `“ ”`). Second, **separating the two
614
- readings was implemented and measured, and it is worse.** The narrowest local veto that can do
615
- it — decline a `NARROW` mark whose literal neighbour is `MARKER` and whose attaching `LETTER`
616
- run is empty — breaks **7 of 2801 conformance cases**, five of them `tr` cases that are correct
617
- today: `tr-html-span-boundary-suffix-declined`,
608
+ **Why §3 is decided and not merely unfixed.** Two measurements, both on a published package.
609
+
610
+ First, **the U+2019 at the possessive's own position is produced by the pairing, and nothing else
611
+ can produce it.** `apostrophe` cannot reach that mark: its left neighbour is the inline `MARKER`,
612
+ which §3.1 deliberately keeps out of [apostrophe.md](apostrophe.md) §3.1's `CLOSEDELIM`, and its
613
+ right neighbour is a space, so no case in that rule's ladder fires. Measured on published 1.6.1,
614
+ `markdown`/`commonmark`, `en-GB`: `` The `xs`' printer works. `` comes back **unchanged** — an
615
+ unmatched span-boundary plural possessive keeps its U+0027. So the cost of this behaviour is a
616
+ consumed *pairing*, and the visible symptom of that appears elsewhere (a stray U+0027 at the real
617
+ closing mark, or a middle paragraph re-nested from `‘ ’` to `“ ”`) — but declining the mark does
618
+ not buy the right glyph in exchange. It moves the straight mark rather than removing it. An
619
+ earlier revision of this paragraph claimed the glyph was "correct either way"; it is not, and the
620
+ measurement above is what replaced the claim.
621
+
622
+ Second, **separating the two readings was implemented and measured, and it is a trade rather than
623
+ a fix.** The narrowest local veto that can do it — decline a `NARROW` mark whose literal
624
+ neighbour is `MARKER` and whose attaching `LETTER` run is empty — breaks **6 of the 1366 fixture
625
+ cases** (7 tests in polytypo-js's runner, which counts each case's idempotency re-run separately;
626
+ the denominator to reproduce is the suite's case count in [CONFORMANCE.md](../CONFORMANCE.md),
627
+ never a runtime's test total). Five are `tr` cases that are correct today:
628
+ `tr-html-span-boundary-suffix-declined`,
618
629
  `tr-markdown-commonmark-span-boundary-suffix-declined`,
619
630
  `tr-html-span-boundary-quotation-outside-the-span`,
620
631
  `tr-html-span-boundary-non-ascii-initial-fragment` and `tr-html-span-boundary-ordinal-fragment`.
621
- That is this section's own claim — no test over these neighbours can separate a plural
622
- possessive from a closing mark after a span — turned from an argument into a number.
632
+
633
+ The sixth is this section's own fixture, `en-gb-markdown-commonmark-span-boundary-plural-possessive-not-closed`,
634
+ and it is the one worth reading: the veto does exactly what it is aimed at and still comes out
635
+ wrong. `He says 'avoid `` `xs`' `` printer.' Done.` typesets today as
636
+ `He says ‘avoid `` `xs`’ `` printer.' Done.` — pair closed two words early, author's own mark left
637
+ straight. Under the veto it becomes `He says ‘avoid `` `xs`' `` printer.’ Done.` — the pair now
638
+ closes at the author's mark, which is right, and the typewriter apostrophe has moved to the
639
+ possessive, which is not, for the reason the first measurement gives. That is this section's own
640
+ claim — no test over these neighbours can separate a plural possessive from a closing mark after a
641
+ span — turned from an argument into a number, and into a second output nobody would fixture.
623
642
 
624
643
  **Operator decision (2026-09-24): where no exact answer exists, choose one behaviour and pin it
625
644
  rather than leave the rule undefined.** Five runtimes agreeing byte-for-byte is the product; an
@@ -1574,3 +1593,15 @@ released fixture `en-us-markdown-commonmark-boundary-nested-quotes` and the `NAR
1574
1593
  `modes.md` §3.3's normative rows — not their `WIDE` forms, which both vetoes leave alone. §3.2 records that measurement, the accepted false positive (a quotation whose
1575
1594
  whole content is one listed fragment), and the one shape no veto over these neighbours can
1576
1595
  reach — the plural possessive, which is byte-identical to a closing mark after a span.
1596
+
1597
+ 1.6.2 corrects §3.2's own measurements of the decision above; no behaviour, fixture or locale
1598
+ field changes. Two errors, both introduced with the decision record on 2026-09-24 and both
1599
+ overstating how cheap the decided behaviour is. The first claimed the glyph at the possessive's
1600
+ position was "correct either way" — it is not: `apostrophe` cannot reach a mark whose left
1601
+ neighbour is the inline `MARKER`, so declining the pairing leaves U+0027 there, measured on the
1602
+ published 1.6.1 package. The second counted **7 of 2801 conformance cases** where 2801 is
1603
+ polytypo-js's vitest test total, a figure no other runtime can reproduce; the cost is **6 of the
1604
+ 1366 fixture cases**, and the sixth — this section's own `en-GB` fixture — is now described
1605
+ rather than left in the count, because the veto moves the pair to the author's mark correctly and
1606
+ moves the typewriter apostrophe to the possessive at the same time. A conformance count in this
1607
+ document is a count of fixture cases, never of one runner's tests.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polytypo
4
- VERSION = "1.6.1"
4
+ VERSION = "1.6.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytypo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iurii Rogulia