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
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "es",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "fi",
4
4
  "cases": [
5
5
  {
@@ -1185,7 +1185,7 @@
1185
1185
  "mode": "text",
1186
1186
  "in": "Matkaa on 20km rannikolle",
1187
1187
  "out": "Matkaa on 20km rannikolle",
1188
- "note": "N5 converts, never inserts."
1188
+ "note": "`km` is in beforeUnits for fi (only BIPM supports it): a typed space is bound, nothing is inserted."
1189
1189
  },
1190
1190
  {
1191
1191
  "id": "fi-nbsp-unit-already-bound",
@@ -1328,6 +1328,14 @@
1328
1328
  "quote-punctuation": true
1329
1329
  },
1330
1330
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for fi, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
1331
+ },
1332
+ {
1333
+ "id": "fi-nbsp-spaced-unit-inserted",
1334
+ "rule": "nbsp",
1335
+ "mode": "text",
1336
+ "in": "Value 50% here",
1337
+ "out": "Value 50 % here",
1338
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
1331
1339
  }
1332
1340
  ]
1333
1341
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "fr-CA",
4
4
  "cases": [
5
5
  {
@@ -331,6 +331,14 @@
331
331
  "quote-punctuation": true
332
332
  },
333
333
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for fr-CA, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
334
+ },
335
+ {
336
+ "id": "fr-ca-nbsp-spaced-unit-inserted",
337
+ "rule": "nbsp",
338
+ "mode": "text",
339
+ "in": "Value 20°C here",
340
+ "out": "Value 20 °C here",
341
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
334
342
  }
335
343
  ]
