polytypo 1.6.1 → 1.6.3
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 +4 -4
- data/lib/polytypo/data/README.md +9 -6
- data/lib/polytypo/data/VERSION +1 -1
- data/lib/polytypo/data/fixtures/cs.json +1 -1
- data/lib/polytypo/data/fixtures/de-CH.json +1 -1
- data/lib/polytypo/data/fixtures/de-DE.json +1 -1
- data/lib/polytypo/data/fixtures/el.json +1 -1
- data/lib/polytypo/data/fixtures/en-GB.json +1 -1
- data/lib/polytypo/data/fixtures/en-US.json +1 -1
- data/lib/polytypo/data/fixtures/es.json +1 -1
- data/lib/polytypo/data/fixtures/fi.json +1 -1
- data/lib/polytypo/data/fixtures/fr-CA.json +1 -1
- data/lib/polytypo/data/fixtures/fr.json +1 -1
- data/lib/polytypo/data/fixtures/it.json +1 -1
- data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
- data/lib/polytypo/data/fixtures/nl.json +1 -1
- data/lib/polytypo/data/fixtures/pl.json +1 -1
- data/lib/polytypo/data/fixtures/pt-BR.json +1 -1
- data/lib/polytypo/data/fixtures/pt-PT.json +1 -1
- data/lib/polytypo/data/fixtures/ru.json +1 -1
- data/lib/polytypo/data/fixtures/sv.json +1 -1
- data/lib/polytypo/data/fixtures/tr.json +1 -1
- data/lib/polytypo/data/fixtures/uk.json +1 -1
- data/lib/polytypo/data/locales/registry.json +1 -1
- data/lib/polytypo/data/rules/order.json +1 -1
- data/lib/polytypo/data/rules/quotes.md +61 -12
- data/lib/polytypo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6776ba2390f63971edcd4f09cd84dbb3f1fc3e9678feee541a7f1667694fdbf
|
|
4
|
+
data.tar.gz: 7a6657ca0e43963c3c9f8509a0727a6dc9bbaed2f648b3fd4f295aca1c7bdf03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33d644b27e332aef05d2857a9e95598ab05ef5ff56b29a81ba077b5c1d32f0538a8e0d5718a9e5109710227e3559ad67081d3a418910e8cab9a4bc8c242b14c0
|
|
7
|
+
data.tar.gz: e8b828b749cfe12d719590ace28fb24a5f296bc52b14c959c74f24176921eca9c4ba583509198f56a4d9e4f684e3878dcb577add5c554a5c8b593a5680530fe9
|
data/lib/polytypo/data/README.md
CHANGED
|
@@ -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
|
|
24
|
-
itself are listed in `.not-canonical` and skipped
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
canonical
|
|
28
|
-
|
|
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.
|
data/lib/polytypo/data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.
|
|
1
|
+
1.6.3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.6.
|
|
2
|
+
"spec": "1.6.3",
|
|
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.
|
|
2
|
+
"spec": "1.6.3",
|
|
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,46 @@ 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
|
|
609
|
-
package
|
|
610
|
-
|
|
611
|
-
the
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
it
|
|
616
|
-
|
|
617
|
-
|
|
608
|
+
**Why §3 is decided and not merely unfixed.** Two measurements — the first on a published
|
|
609
|
+
package, the second on a build patched with the veto it measures, since no release contains it.
|
|
610
|
+
|
|
611
|
+
First, **the U+2019 at the possessive's own position is produced by the pairing, and nothing else
|
|
612
|
+
can produce it.** Not because `apostrophe` cannot see past a span boundary — it can, and
|
|
613
|
+
[apostrophe.md](apostrophe.md) §3.3 case 4 says so: the marker is in that rule's `OPENISH`
|
|
614
|
+
(`modes.md` §3.3), which is exactly why `` `x`'s `` reaches case 4 and comes out `` `x`’s ``. It is
|
|
615
|
+
this shape it cannot reach. Case 4 is the only case in the ladder that accepts the marker on the
|
|
616
|
+
left, and it requires `ALNUM` on the **right**; a plural possessive has a space there. Cases 2 and
|
|
617
|
+
2a read `ALNUM` and `CLOSEDELIM` on the left, and cases 3 and 3a read `LETTER`; the marker is in
|
|
618
|
+
none of those three classes (`modes.md` §3.3). So the ladder falls through to case 5 and emits
|
|
619
|
+
nothing. Measured on published 1.6.1,
|
|
620
|
+
`markdown`/`commonmark`, `en-GB`: `` The `xs`' printer works. `` comes back **unchanged** — an
|
|
621
|
+
unmatched span-boundary plural possessive keeps its U+0027. So the cost of this behaviour is a
|
|
622
|
+
consumed *pairing*, and the visible symptom of that appears elsewhere (a stray U+0027 at the real
|
|
623
|
+
closing mark, or a middle paragraph re-nested from `‘ ’` to `“ ”`) — but declining the mark does
|
|
624
|
+
not buy the right glyph in exchange. It moves the straight mark rather than removing it. An
|
|
625
|
+
earlier revision of this paragraph claimed the glyph was "correct either way"; it is not, and the
|
|
626
|
+
measurement above is what replaced the claim.
|
|
627
|
+
|
|
628
|
+
Second, **separating the two readings was implemented and measured, and it is a trade rather than
|
|
629
|
+
a fix.** The narrowest local veto that can do it — decline a `NARROW` mark whose literal
|
|
630
|
+
neighbour is `MARKER` and whose attaching `LETTER` run is empty — breaks **6 of the 1366 fixture
|
|
631
|
+
cases** (7 tests in polytypo-js's runner, which counts each case's idempotency re-run separately;
|
|
632
|
+
the denominator to reproduce is the suite's case count in [CONFORMANCE.md](../CONFORMANCE.md),
|
|
633
|
+
never a runtime's test total). Five are `tr` cases that are correct today:
|
|
634
|
+
`tr-html-span-boundary-suffix-declined`,
|
|
618
635
|
`tr-markdown-commonmark-span-boundary-suffix-declined`,
|
|
619
636
|
`tr-html-span-boundary-quotation-outside-the-span`,
|
|
620
637
|
`tr-html-span-boundary-non-ascii-initial-fragment` and `tr-html-span-boundary-ordinal-fragment`.
|
|
621
|
-
|
|
622
|
-
|
|
638
|
+
|
|
639
|
+
The sixth is this section's own fixture, `en-gb-markdown-commonmark-span-boundary-plural-possessive-not-closed`,
|
|
640
|
+
and it is the one worth reading: the veto does exactly what it is aimed at and still comes out
|
|
641
|
+
wrong. `He says 'avoid `` `xs`' `` printer.' Done.` typesets today as
|
|
642
|
+
`He says ‘avoid `` `xs`’ `` printer.' Done.` — pair closed two words early, author's own mark left
|
|
643
|
+
straight. Under the veto it becomes `He says ‘avoid `` `xs`' `` printer.’ Done.` — the pair now
|
|
644
|
+
closes at the author's mark, which is right, and the typewriter apostrophe has moved to the
|
|
645
|
+
possessive, which is not, for the reason the first measurement gives. That is this section's own
|
|
646
|
+
claim — no test over these neighbours can separate a plural possessive from a closing mark after a
|
|
647
|
+
span — turned from an argument into a number, and into a second output nobody would fixture.
|
|
623
648
|
|
|
624
649
|
**Operator decision (2026-09-24): where no exact answer exists, choose one behaviour and pin it
|
|
625
650
|
rather than leave the rule undefined.** Five runtimes agreeing byte-for-byte is the product; an
|
|
@@ -1574,3 +1599,27 @@ released fixture `en-us-markdown-commonmark-boundary-nested-quotes` and the `NAR
|
|
|
1574
1599
|
`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
1600
|
whole content is one listed fragment), and the one shape no veto over these neighbours can
|
|
1576
1601
|
reach — the plural possessive, which is byte-identical to a closing mark after a span.
|
|
1602
|
+
|
|
1603
|
+
1.6.2 corrects §3.2's own measurements of the decision above; no behaviour, fixture or locale
|
|
1604
|
+
field changes. Two errors, both introduced with the decision record on 2026-09-24 and both
|
|
1605
|
+
overstating how cheap the decided behaviour is. The first claimed the glyph at the possessive's
|
|
1606
|
+
position was "correct either way" — it is not: `apostrophe` does not reach *this* mark, the plural
|
|
1607
|
+
shape, for the reason the 1.6.3 entry below states, so declining the pairing leaves U+0027 there.
|
|
1608
|
+
Measured on the published 1.6.1 package. The second counted **7 of 2801 conformance cases** where 2801 is the test
|
|
1609
|
+
count of polytypo-js's conformance runner, a figure no other runtime can reproduce; the cost is
|
|
1610
|
+
**6 of the 1366 fixture cases**, and the sixth — this section's own `en-GB` fixture — is now described
|
|
1611
|
+
rather than left in the count, because the veto moves the pair to the author's mark correctly and
|
|
1612
|
+
moves the typewriter apostrophe to the possessive at the same time. A conformance count in this
|
|
1613
|
+
document is a count of fixture cases, never of one runner's tests.
|
|
1614
|
+
|
|
1615
|
+
1.6.3 corrects §3.2's account of *why* the first of those measurements comes out the way it does;
|
|
1616
|
+
again no behaviour, fixture or locale field changes. The 1.6.2 text said `apostrophe` cannot reach
|
|
1617
|
+
a mark whose left neighbour is the inline marker and attributed that to the marker's exclusion
|
|
1618
|
+
from [apostrophe.md](apostrophe.md) §3.1's `CLOSEDELIM`. Both halves were wrong, and the second
|
|
1619
|
+
contradicted `apostrophe.md` §3.3 case 2a's own note in the same vendored tree: the marker is in
|
|
1620
|
+
that rule's `OPENISH`, so `` `x`'s `` does reach case 4 and is curled. What the ladder cannot
|
|
1621
|
+
reach is the *plural* shape, because case 4 — the only case accepting the marker on the left —
|
|
1622
|
+
requires `ALNUM` on the right, and cases 2, 2a, 3 and 3a all read a class the marker is not in.
|
|
1623
|
+
`CLOSEDELIM` is irrelevant to it either way, since case 2a reads `ALNUM` on the right as well. The
|
|
1624
|
+
same entry also called 2801 a vitest total; it is one runner's conformance test count, and the
|
|
1625
|
+
runtime's own total is 4440.
|
data/lib/polytypo/version.rb
CHANGED