polytypo 1.20.1 → 1.22.1
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/VERSION +1 -1
- data/lib/polytypo/data/fixtures/bg.json +23 -4
- data/lib/polytypo/data/fixtures/cs.json +20 -1
- data/lib/polytypo/data/fixtures/de-CH.json +23 -4
- data/lib/polytypo/data/fixtures/de-DE.json +124 -13
- data/lib/polytypo/data/fixtures/el.json +39 -4
- data/lib/polytypo/data/fixtures/en-GB.json +34 -7
- data/lib/polytypo/data/fixtures/en-US.json +988 -162
- data/lib/polytypo/data/fixtures/es.json +12 -1
- data/lib/polytypo/data/fixtures/fi.json +21 -2
- data/lib/polytypo/data/fixtures/fr-CA.json +20 -1
- data/lib/polytypo/data/fixtures/fr.json +57 -13
- data/lib/polytypo/data/fixtures/hr.json +20 -1
- data/lib/polytypo/data/fixtures/hu.json +39 -4
- data/lib/polytypo/data/fixtures/it.json +12 -1
- data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
- data/lib/polytypo/data/fixtures/lt.json +20 -1
- data/lib/polytypo/data/fixtures/nl.json +28 -1
- data/lib/polytypo/data/fixtures/pl.json +28 -1
- data/lib/polytypo/data/fixtures/pt-BR.json +20 -1
- data/lib/polytypo/data/fixtures/pt-PT.json +20 -1
- data/lib/polytypo/data/fixtures/ro.json +13 -2
- data/lib/polytypo/data/fixtures/ru.json +49 -6
- data/lib/polytypo/data/fixtures/sk.json +20 -1
- data/lib/polytypo/data/fixtures/sl.json +20 -1
- data/lib/polytypo/data/fixtures/sr.json +23 -4
- data/lib/polytypo/data/fixtures/sv.json +23 -4
- data/lib/polytypo/data/fixtures/tr.json +20 -1
- data/lib/polytypo/data/fixtures/uk.json +12 -1
- data/lib/polytypo/data/locales/bg.json +10 -1
- data/lib/polytypo/data/locales/cs.json +3 -0
- data/lib/polytypo/data/locales/de-CH.json +15 -1
- data/lib/polytypo/data/locales/de-DE.json +16 -1
- data/lib/polytypo/data/locales/el.json +10 -1
- data/lib/polytypo/data/locales/en-GB.json +16 -4
- data/lib/polytypo/data/locales/en-US.json +18 -11
- data/lib/polytypo/data/locales/es.json +3 -0
- data/lib/polytypo/data/locales/fi.json +9 -3
- data/lib/polytypo/data/locales/fr-CA.json +10 -1
- data/lib/polytypo/data/locales/fr.json +4 -1
- data/lib/polytypo/data/locales/hr.json +4 -1
- data/lib/polytypo/data/locales/hu.json +10 -1
- data/lib/polytypo/data/locales/it.json +3 -0
- data/lib/polytypo/data/locales/lt.json +13 -5
- data/lib/polytypo/data/locales/nl.json +11 -2
- data/lib/polytypo/data/locales/pl.json +11 -2
- data/lib/polytypo/data/locales/pt-BR.json +5 -2
- data/lib/polytypo/data/locales/pt-PT.json +6 -3
- data/lib/polytypo/data/locales/registry.json +1 -1
- data/lib/polytypo/data/locales/ro.json +3 -0
- data/lib/polytypo/data/locales/ru.json +10 -17
- data/lib/polytypo/data/locales/sk.json +8 -5
- data/lib/polytypo/data/locales/sl.json +4 -1
- data/lib/polytypo/data/locales/sr.json +10 -2
- data/lib/polytypo/data/locales/sv.json +9 -6
- data/lib/polytypo/data/locales/tr.json +5 -2
- data/lib/polytypo/data/locales/uk.json +3 -0
- data/lib/polytypo/data/rules/modes.md +2 -2
- data/lib/polytypo/data/rules/nbsp.md +271 -74
- data/lib/polytypo/data/rules/order.json +9 -1
- data/lib/polytypo/data/rules/pipeline-idempotency.md +76 -9
- data/lib/polytypo/data/rules/quote-punctuation.md +337 -0
- data/lib/polytypo/data/rules/quotes.md +23 -5
- data/lib/polytypo/data/rules/ranges.md +7 -1
- data/lib/polytypo/data/rules/spaces.md +4 -2
- data/lib/polytypo/data/rules/symbols.md +2 -1
- data/lib/polytypo/data/schema/fixtures.schema.json +1 -0
- data/lib/polytypo/data/schema/locale.schema.json +27 -2
- data/lib/polytypo/engine/locale.rb +22 -1
- data/lib/polytypo/engine/pipeline.rb +1 -1
- data/lib/polytypo/engine/rules/nbsp.rb +161 -11
- data/lib/polytypo/engine/rules/quote_punctuation.rb +79 -0
- data/lib/polytypo/engine/rules.rb +1 -0
- data/lib/polytypo/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 628f79717701bdcc0e0ab7c2404871531419d1eeba728038bb3da3d368c60ea9
|
|
4
|
+
data.tar.gz: ee52fdea129fc159545c3b83a986839f982bfc9614fef90f9c14adc4da196dc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed34c803c365eb7dee5e03c5c73d5325319e1a41553b0473d14186bcd782b27eec92ac7f2a70bd0d8320ad3d20a10b9dbff81057a26147fc582d492859584ba8
|
|
7
|
+
data.tar.gz: 7db118f6093c809a0e083c59189377ada3c2d2b060d9776ecf5bbb4b2bd3f0b6ef13614a0d06566890139be5a500a532fd12930cd14b18e7d6b0c80679ce216c
|
data/lib/polytypo/data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.22.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "bg",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -186,12 +186,12 @@
|
|
|
186
186
|
"note": "ИБЕ №1601: «2020 г.» with a space."
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
"id": "bg-nbsp-percent-
|
|
189
|
+
"id": "bg-nbsp-percent-closed",
|
|
190
190
|
"rule": "nbsp",
|
|
191
191
|
"mode": "text",
|
|
192
192
|
"in": "5% и 5 %",
|
|
193
|
-
"out": "5% и 5
|
|
194
|
-
"note": "ИБЕ №626 writes 5% without a space, so % is
|
|
193
|
+
"out": "5% и 5%",
|
|
194
|
+
"note": "ИБЕ №626 writes 5% without a space, so % is in closedUnits: the typed space is deleted (nbsp.md §3.7)."
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
"id": "bg-nbsp-single-letter-unit-inert",
|
|
@@ -248,6 +248,25 @@
|
|
|
248
248
|
"in": "Това е McDonald's",
|
|
249
249
|
"out": "Това е McDonald’s",
|
|
250
250
|
"note": "apostrophe rule, locale-neutral."
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "bg-quote-punctuation-none",
|
|
254
|
+
"rule": "quote-punctuation",
|
|
255
|
+
"mode": "text",
|
|
256
|
+
"in": "alpha „beta“, gamma",
|
|
257
|
+
"out": "alpha „beta“, gamma",
|
|
258
|
+
"rules": {
|
|
259
|
+
"quote-punctuation": true
|
|
260
|
+
},
|
|
261
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for bg, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "bg-nbsp-closed-nbsp-deleted",
|
|
265
|
+
"rule": "nbsp",
|
|
266
|
+
"mode": "text",
|
|
267
|
+
"in": "Value 5 % here",
|
|
268
|
+
"out": "Value 5% here",
|
|
269
|
+
"note": "spec 1.22.0, nbsp.md §3.7: a typed U+00A0 before a closedUnits entry is deleted as well as a U+0020."
|
|
251
270
|
}
|
|
252
271
|
]
|
|
253
272
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "cs",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -156,6 +156,25 @@
|
|
|
156
156
|
"in": "Šel do McDonald's a zpět",
|
|
157
157
|
"out": "Šel do McDonald’s a zpět",
|
|
158
158
|
"note": "Pravidlo apostrophe nečte data locale: U+0027 mezi písmeny se stane U+2019. V téže větě je vidět N3, které váže spojku «a» k následujícímu slovu — dvě nezávislá pravidla na jednom řádku."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "cs-quote-punctuation-none",
|
|
162
|
+
"rule": "quote-punctuation",
|
|
163
|
+
"mode": "text",
|
|
164
|
+
"in": "alpha „beta“, gamma",
|
|
165
|
+
"out": "alpha „beta“, gamma",
|
|
166
|
+
"rules": {
|
|
167
|
+
"quote-punctuation": true
|
|
168
|
+
},
|
|
169
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for cs, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "cs-nbsp-percent-keeps-authors-choice",
|
|
173
|
+
"rule": "nbsp",
|
|
174
|
+
"mode": "text",
|
|
175
|
+
"in": "Je to 20% nebo 14 % lidí",
|
|
176
|
+
"out": "Je to 20% nebo 14 % lidí",
|
|
177
|
+
"note": "cs has every unit in beforeUnits: `20%ní` and `14 %` are both correct, so nothing is inserted or deleted and the typed space is bound."
|
|
159
178
|
}
|
|
160
179
|
]
|
|
161
180
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "de-CH",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -378,12 +378,12 @@
|
|
|
378
378
|
"note": "N5 twice — Rz. 251, 549–550 (Zahl und Einheit) and Rz. 554 (vor % und ‰)."
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
|
-
"id": "de-ch-nbsp-unit-
|
|
381
|
+
"id": "de-ch-nbsp-unit-inserted",
|
|
382
382
|
"rule": "nbsp",
|
|
383
383
|
"mode": "text",
|
|
384
384
|
"in": "Es sind 20km",
|
|
385
|
-
"out": "Es sind
|
|
386
|
-
"note": "nbsp.md §7
|
|
385
|
+
"out": "Es sind 20 km",
|
|
386
|
+
"note": "spec 1.22.0, nbsp.md §3.7: `km` is in spacedUnits, so the missing space is inserted as U+00A0. Before 1.22.0 N5 only converted."
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
"id": "de-ch-nbsp-before-number",
|
|
@@ -504,6 +504,25 @@
|
|
|
504
504
|
"in": "die Zeitung l'\"Express\"",
|
|
505
505
|
"out": "die Zeitung l’«Express»",
|
|
506
506
|
"note": "apostrophe.md §3.3 case 3a (spec 1.2.0): `quotes` gives de-CH's « », and the elision before « converts."
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"id": "de-ch-quote-punctuation-none",
|
|
510
|
+
"rule": "quote-punctuation",
|
|
511
|
+
"mode": "text",
|
|
512
|
+
"in": "alpha «beta», gamma",
|
|
513
|
+
"out": "alpha «beta», gamma",
|
|
514
|
+
"rules": {
|
|
515
|
+
"quote-punctuation": true
|
|
516
|
+
},
|
|
517
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for de-CH, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"id": "de-ch-nbsp-spaced-unit-inserted",
|
|
521
|
+
"rule": "nbsp",
|
|
522
|
+
"mode": "text",
|
|
523
|
+
"in": "Value 20km here",
|
|
524
|
+
"out": "Value 20 km here",
|
|
525
|
+
"note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
|
|
507
526
|
}
|
|
508
527
|
]
|
|
509
528
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "de-DE",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -416,12 +416,12 @@
|
|
|
416
416
|
"note": "nbsp.md §6 case 16: N5 twice."
|
|
417
417
|
},
|
|
418
418
|
{
|
|
419
|
-
"id": "de-de-nbsp-unit-
|
|
419
|
+
"id": "de-de-nbsp-unit-inserted",
|
|
420
420
|
"rule": "nbsp",
|
|
421
421
|
"mode": "text",
|
|
422
422
|
"in": "Es sind 20km",
|
|
423
|
-
"out": "Es sind
|
|
424
|
-
"note": "nbsp.md §
|
|
423
|
+
"out": "Es sind 20 km",
|
|
424
|
+
"note": "spec 1.22.0, nbsp.md §3.7: `km` is in spacedUnits, so the missing space is inserted as U+00A0. Before 1.22.0 N5 only converted."
|
|
425
425
|
},
|
|
426
426
|
{
|
|
427
427
|
"id": "de-de-nbsp-unit-letter-guard",
|
|
@@ -630,7 +630,7 @@
|
|
|
630
630
|
"rules": {
|
|
631
631
|
"ranges": true
|
|
632
632
|
},
|
|
633
|
-
"note": "dashes.md §3.2 step 8 (spec 1.3.0): T1's outward walk from the digit run steps over one CLOSED-SYMBOL. The cluster guard cannot catch this one — a cluster ends at the U+0020 — so before the amendment the `--` became a spaced en dash and the range converted on the next pass. To be precise about \"before the amendment\": the drift is a property of the INTERMEDIATE state — ranges.md §3.2a's widened candidacy without T1's transparency — which never shipped. Under spec 1.2.0 this input was stable, because the token was not a range candidate at all."
|
|
633
|
+
"note": "dashes.md §3.2 step 8 (spec 1.3.0): T1's outward walk from the digit run steps over one CLOSED-SYMBOL. The cluster guard cannot catch this one — a cluster ends at the U+0020 — so before the amendment the `--` became a spaced en dash and the range converted on the next pass. To be precise about \"before the amendment\": the drift is a property of the INTERMEDIATE state — ranges.md §3.2a's widened candidacy without T1's transparency — which never shipped. Under spec 1.2.0 this input was stable, because the token was not a range candidate at all. Spec 1.22.0: `%` is in de-DE's spacedUnits, and N5 declines to insert beside a dash (nbsp.md §3.7 step 5.3), so the output is unchanged."
|
|
634
634
|
},
|
|
635
635
|
{
|
|
636
636
|
"id": "de-de-dashes-t1-closed-up-symbol-left",
|
|
@@ -677,7 +677,9 @@
|
|
|
677
677
|
"id": "de-de-yaml-colon-split-declines-growth",
|
|
678
678
|
"rule": "dashes",
|
|
679
679
|
"mode": "yaml",
|
|
680
|
-
"keys": [
|
|
680
|
+
"keys": [
|
|
681
|
+
"description"
|
|
682
|
+
],
|
|
681
683
|
"in": "description: a:--b\n",
|
|
682
684
|
"out": "description: a:--b\n",
|
|
683
685
|
"note": "modes.md §3.8.6: `:` is an opaque unit inside a plain scalar, so the dash token sits at a span extremity and the `-spaced` replacement (2 → 3) is discarded by the edge-growth rule of §3.4. Without the split this becomes `a: – b`, which no longer parses as one scalar."
|
|
@@ -686,7 +688,9 @@
|
|
|
686
688
|
"id": "de-de-yaml-hash-split-declines-growth",
|
|
687
689
|
"rule": "dashes",
|
|
688
690
|
"mode": "yaml",
|
|
689
|
-
"keys": [
|
|
691
|
+
"keys": [
|
|
692
|
+
"description"
|
|
693
|
+
],
|
|
690
694
|
"in": "description: a--#b\n",
|
|
691
695
|
"out": "description: a--#b\n",
|
|
692
696
|
"note": "modes.md §3.8.6: `#` is an opaque unit inside a plain scalar for the same reason. Without the split this becomes `a – #b`, and everything from the hash becomes a comment."
|
|
@@ -695,7 +699,9 @@
|
|
|
695
699
|
"id": "de-de-yaml-block-prose",
|
|
696
700
|
"rule": "quotes",
|
|
697
701
|
"mode": "yaml",
|
|
698
|
-
"keys": [
|
|
702
|
+
"keys": [
|
|
703
|
+
"description"
|
|
704
|
+
],
|
|
699
705
|
"in": "description: |\n Er sagte \"hallo\" und ging\n",
|
|
700
706
|
"out": "description: |\n Er sagte „hallo“ und ging\n",
|
|
701
707
|
"note": "modes.md §8 item 4: the same construct in a locale whose quote glyphs are structurally different from en-US, so a fixture is not the same English output with a different locale field."
|
|
@@ -704,7 +710,9 @@
|
|
|
704
710
|
"id": "de-de-yaml-unlisted-key-untouched",
|
|
705
711
|
"rule": "dashes",
|
|
706
712
|
"mode": "yaml",
|
|
707
|
-
"keys": [
|
|
713
|
+
"keys": [
|
|
714
|
+
"description"
|
|
715
|
+
],
|
|
708
716
|
"in": "run: git diff -- a--b\n",
|
|
709
717
|
"out": "run: git diff -- a--b\n",
|
|
710
718
|
"note": "modes.md §3.8.2: the measured case. A keyless draft rewrote shell inside `run:`; `keys` is what makes it unreachable."
|
|
@@ -738,7 +746,9 @@
|
|
|
738
746
|
"id": "de-de-yaml-three-dash-against-colon",
|
|
739
747
|
"rule": "dashes",
|
|
740
748
|
"mode": "yaml",
|
|
741
|
-
"keys": [
|
|
749
|
+
"keys": [
|
|
750
|
+
"description"
|
|
751
|
+
],
|
|
742
752
|
"in": "description: a:---b\n",
|
|
743
753
|
"out": "description: a:---b\n",
|
|
744
754
|
"note": "modes.md §3.8.6 with §3.4's character clause: without it this became `description: a: – b`, which no longer parses — `: ` is a mapping indicator. The two-dash companion de-de-yaml-colon-split-declines-growth is caught by the length clause; only this one needs the character clause."
|
|
@@ -747,7 +757,9 @@
|
|
|
747
757
|
"id": "de-de-yaml-three-dash-against-hash",
|
|
748
758
|
"rule": "dashes",
|
|
749
759
|
"mode": "yaml",
|
|
750
|
-
"keys": [
|
|
760
|
+
"keys": [
|
|
761
|
+
"description"
|
|
762
|
+
],
|
|
751
763
|
"in": "description: a---#b\n",
|
|
752
764
|
"out": "description: a---#b\n",
|
|
753
765
|
"note": "modes.md §3.8.6 with §3.4's character clause: without it this became `description: a – #b`, and everything from the hash became a comment — the value silently truncated to `a –`."
|
|
@@ -757,7 +769,10 @@
|
|
|
757
769
|
"rule": "quotes",
|
|
758
770
|
"mode": "markdown",
|
|
759
771
|
"dialect": "commonmark",
|
|
760
|
-
"frontmatterKeys": [
|
|
772
|
+
"frontmatterKeys": [
|
|
773
|
+
"title",
|
|
774
|
+
"summary"
|
|
775
|
+
],
|
|
761
776
|
"in": "---\ntitle: Er sagte \"hallo\" laut\nsummary: Noch \"eins\" hier\nslug: \"er-sagte-hallo\"\n---\n\nIm Text \"so\" hier.\n",
|
|
762
777
|
"out": "---\ntitle: Er sagte „hallo“ laut\nsummary: Noch „eins“ hier\nslug: \"er-sagte-hallo\"\n---\n\nIm Text „so“ hier.\n",
|
|
763
778
|
"note": "modes.md §3.7.4: two listed plain scalars in a locale whose quote glyphs differ from English, with an unlisted slug between the block and the body. Each listed scalar is its own span and the marks pair inside it, so the German pair appears three times and the slug keeps its straight quotes."
|
|
@@ -766,7 +781,9 @@
|
|
|
766
781
|
"id": "de-de-yaml-single-quoted-escape-growth-declined",
|
|
767
782
|
"rule": "dashes",
|
|
768
783
|
"mode": "yaml",
|
|
769
|
-
"keys": [
|
|
784
|
+
"keys": [
|
|
785
|
+
"description"
|
|
786
|
+
],
|
|
770
787
|
"in": "description: 'a''--''b'\n",
|
|
771
788
|
"out": "description: 'a''--''b'\n",
|
|
772
789
|
"note": "modes.md §3.8.6 and §3.4: de-DE is a `-spaced` locale, so the dash would grow against a unit and the edge-growth rule discards it, as in fr. A second locale so that an implementation that does not split cannot pass on one cell alone."
|
|
@@ -846,6 +863,100 @@
|
|
|
846
863
|
}
|
|
847
864
|
],
|
|
848
865
|
"note": "modes.md §3.9.3: the same pairing in a locale whose glyphs differ in shape."
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"id": "de-de-quote-punctuation-none",
|
|
869
|
+
"rule": "quote-punctuation",
|
|
870
|
+
"mode": "text",
|
|
871
|
+
"in": "alpha „beta“, gamma",
|
|
872
|
+
"out": "alpha „beta“, gamma",
|
|
873
|
+
"rules": {
|
|
874
|
+
"quote-punctuation": true
|
|
875
|
+
},
|
|
876
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for de-DE, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"id": "de-de-nbsp-spaced-unit-inserted",
|
|
880
|
+
"rule": "nbsp",
|
|
881
|
+
"mode": "text",
|
|
882
|
+
"in": "Value 50% here",
|
|
883
|
+
"out": "Value 50 % here",
|
|
884
|
+
"note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"id": "de-de-nbsp-spaced-guard-hyphen-compound",
|
|
888
|
+
"rule": "nbsp",
|
|
889
|
+
"mode": "text",
|
|
890
|
+
"in": "Die 15cm-Norm und die 5-km-Strecke",
|
|
891
|
+
"out": "Die 15cm-Norm und die 5-km-Strecke",
|
|
892
|
+
"note": "nbsp.md §3.7 step 5.2: a hyphen after the unit marks a compound; N5 inserts nothing."
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"id": "de-de-nbsp-spaced-guard-file-name",
|
|
896
|
+
"rule": "nbsp",
|
|
897
|
+
"mode": "text",
|
|
898
|
+
"in": "Datei foto-5kg.png und /5km und x_5kg",
|
|
899
|
+
"out": "Datei foto-5kg.png und /5km und x_5kg",
|
|
900
|
+
"note": "nbsp.md §3.7 step 5.1 and 5.2: a hyphen, slash or underscore before the number and a full stop plus a letter after the unit mark a name, not a measurement."
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"id": "de-de-nbsp-spaced-number-starts",
|
|
904
|
+
"rule": "nbsp",
|
|
905
|
+
"mode": "text",
|
|
906
|
+
"in": "(5km), 1.000km, 1,5kg, +5kg, −5kg und -5kg",
|
|
907
|
+
"out": "(5 km), 1.000 km, 1,5 kg, +5 kg, −5 kg und -5 kg",
|
|
908
|
+
"note": "nbsp.md §3.7 step 5.1: a bracket, a decimal or thousands separator and a sign may stand left of the number; U+002D counts as a sign only after a space or at the start."
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"id": "de-de-nbsp-spaced-letter-before-number",
|
|
912
|
+
"rule": "nbsp",
|
|
913
|
+
"mode": "text",
|
|
914
|
+
"in": "H2km und A4kg",
|
|
915
|
+
"out": "H2km und A4kg",
|
|
916
|
+
"note": "nbsp.md §3.7 step 3: a letter before the digit run is not a number."
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"id": "de-de-nbsp-spaced-sentence-end",
|
|
920
|
+
"rule": "nbsp",
|
|
921
|
+
"mode": "text",
|
|
922
|
+
"in": "Es sind 5km. Dann 5kg.",
|
|
923
|
+
"out": "Es sind 5 km. Dann 5 kg.",
|
|
924
|
+
"note": "The unit is followed by a full stop and then a space, so it is not a file name."
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"id": "de-de-nbsp-spaced-html-boundary",
|
|
928
|
+
"rule": "nbsp",
|
|
929
|
+
"mode": "html",
|
|
930
|
+
"in": "<p>Es sind 20<b>km</b> und 30km</p>",
|
|
931
|
+
"out": "<p>Es sind 20<b>km</b> und 30 km</p>",
|
|
932
|
+
"note": "A span boundary between the digits and the unit is not in the list of things allowed beside a number, so nothing is inserted there; the second is inside one text node and is inserted."
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"id": "de-de-nbsp-spaced-guard-range-dash",
|
|
936
|
+
"rule": "nbsp",
|
|
937
|
+
"mode": "text",
|
|
938
|
+
"in": "Von 15% - 20% mehr",
|
|
939
|
+
"out": "Von 15%–20% mehr",
|
|
940
|
+
"note": "nbsp.md §3.7 step 5.3: the same guard on the inserting side — `%` is in spacedUnits, but a space is not inserted beside a dash.",
|
|
941
|
+
"rules": {
|
|
942
|
+
"ranges": true
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"id": "de-de-nbsp-spaced-range-dash-km",
|
|
947
|
+
"rule": "nbsp",
|
|
948
|
+
"mode": "text",
|
|
949
|
+
"in": "Es sind 5-10km und 3 - 4km",
|
|
950
|
+
"out": "Es sind 5-10km und 3 - 4 km",
|
|
951
|
+
"note": "The guard applies to a unit that is a closed-up symbol only: `km` is not read by `ranges`, so a space is inserted beside a dash."
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"id": "de-de-nbsp-spaced-guard-range-dash-default",
|
|
955
|
+
"rule": "nbsp",
|
|
956
|
+
"mode": "text",
|
|
957
|
+
"in": "Von 5% - 10% mehr",
|
|
958
|
+
"out": "Von 5% - 10% mehr",
|
|
959
|
+
"note": "nbsp.md §3.7 step 5.3 on the default rule set: the guard applies whether or not `ranges` is on."
|
|
849
960
|
}
|
|
850
961
|
]
|
|
851
962
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "el",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -219,12 +219,12 @@
|
|
|
219
219
|
"note": "symbols.md reads no locale data. Greek adds no branch to it: the refusal to map U+037E to U+003B or U+0387 to U+00B7 is recorded in symbols.md §7.8 as a decided refusal, not implemented as a conversion."
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
|
-
"id": "el-nbsp-
|
|
222
|
+
"id": "el-nbsp-percent-closed",
|
|
223
223
|
"rule": "nbsp",
|
|
224
224
|
"mode": "text",
|
|
225
225
|
"in": "Η τιμή ανέβηκε 10,5 % φέτος",
|
|
226
|
-
"out": "Η τιμή ανέβηκε 10,5
|
|
227
|
-
"note": "
|
|
226
|
+
"out": "Η τιμή ανέβηκε 10,5% φέτος",
|
|
227
|
+
"note": "`%` is in closedUnits: the inter-institutional guide permits both forms, a byte-level scan of 13 Greek-language pages found 183 number-plus-unit occurrences with no space of any kind, and a locale offered both takes the closed one (nbsp.md §3.7)."
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
"id": "el-nbsp-no-french-spacing",
|
|
@@ -284,6 +284,41 @@
|
|
|
284
284
|
"in": "η εφημερίδα l'\"Humanité\"",
|
|
285
285
|
"out": "η εφημερίδα l’«Humanité»",
|
|
286
286
|
"note": "apostrophe.md §3.3 case 3a (spec 1.2.0): `quotes` gives el's « », and the elision before « converts."
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "el-quote-punctuation-none",
|
|
290
|
+
"rule": "quote-punctuation",
|
|
291
|
+
"mode": "text",
|
|
292
|
+
"in": "alpha «beta», gamma",
|
|
293
|
+
"out": "alpha «beta», gamma",
|
|
294
|
+
"rules": {
|
|
295
|
+
"quote-punctuation": true
|
|
296
|
+
},
|
|
297
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for el, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": "el-nbsp-closed-nbsp-deleted",
|
|
301
|
+
"rule": "nbsp",
|
|
302
|
+
"mode": "text",
|
|
303
|
+
"in": "Value 5 % here",
|
|
304
|
+
"out": "Value 5% here",
|
|
305
|
+
"note": "spec 1.22.0, nbsp.md §3.7: a typed U+00A0 before a closedUnits entry is deleted as well as a U+0020."
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"id": "el-nbsp-celsius-closed",
|
|
309
|
+
"rule": "nbsp",
|
|
310
|
+
"mode": "text",
|
|
311
|
+
"in": "Θερμοκρασία 20 °C σήμερα",
|
|
312
|
+
"out": "Θερμοκρασία 20°C σήμερα",
|
|
313
|
+
"note": "`°C` is in closedUnits: the guide permits both forms and the locale takes the closed one."
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "el-nbsp-closed-guard-sentence-dash",
|
|
317
|
+
"rule": "nbsp",
|
|
318
|
+
"mode": "text",
|
|
319
|
+
"in": "Το 5 % - αν υπάρχει - τέλος",
|
|
320
|
+
"out": "Το 5 % —αν υπάρχει— τέλος",
|
|
321
|
+
"note": "nbsp.md §3.7 step 5.3 also holds for a dash that is not a range: the space before `%` is left as typed."
|
|
287
322
|
}
|
|
288
323
|
]
|
|
289
324
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.22.0",
|
|
3
3
|
"locale": "en-GB",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -1169,7 +1169,7 @@
|
|
|
1169
1169
|
"mode": "text",
|
|
1170
1170
|
"in": "It is 20km to the coast",
|
|
1171
1171
|
"out": "It is 20km to the coast",
|
|
1172
|
-
"note": "
|
|
1172
|
+
"note": "`km` is in beforeUnits for en-GB: a typed space is bound, nothing is inserted or deleted."
|
|
1173
1173
|
},
|
|
1174
1174
|
{
|
|
1175
1175
|
"id": "en-gb-nbsp-unit-already-bound",
|
|
@@ -1180,12 +1180,12 @@
|
|
|
1180
1180
|
"note": "Already-correct branch."
|
|
1181
1181
|
},
|
|
1182
1182
|
{
|
|
1183
|
-
"id": "en-gb-nbsp-percent-
|
|
1183
|
+
"id": "en-gb-nbsp-percent-space-deleted",
|
|
1184
1184
|
"rule": "nbsp",
|
|
1185
1185
|
"mode": "text",
|
|
1186
1186
|
"in": "Prices rose 5 %",
|
|
1187
|
-
"out": "Prices rose 5
|
|
1188
|
-
"note": "`%` is in
|
|
1187
|
+
"out": "Prices rose 5%",
|
|
1188
|
+
"note": "`%` is in closedUnits: the Oxford Style Guide sets percentages closed up (spec 1.22.0), so the typed space is deleted."
|
|
1189
1189
|
},
|
|
1190
1190
|
{
|
|
1191
1191
|
"id": "en-gb-nbsp-percent-closed",
|
|
@@ -1193,7 +1193,7 @@
|
|
|
1193
1193
|
"mode": "text",
|
|
1194
1194
|
"in": "Prices rose 5%",
|
|
1195
1195
|
"out": "Prices rose 5%",
|
|
1196
|
-
"note": "
|
|
1196
|
+
"note": "Already closed up: `%` is in closedUnits and nothing is inserted."
|
|
1197
1197
|
},
|
|
1198
1198
|
{
|
|
1199
1199
|
"id": "en-gb-nbsp-formula-not-a-unit",
|
|
@@ -1243,7 +1243,7 @@
|
|
|
1243
1243
|
"rule": "nbsp",
|
|
1244
1244
|
"mode": "text",
|
|
1245
1245
|
"in": "The report -- published 2026-08-15 -- says \"growth was 5 %\", but...",
|
|
1246
|
-
"out": "The report – published 2026-08-15 – says ‘growth was 5
|
|
1246
|
+
"out": "The report – published 2026-08-15 – says ‘growth was 5%’, but…",
|
|
1247
1247
|
"note": "Second prose case, same input as en-US-nbsp-prose-report."
|
|
1248
1248
|
},
|
|
1249
1249
|
{
|
|
@@ -1934,6 +1934,33 @@
|
|
|
1934
1934
|
"in": "- [ ] item and a , b.\n",
|
|
1935
1935
|
"out": "- [ ] item and a, b.\n",
|
|
1936
1936
|
"note": "modes.md §3.4 bracket-shape rule: collapsing two spaces between the brackets to one would make an unchecked task-list marker out of literal text; that edit is discarded."
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"id": "en-gb-quote-punctuation-none",
|
|
1940
|
+
"rule": "quote-punctuation",
|
|
1941
|
+
"mode": "text",
|
|
1942
|
+
"in": "She said \"hello\", then left.",
|
|
1943
|
+
"out": "She said ‘hello’, then left.",
|
|
1944
|
+
"rules": {
|
|
1945
|
+
"quote-punctuation": true
|
|
1946
|
+
},
|
|
1947
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for en-GB (Oxford places the mark by whether it belongs to the quotation, which a scan cannot decide), so enabling the rule changes nothing; `quotes` alone converts the glyphs and the comma stays outside."
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
"id": "en-gb-nbsp-closed-nbsp-deleted",
|
|
1951
|
+
"rule": "nbsp",
|
|
1952
|
+
"mode": "text",
|
|
1953
|
+
"in": "Value 5 % here",
|
|
1954
|
+
"out": "Value 5% here",
|
|
1955
|
+
"note": "spec 1.22.0, nbsp.md §3.7: a typed U+00A0 before a closedUnits entry is deleted as well as a U+0020."
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
"id": "en-gb-nbsp-celsius-closed",
|
|
1959
|
+
"rule": "nbsp",
|
|
1960
|
+
"mode": "text",
|
|
1961
|
+
"in": "Preheat to 180 °C and 350 °F",
|
|
1962
|
+
"out": "Preheat to 180°C and 350°F",
|
|
1963
|
+
"note": "Oxford sets `°C` and `°F` closed up (spec 1.22.0)."
|
|
1937
1964
|
}
|
|
1938
1965
|
]
|
|
1939
1966
|
}
|