336
344
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "fr",
4
4
  "cases": [
5
5
  {
@@ -412,7 +412,7 @@
412
412
  "mode": "text",
413
413
  "in": "20km à pied",
414
414
  "out": "20km à pied",
415
- "note": "nbsp.md §7.2: N5 converts, never inserts — adding a space is a content change."
415
+ "note": "`km` is in beforeUnits for fr (André's class statement is the only support), which converts a typed space and never inserts one."
416
416
  },
417
417
  {
418
418
  "id": "fr-nbsp-before-number",
@@ -752,7 +752,9 @@
752
752
  "rule": "nbsp",
753
753
  "mode": "markdown",
754
754
  "dialect": "commonmark",
755
- "frontmatterKeys": ["title"],
755
+ "frontmatterKeys": [
756
+ "title"
757
+ ],
756
758
  "in": "---\ntitle: \"Chapitre 1: le début\"\ndate: \"2026-09-25\"\n---\n\nVoici: le corps.\n",
757
759
  "out": "---\ntitle: \"Chapitre 1 : le début\"\ndate: \"2026-09-25\"\n---\n\nVoici : le corps.\n",
758
760
  "note": "modes.md §3.7.4 with the locale that made §3.7.3 skip the block in the first place: inside a listed quoted scalar a colon is content, so fr inserts its narrow no-break space, while the unlisted date field and the key itself keep every byte. That contrast is the whole argument for a caller-named list."
@@ -861,7 +863,9 @@
861
863
  "id": "fr-yaml-narrow-space-in-quoted",
862
864
  "rule": "nbsp",
863
865
  "mode": "yaml",
864
- "keys": ["description"],
866
+ "keys": [
867
+ "description"
868
+ ],
865
869
  "in": "description: \"Une note !\"\n",
866
870
  "out": "description: \"Une note !\"\n",
867
871
  "note": "modes.md §3.8.6: a quoted scalar's content is one span, and French spacing applies inside it exactly as in text mode."
@@ -870,7 +874,9 @@
870
874
  "id": "fr-yaml-no-space-across-colon-split",
871
875
  "rule": "nbsp",
872
876
  "mode": "yaml",
873
- "keys": ["description"],
877
+ "keys": [
878
+ "description"
879
+ ],
874
880
  "in": "description: prose:more prose\n",
875
881
  "out": "description: prose:more prose\n",
876
882
  "note": "modes.md §3.8.6: the `:` is outside every span, so the insertion `nbsp` would make before it lands on a span edge and is discarded by §3.4. This is the accepted cost of the split, and it is what keeps the scalar parseable."
@@ -879,7 +885,9 @@
879
885
  "id": "fr-yaml-guillemets-across-block-lines",
880
886
  "rule": "quotes",
881
887
  "mode": "yaml",
882
- "keys": ["description"],
888
+ "keys": [
889
+ "description"
890
+ ],
883
891
  "in": "description: |\n Il a dit \"bonjour\n monsieur\" et il est parti\n",
884
892
  "out": "description: |\n Il a dit « bonjour\n monsieur » et il est parti\n",
885
893
  "note": "modes.md §3.2 model C in a locale whose quotation output is guillemets plus U+00A0 rather than curly quotes — structurally different from the en-US case of the same shape."
@@ -945,7 +953,9 @@
945
953
  "id": "fr-yaml-plain-elision",
946
954
  "rule": "apostrophe",
947
955
  "mode": "yaml",
948
- "keys": ["description"],
956
+ "keys": [
957
+ "description"
958
+ ],
949
959
  "in": "description: l'idee et l'autre\n",
950
960
  "out": "description: l’idee et l’autre\n",
951
961
  "note": "modes.md §3.8.6 in a locale where the apostrophe is elision rather than possession: the same cell as en-us-yaml-plain-apostrophe, and §8 item 4's requirement that a construct be pinned in more than one locale rather than the same English output with the locale field changed."
@@ -954,7 +964,9 @@
954
964
  "id": "fr-yaml-single-quoted-escape-elision-stays",
955
965
  "rule": "apostrophe",
956
966
  "mode": "yaml",
957
- "keys": ["description"],
967
+ "keys": [
968
+ "description"
969
+ ],
958
970
  "in": "description: 'l''idee et l''autre'\n",
959
971
  "out": "description: 'l''idee et l''autre'\n",
960
972
  "note": "modes.md §3.8.6: in a locale where the apostrophe is elision, the unit is the elision, and it is outside every span. The scalar has nothing else to convert and comes back unchanged — the cost §7.13 measures, pinned so that it is a documented property and not a surprise."
@@ -963,7 +975,9 @@
963
975
  "id": "fr-yaml-single-quoted-escape-split",
964
976
  "rule": "dashes",
965
977
  "mode": "yaml",
966
- "keys": ["description"],
978
+ "keys": [
979
+ "description"
980
+ ],
967
981
  "in": "description: 'l''idee -- et ''l''autre...'\n",
968
982
  "out": "description: 'l''idee — et ''l''autre…'\n",
969
983
  "note": "modes.md §3.8.6: a spaced dash and an ellipsis interior to a span convert, either side of units; the elisions stay straight."
@@ -972,7 +986,9 @@
972
986
  "id": "fr-yaml-single-quoted-escape-growth-declined",
973
987
  "rule": "dashes",
974
988
  "mode": "yaml",
975
- "keys": ["description"],
989
+ "keys": [
990
+ "description"
991
+ ],
976
992
  "in": "description: 'a''--''b'\n",
977
993
  "out": "description: 'a''--''b'\n",
978
994
  "note": "modes.md §3.8.6 and §3.4: `fr` is a `-spaced` locale, so the dash would grow from 2 to 3 code points against a unit. The edge-growth rule discards it, as it does against `:` and `#`. The en-US case with the same input is applied, which is what makes this one discriminate."
@@ -981,7 +997,9 @@
981
997
  "id": "fr-yaml-single-quoted-no-escape",
982
998
  "rule": "dashes",
983
999
  "mode": "yaml",
984
- "keys": ["description"],
1000
+ "keys": [
1001
+ "description"
1002
+ ],
985
1003
  "in": "description: 'deux -- trois'\n",
986
1004
  "out": "description: 'deux — trois'\n",
987
1005
  "note": "modes.md §3.8.6: a single-quoted scalar with nothing doubled inside it is claimed like any other. The style itself never disables the mode — only the doubling does, which is what the neighbouring case pins."
@@ -1000,7 +1018,10 @@
1000
1018
  "rule": "quotes",
1001
1019
  "mode": "markdown",
1002
1020
  "dialect": "commonmark",
1003
- "frontmatterKeys": ["title", "slug"],
1021
+ "frontmatterKeys": [
1022
+ "title",
1023
+ "slug"
1024
+ ],
1004
1025
  "in": "---\ntitle: \"a\rb\"\nslug: c \"d\"\n---\n\nBody \"q\" here.\n",
1005
1026
  "out": "---\ntitle: \"a\rb\"\nslug: c « d »\n---\n\nBody « q » here.\n",
1006
1027
  "note": "modes.md §3.7.4 per-line U+000D bail in a locale whose quotation marks carry their own spacing, so the declined line and the converted one are visibly different constructions rather than the same English output relabelled (§8 item 4)."
@@ -1009,7 +1030,11 @@
1009
1030
  "id": "fr-yaml-lone-cr-costs-one-line",
1010
1031
  "rule": "quotes",
1011
1032
  "mode": "yaml",
1012
- "keys": ["title", "slug", "summary"],
1033
+ "keys": [
1034
+ "title",
1035
+ "slug",
1036
+ "summary"
1037
+ ],
1013
1038
  "in": "title: a \"b\"\nslug: c\rd \"e\"\n",
1014
1039
  "out": "title: a « b »\nslug: c\rd \"e\"\n",
1015
1040
  "note": "modes.md §3.8.4 step 9 in a locale whose quotation marks carry their own spacing: the line with the lone U+000D is declined and the line before it converts, so the cost is one line and not the document."
@@ -1100,6 +1125,14 @@
1100
1125
  "quote-punctuation": true
1101
1126
  },
1102
1127
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for fr, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
1128
+ },
1129
+ {
1130
+ "id": "fr-nbsp-spaced-unit-inserted",
1131
+ "rule": "nbsp",
1132
+ "mode": "text",
1133
+ "in": "Value 50% here",
1134
+ "out": "Value 50 % here",
1135
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
1103
1136
  }
