polytypo 1.21.0 → 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.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/lib/polytypo/data/VERSION +1 -1
  3. data/lib/polytypo/data/fixtures/bg.json +12 -4
  4. data/lib/polytypo/data/fixtures/cs.json +9 -1
  5. data/lib/polytypo/data/fixtures/de-CH.json +12 -4
  6. data/lib/polytypo/data/fixtures/de-DE.json +113 -13
  7. data/lib/polytypo/data/fixtures/el.json +28 -4
  8. data/lib/polytypo/data/fixtures/en-GB.json +23 -7
  9. data/lib/polytypo/data/fixtures/en-US.json +586 -162
  10. data/lib/polytypo/data/fixtures/es.json +1 -1
  11. data/lib/polytypo/data/fixtures/fi.json +10 -2
  12. data/lib/polytypo/data/fixtures/fr-CA.json +9 -1
  13. data/lib/polytypo/data/fixtures/fr.json +46 -13
  14. data/lib/polytypo/data/fixtures/hr.json +9 -1
  15. data/lib/polytypo/data/fixtures/hu.json +28 -4
  16. data/lib/polytypo/data/fixtures/it.json +1 -1
  17. data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
  18. data/lib/polytypo/data/fixtures/lt.json +9 -1
  19. data/lib/polytypo/data/fixtures/nl.json +17 -1
  20. data/lib/polytypo/data/fixtures/pl.json +17 -1
  21. data/lib/polytypo/data/fixtures/pt-BR.json +9 -1
  22. data/lib/polytypo/data/fixtures/pt-PT.json +9 -1
  23. data/lib/polytypo/data/fixtures/ro.json +2 -2
  24. data/lib/polytypo/data/fixtures/ru.json +38 -6
  25. data/lib/polytypo/data/fixtures/sk.json +9 -1
  26. data/lib/polytypo/data/fixtures/sl.json +9 -1
  27. data/lib/polytypo/data/fixtures/sr.json +12 -4
  28. data/lib/polytypo/data/fixtures/sv.json +12 -4
  29. data/lib/polytypo/data/fixtures/tr.json +9 -1
  30. data/lib/polytypo/data/fixtures/uk.json +1 -1
  31. data/lib/polytypo/data/locales/bg.json +9 -1
  32. data/lib/polytypo/data/locales/cs.json +2 -0
  33. data/lib/polytypo/data/locales/de-CH.json +9 -1
  34. data/lib/polytypo/data/locales/de-DE.json +9 -1
  35. data/lib/polytypo/data/locales/el.json +9 -1
  36. data/lib/polytypo/data/locales/en-GB.json +9 -4
  37. data/lib/polytypo/data/locales/en-US.json +11 -11
  38. data/lib/polytypo/data/locales/es.json +2 -0
  39. data/lib/polytypo/data/locales/fi.json +8 -3
  40. data/lib/polytypo/data/locales/fr-CA.json +9 -1
  41. data/lib/polytypo/data/locales/fr.json +3 -1
  42. data/lib/polytypo/data/locales/hr.json +3 -1
  43. data/lib/polytypo/data/locales/hu.json +9 -1
  44. data/lib/polytypo/data/locales/it.json +2 -0
  45. data/lib/polytypo/data/locales/lt.json +12 -5
  46. data/lib/polytypo/data/locales/nl.json +10 -2
  47. data/lib/polytypo/data/locales/pl.json +10 -2
  48. data/lib/polytypo/data/locales/pt-BR.json +4 -2
  49. data/lib/polytypo/data/locales/pt-PT.json +5 -3
  50. data/lib/polytypo/data/locales/registry.json +1 -1
  51. data/lib/polytypo/data/locales/ro.json +2 -0
  52. data/lib/polytypo/data/locales/ru.json +9 -17
  53. data/lib/polytypo/data/locales/sk.json +7 -5
  54. data/lib/polytypo/data/locales/sl.json +3 -1
  55. data/lib/polytypo/data/locales/sr.json +9 -2
  56. data/lib/polytypo/data/locales/sv.json +8 -6
  57. data/lib/polytypo/data/locales/tr.json +4 -2
  58. data/lib/polytypo/data/locales/uk.json +2 -0
  59. data/lib/polytypo/data/rules/modes.md +2 -2
  60. data/lib/polytypo/data/rules/nbsp.md +271 -74
  61. data/lib/polytypo/data/rules/order.json +1 -1
  62. data/lib/polytypo/data/rules/pipeline-idempotency.md +54 -7
  63. data/lib/polytypo/data/rules/quote-punctuation.md +3 -0
  64. data/lib/polytypo/data/rules/quotes.md +14 -5
  65. data/lib/polytypo/data/rules/ranges.md +7 -1
  66. data/lib/polytypo/data/rules/spaces.md +4 -2
  67. data/lib/polytypo/data/rules/symbols.md +2 -1
  68. data/lib/polytypo/data/schema/locale.schema.json +15 -1
  69. data/lib/polytypo/engine/rules/nbsp.rb +161 -11
  70. data/lib/polytypo/version.rb +1 -1
  71. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3efff1325f70a9a596b97fb50bd750cd8eda11c77889144d4065fc793f3ee9f0