1104
1137
  ]
1105
1138
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "hr",
4
4
  "cases": [
5
5
  {
@@ -259,6 +259,14 @@
259
259
  "quote-punctuation": true
260
260
  },
261
261
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for hr, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
262
+ },
263
+ {
264
+ "id": "hr-nbsp-spaced-unit-inserted",
265
+ "rule": "nbsp",
266
+ "mode": "text",
267
+ "in": "Value 50% here",
268
+ "out": "Value 50 % here",
269
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
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": "hu",
4
4
  "cases": [
5
5
  {
@@ -173,12 +173,12 @@
173
173
  "note": "AkH12 §275: «23 °C» with a space."
174
174
  },
175
175
  {
176
- "id": "hu-nbsp-percent-inert",
176
+ "id": "hu-nbsp-percent-closed",
177
177
  "rule": "nbsp",
178
178
  "mode": "text",
179
179
  "in": "48 % és 48%",
180
- "out": "48 % és 48%",
181
- "note": "AkH12 §275 prints 48% without a space, so % is not a unit here and nothing is bound."
180
+ "out": "48% és 48%",
181
+ "note": "AkH12 §275 prints 48% without a space, so % is in closedUnits: the typed space is deleted."
182
182
  },
183
183
  {
184
184
  "id": "hu-nbsp-single-letter-unit-inert",
@@ -270,6 +270,30 @@
270
270
  "quote-punctuation": true
271
271
  },
272
272
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for hu, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
273
+ },
274
+ {
275
+ "id": "hu-nbsp-spaced-unit-inserted",
276
+ "rule": "nbsp",
277
+ "mode": "text",
278
+ "in": "Value 20km here",
279
+ "out": "Value 20 km here",
280
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
281
+ },
282
+ {
283
+ "id": "hu-nbsp-closed-nbsp-deleted",
284
+ "rule": "nbsp",
285
+ "mode": "text",
286
+ "in": "Value 5 % here",
287
+ "out": "Value 5% here",
288
+ "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."
289
+ },
290
+ {
291
+ "id": "hu-nbsp-celsius-spaced",
292
+ "rule": "nbsp",
293
+ "mode": "text",
294
+ "in": "Ma 23°C van",
295
+ "out": "Ma 23 °C van",
296
+ "note": "AkH12 §275 writes `23 °C`: `°C` is in spacedUnits (spec 1.22.0)."
273
297
  }
274
298
  ]
275
299
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "it",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "cases": [
4
4
  {
5
5
  "id": "exact-en-us",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "lt",
4
4
  "cases": [
5
5
  {
@@ -320,6 +320,14 @@
320
320
  "quote-punctuation": true
321
321
  },
322
322
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for lt, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
323
+ },
324
+ {
325
+ "id": "lt-nbsp-spaced-unit-inserted",
326
+ "rule": "nbsp",
327
+ "mode": "text",
328
+ "in": "Value 50% here",
329
+ "out": "Value 50 % here",
330
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
323
331
  }
324
332
  ]
325
333
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "nl",
4
4
  "cases": [
5
5
  {
@@ -143,6 +143,22 @@
143
143
  "quote-punctuation": true
144
144
  },
145
145
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for nl, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
146
+ },
147
+ {
148
+ "id": "nl-nbsp-spaced-unit-inserted",
149
+ "rule": "nbsp",
150
+ "mode": "text",
151
+ "in": "Value 20kg here",
152
+ "out": "Value 20 kg here",
153
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
154
+ },
155
+ {
156
+ "id": "nl-nbsp-closed-nbsp-deleted",
157
+ "rule": "nbsp",
158
+ "mode": "text",
159
+ "in": "Value 5 % here",
160
+ "out": "Value 5% here",
161
+ "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."
146
162
  }
147
163
  ]
148
164
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "pl",
4
4
  "cases": [
5
5
  {
@@ -143,6 +143,22 @@
143
143
  "quote-punctuation": true
144
144
  },
145
145
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for pl, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
146
+ },
147
+ {
148
+ "id": "pl-nbsp-spaced-unit-inserted",
149
+ "rule": "nbsp",
150
+ "mode": "text",
151
+ "in": "Value 20km here",
152
+ "out": "Value 20 km here",
153
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
154
+ },
155
+ {
156
+ "id": "pl-nbsp-closed-nbsp-deleted",
157
+ "rule": "nbsp",
158
+ "mode": "text",
159
+ "in": "Value 5 % here",
160
+ "out": "Value 5% here",
161
+ "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."
146
162
  }
147
163
  ]
148
164
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "pt-BR",
4
4
  "cases": [
5
5
  {
@@ -170,6 +170,14 @@
170
170
  "quote-punctuation": true
171
171
  },
172
172
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for pt-BR, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
173
+ },
174
+ {
175
+ "id": "pt-br-nbsp-spaced-unit-inserted",
176
+ "rule": "nbsp",
177
+ "mode": "text",
178
+ "in": "Value 20kg here",
179
+ "out": "Value 20 kg here",
180
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
173
181
  }
174
182
  ]
175
183
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "pt-PT",
4
4
  "cases": [
5
5
  {
@@ -170,6 +170,14 @@
170
170
  "quote-punctuation": true
171
171
  },
172
172
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for pt-PT, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
173
+ },
174
+ {
175
+ "id": "pt-pt-nbsp-spaced-unit-inserted",
176
+ "rule": "nbsp",
177
+ "mode": "text",
178
+ "in": "Value 50% here",
179
+ "out": "Value 50 % here",
180
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
173
181
  }
174
182
  ]
175
183
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "ro",
4
4
  "cases": [
5
5
  {
@@ -164,7 +164,7 @@
164
164
  "mode": "text",
165
165
  "in": "50 % din preț",
166
166
  "out": "50 % din preț",
167
- "note": "% is not listed: it rests only on a non-normative guide, so it is not bound."
167
+ "note": "`%` is not listed: it rests only on a non-normative guide, so it is not bound, inserted or deleted."
168
168
  },
169
169
  {
170
170
  "id": "ro-nbsp-initial-single",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "ru",
4
4
  "cases": [
5
5
  {
@@ -583,20 +583,20 @@
583
583
  "note": "N5 twice, plus N3 on the conjunction `и`."
584
584
  },
585
585
  {
586
- "id": "ru-nbsp-percent",
586
+ "id": "ru-nbsp-percent-closed",
587
587
  "rule": "nbsp",
588
588
  "mode": "text",
589
589
  "in": "Рост 50 % за год",
590
- "out": "Рост 50 % за год",
591
- "note": "N5 on the percent sign, N3 on the two-letter preposition `за`."
590
+ "out": "Рост 50% за год",
591
+ "note": "`%` is in closedUnits (spec 1.22.0): the typed space before it is deleted; N3 still binds the two-letter preposition `за`."
592
592
  },
593
593
  {
594
- "id": "ru-nbsp-unit-never-inserts",
594
+ "id": "ru-nbsp-percent-already-closed",
595
595
  "rule": "nbsp",
596
596
  "mode": "text",
597
597
  "in": "Рост 50% за год",
598
598
  "out": "Рост 50% за год",
599
- "note": "nbsp.md §7.2: N5 converts, never inserts — `50%` keeps its typed form. N3 still binds the preposition `за`."
599
+ "note": "`%` is in closedUnits, so `50%` is already in its final form. N3 still binds the preposition `за`."
600
600
  },
601
601
  {
602
602
  "id": "ru-nbsp-no-french-spacing",
@@ -748,6 +748,38 @@
748
748
  "quote-punctuation": true
749
749
  },
750
750
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for ru, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
751
+ },
752
+ {
753
+ "id": "ru-nbsp-spaced-unit-inserted",
754
+ "rule": "nbsp",
755
+ "mode": "text",
756
+ "in": "Value 20°C here",
757
+ "out": "Value 20 °C here",
758
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
759
+ },
760
+ {
761
+ "id": "ru-nbsp-closed-nbsp-deleted",
762
+ "rule": "nbsp",
763
+ "mode": "text",
764
+ "in": "Value 5 % here",
765
+ "out": "Value 5% here",
766
+ "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."
767
+ },
768
+ {
769
+ "id": "ru-nbsp-bare-degree-untouched",
770
+ "rule": "nbsp",
771
+ "mode": "text",
772
+ "in": "Угол 45° ровно",
773
+ "out": "Угол 45° ровно",
774
+ "note": "A bare degree sign is in no list in any locale."
775
+ },
776
+ {
777
+ "id": "ru-nbsp-spaced-guard-multiplication-cyrillic",
778
+ "rule": "nbsp",
779
+ "mode": "text",
780
+ "in": "Упаковка 2 х 3км",
781
+ "out": "Упаковка 2 х 3км",
782
+ "note": "nbsp.md §3.7 step 5.5 with the Cyrillic MUL-LETTER U+0445."
751
783
  }
752
784
  ]
753
785
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "sk",
4
4
  "cases": [
5
5
  {
@@ -284,6 +284,14 @@
284
284
  "quote-punctuation": true
285
285
  },
286
286
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for sk, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
287
+ },
288
+ {
289
+ "id": "sk-nbsp-spaced-unit-inserted",
290
+ "rule": "nbsp",
291
+ "mode": "text",
292
+ "in": "Value 50% here",
293
+ "out": "Value 50 % here",
294
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
287
295
  }
288
296
  ]