4
- data.tar.gz: c1f54484e3e851c05697ad401ede83852862ffca60a09a9cc3c056f771d82588
3
+ metadata.gz: 628f79717701bdcc0e0ab7c2404871531419d1eeba728038bb3da3d368c60ea9
4
+ data.tar.gz: ee52fdea129fc159545c3b83a986839f982bfc9614fef90f9c14adc4da196dc4
5
5
  SHA512:
6
- metadata.gz: 2de242466a5d8574db226adeffb2fe3997d42e7bfd37f588491583024e60a5f56b25ff49fa82b648ddac92ffd7320aa00f158f55499561f684cab517a1660e74
7
- data.tar.gz: 1f2deb60d153872a60c2225ca52e6d71bb81d0e04539d6fa9aab694f49e2921645cae5018d8d3e86831a13a410c37f1f04ce91a012cedf4cf8c9bab13c57f9f5
6
+ metadata.gz: ed34c803c365eb7dee5e03c5c73d5325319e1a41553b0473d14186bcd782b27eec92ac7f2a70bd0d8320ad3d20a10b9dbff81057a26147fc582d492859584ba8
7
+ data.tar.gz: 7db118f6093c809a0e083c59189377ada3c2d2b060d9776ecf5bbb4b2bd3f0b6ef13614a0d06566890139be5a500a532fd12930cd14b18e7d6b0c80679ce216c
@@ -1 +1 @@
1
- 1.21.0
1
+ 1.22.0
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
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-inert",
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 not a unit here and nothing is bound."
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",
@@ -259,6 +259,14 @@
259
259
  "quote-punctuation": true
260
260
  },
261
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."
262
270
  }
263
271
  ]
264
272
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "cs",
4
4
  "cases": [
5
5
  {
@@ -167,6 +167,14 @@
167
167
  "quote-punctuation": true
168
168
  },
169
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."
170
178
  }
171
179
  ]
172
180
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
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-never-inserts",
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 20km",
386
- "note": "nbsp.md §7.2: N5 converts, never inserts."
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",
@@ -515,6 +515,14 @@
515
515
  "quote-punctuation": true
516
516
  },
517
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."
518
526
  }
519
527
  ]
520
528
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
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-never-inserts",
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 20km",
424
- "note": "nbsp.md §6 case 17 and §7.2: N5 converts, never inserts — even though Duden requires the space, adding one is a content change."
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": ["description"],
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": ["description"],
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": ["description"],
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": ["description"],
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": ["description"],
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": ["description"],
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": ["title", "summary"],
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": ["description"],
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."
@@ -857,6 +874,89 @@
857
874
  "quote-punctuation": true
858
875
  },
859
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."
860
960
  }
861
961
  ]
862
962
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
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-units-not-bound",
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": "nbsp.beforeUnits is empty for Greek, so the ordinary space before % is left as U+0020. No Greek normative source states the binding, and a byte-level scan of 13 Greek-language pages found 183 number-plus-unit occurrences with no space of any kind — Greek sets 50% tight, so there is nothing to promote."
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",
@@ -295,6 +295,30 @@
295
295
  "quote-punctuation": true
296
296
  },
297
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."
298
322
  }
299
323
  ]
300
324
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
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": "N5 never inserts."
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-spaced",
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 beforeUnits."
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": "Never inserts."
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 %’, but…",
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
  {
@@ -1945,6 +1945,22 @@
1945
1945
  "quote-punctuation": true
1946
1946
  },
1947
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)."
1948
1964
  }
1949
1965
  ]
1950
1966
  }