289
297
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "sl",
4
4
  "cases": [
5
5
  {
@@ -253,6 +253,14 @@
253
253
  "quote-punctuation": true
254
254
  },
255
255
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for sl, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
256
+ },
257
+ {
258
+ "id": "sl-nbsp-spaced-unit-inserted",
259
+ "rule": "nbsp",
260
+ "mode": "text",
261
+ "in": "Value 50% here",
262
+ "out": "Value 50 % here",
263
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
256
264
  }
257
265
  ]
258
266
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "sr",
4
4
  "cases": [
5
5
  {
@@ -156,12 +156,12 @@
156
156
  "note": "km and min are not attested with a space in the source read, so they are not in beforeUnits."
157
157
  },
158
158
  {
159
- "id": "sr-nbsp-percent-inert",
159
+ "id": "sr-nbsp-percent-closed",
160
160
  "rule": "nbsp",
161
161
  "mode": "text",
162
162
  "in": "Остало је 50 % и 99,90 €.",
163
- "out": "Остало је 50 % и 99,90 €.",
164
- "note": "'%' is deliberately absent from beforeUnits: BIPM spaces it, Serbian print closes it up, and no Serbian norm was read. A typed space is left as typed."
163
+ "out": "Остало је 50% и 99,90 €.",
164
+ "note": "`%` is in closedUnits: Serbian print closes it up and no Serbian norm requires the space, so the typed space is deleted."
165
165
  },
166
166
  {
167
167
  "id": "sr-nbsp-short-words-inert",
@@ -213,6 +213,14 @@
213
213
  "quote-punctuation": true
214
214
  },
215
215
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for sr, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
216
+ },
217
+ {
218
+ "id": "sr-nbsp-closed-nbsp-deleted",
219
+ "rule": "nbsp",
220
+ "mode": "text",
221
+ "in": "Value 5 % here",
222
+ "out": "Value 5% here",
223
+ "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."
216
224
  }
217
225
  ]
218
226
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.22.0",
3
3
  "locale": "sv",
4
4
  "cases": [
5
5
  {
@@ -1172,12 +1172,12 @@
1172
1172
  "note": "nbsp N5, cited to Språkrådet §4.3.4 and BIPM."
1173
1173
  },
1174
1174
  {
1175
- "id": "sv-nbsp-unit-no-space",
1175
+ "id": "sv-nbsp-unit-inserted",
1176
1176
  "rule": "nbsp",
1177
1177
  "mode": "text",
1178
1178
  "in": "Vi gick 5km i dag",
1179
- "out": "Vi gick 5km i dag",
1180
- "note": "N5 converts, never inserts."
1179
+ "out": "Vi gick 5 km i dag",
1180
+ "note": "`km` is in spacedUnits (spec 1.22.0), so the missing space is inserted as U+00A0."
1181
1181
  },
1182
1182
  {
1183
1183
  "id": "sv-nbsp-unit-already-bound",
@@ -1304,6 +1304,14 @@
1304
1304
  "quote-punctuation": true
1305
1305
  },
1306
1306
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for sv, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
1307
+ },
1308
+ {
1309
+ "id": "sv-nbsp-spaced-unit-inserted",
1310
+ "rule": "nbsp",
1311
+ "mode": "text",
1312
+ "in": "Value 50% here",
1313
+ "out": "Value 50 % here",
1314
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
1307
1315
  }
1308
1316
  ]
1309
1317
  }