polytypo 1.21.0 → 1.23.0

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 (72) 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 +694 -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 +22 -5
  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 +14 -7
  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/modes/html.rb +10 -0
  71. data/lib/polytypo/version.rb +1 -1
  72. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.23.0",
3
3
  "locale": "tr",
4
4
  "cases": [
5
5
  {
@@ -256,6 +256,14 @@
256
256
  "quote-punctuation": true
257
257
  },
258
258
  "note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for tr, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
259
+ },
260
+ {
261
+ "id": "tr-nbsp-spaced-unit-inserted",
262
+ "rule": "nbsp",
263
+ "mode": "text",
264
+ "in": "Value 20kg here",
265
+ "out": "Value 20 kg here",
266
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
259
267
  }
260
268
  ]
261
269
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.23.0",
3
3
  "locale": "uk",
4
4
  "cases": [
5
5
  {
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": [],
39
- "beforeUnits": ["км", "кг", "лв.", "г."],
39
+ "beforeUnits": [],
40
+ "spacedUnits": ["км", "кг", "лв.", "г."],
41
+ "closedUnits": ["%"],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -78,6 +80,12 @@
78
80
  "cite": "Институт за български език (БАН), «За интервалите и препинателните знаци» (2018): «Пред точка, запетая, въпросителен знак, удивителен знак, точка и запетая, двоеточие не се оставя интервал.»; Езикови справки №1601: «Между последната цифра и съкращението се поставя шпация (интервал): 20 лв., също и 5 кг, 10 м, 100 км, 2020 г. и под.»; №626: «В записа 5% няма интервал (шпация) между цифрата и знака за процент.»",
79
81
  "url": "https://ibl.bas.bg/ezikovispravki/vaprosi/pri-skrashcheniya-vkl-mezhdu-tsifra-i-skrashchenie-5-kg-2014-g-4/1601",
80
82
  "note": "(1) beforePunctuation and narrowBeforePunctuation empty: no space before . , ? ! ; :. (2) beforeUnits = км, кг, лв., г.: each attested with a space after a number. This is form evidence only (IBL does not say non-breaking), the same footing as hu and sk, MEDIUM. The single-letter м is excluded by decision. (3) % is excluded: IBL writes 5% unspaced; the DGT house handbook's «4 %» with a non-breaking space ranks below it. (4) abbreviations, beforeNumber, beforeWord, afterSymbols and afterShortWords are empty and initialBinding = none: no source states a rule (IBL says proper names follow ordinary line-break rules). Decision, not citation. Verified 2026-10-21."
83
+ },
84
+ {
85
+ "rule": "nbsp",
86
+ "cite": "Институт за български език към БАН, Езикови справки № 626: «В записа 5% няма интервал (шпация) между цифрата и знака за процент.»; № 1601 (28.1.2020): «Между последната цифра и съкращението се поставя шпация (интервал): 20 лв., … 5 кг, 10 м, 100 км, 2020 г.»",
87
+ "url": "https://ibl.bas.bg/ezikovispravki/vaprosi/pri-znatsite-za-protsent-gradus-nomer-paragraf-i-dr-2/626",
88
+ "note": "% е в closedUnits (№ 626). км, кг, лв., г. са в spacedUnits (№ 1601). °C и ‰ няма в източниците на ИБЕ БАН и не са в списъци. Проверено на 11.11.2026."
81
89
  }
82
90
  ]
83
91
  }
@@ -37,6 +37,8 @@
37
37
  "afterShortWords": ["a", "i", "k", "o", "s", "u", "v", "z"],
38
38
  "abbreviations": ["a. s.", "s. r. o."],
39
39
  "beforeUnits": ["%", "°C", "ha", "kg", "km", "cm", "mm", "m²", "kWh", "km/h", "str.", "hod."],
40
+ "spacedUnits": [],
41
+ "closedUnits": [],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": ["tj.", "tzv.", "tzn."],
42
44
  "afterSymbols": ["§"],
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["z. B.", "d. h.", "u. a.", "u. U.", "m. a. W.", "m. w. H."],
39
- "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
39
+ "beforeUnits": [],
40
+ "spacedUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["Art.", "Abs.", "Ziff.", "Kap.", "S."],
41
43
  "beforeWord": ["St."],
42
44
  "afterSymbols": ["§", "§§"],
@@ -82,6 +84,12 @@
82
84
  "rule": "quote-punctuation",
83
85
  "cite": "No Swiss source for the placement of punctuation relative to the closing quotation mark was consulted; value left at the default",
84
86
  "note": "quotes.punctuationPlacement is \"none\" because no convention has been verified for de-CH. That is the default and means the rule does nothing, not that a convention was found to depend on meaning. The German Amtliches Regelwerk (2024) is the source cited for de-DE; whether it is the right authority for Swiss usage was not established."
87
+ },
88
+ {
89
+ "rule": "nbsp",
90
+ "cite": "Schweizerische Bundeskanzlei, Schreibweisungen, Rz. 549a, 550, 552, 554: «Zwischen Ziffern und den Begriffszeichen % und ‰ steht ein Festabstand»; «25 km/h»; «3 °C»; Rz. 555: «die 0,5‰-Grenze»",
91
+ "url": "https://www.bk.admin.ch/dam/de/sd-web/YVHazXZRkqKn/schreibweisungen.pdf",
92
+ "note": "All entries of spacedUnits are attested by the cited randziffern. Rz. 555 sets a compound closed up, which N5's right-context guard leaves alone. Bare ° is closed up (Rz. 551) and is in no list. Retrieved 2026-11-11."
85
93
  }
86
94
  ]
87
95
  }
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["z. B.", "d. h.", "u. a.", "u. Ä.", "z. T.", "i. d. R."],
39
- "beforeUnits": ["%", "‰", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
39
+ "beforeUnits": ["‰"],
40
+ "spacedUnits": ["%", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["Nr.", "S."],
41
43
  "beforeWord": ["St."],
42
44
  "afterSymbols": ["§", "§§"],
@@ -87,6 +89,12 @@
87
89
  "cite": "Rat für deutsche Rechtschreibung, Amtliches Regelwerk der deutschen Rechtschreibung (2024), §79 E1",
88
90
  "url": "https://www.rechtschreibrat.com/DOX/RfdR_Amtliches-Regelwerk_2024.pdf",
89
91
  "note": "Supports quotes.punctuationPlacement = \"none\". Verbatim: “Satzzeichen, die zu einer angeführten Einheit gehören, stehen vor dem schließenden Anführungszeichen; Satzzeichen, die zum Trägersatz gehören, stehen nach dem schließenden Anführungszeichen.” E1(2) puts a comma after the closing mark when a carrier sentence follows the quotation, but the placement of a full stop and of the other marks depends on whether they belong to the quotation, so the rule does nothing here. Consulted 2026-11-09."
92
+ },
93
+ {
94
+ "rule": "nbsp",
95
+ "cite": "Gesellschaft für deutsche Sprache, «Leerzeichen und Festabstände»: «Vor bzw. nach Sonderzeichen wie §, €, %, & steht ein Leerzeichen»; «Abgekürzten Maß- und Mengenangaben geht ein Leerzeichen voran: 30 l, 50 km»; «ein Leerzeichen nach der Zahl … aber keines vor dem C»",
96
+ "url": "https://gfds.de/leerzeichen-und-festabstaende/",
97
+ "note": "%, €, °C, km, cm, mm, kg, km/h, kWh in spacedUnits. ‰ stays in beforeUnits: GfdS does not address it. Bare ° is closed up (GfdS: «ein Winkel von 30°») and is in no list. Retrieved 2026-11-11 via a model summary of the page, one level below a page read in full."
90
98
  }
91
99
  ]
92
100
  }
@@ -37,6 +37,8 @@
37
37
  "afterShortWords": [],
38
38
  "abbreviations": [],
39
39
  "beforeUnits": [],
40
+ "spacedUnits": [],
41
+ "closedUnits": ["%", "°C"],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -71,7 +73,7 @@
71
73
  "rule": "nbsp",
72
74
  "cite": "Διοργανικό εγχειρίδιο σύνταξης κειμένων (EL, 2011), §10.1.4 παρατήρηση iv) και §10.1.3 παρατήρηση ii) (ό.π., ρητή αντιπαραβολή με τα γαλλικά)· §10.6 «Συντομογραφίες», γενικός κανόνας γ): «Στις ελληνικές συντομογραφίες με τις οποίες συντέμνονται φράσεις που αποτελούνται από περισσότερες της μίας λέξεις μπαίνει κατά κανόνα τελεία έπειτα από κάθε συντεμνόμενη λέξη» (π.χ. κ.λπ., π.χ., πρβλ., κ.ο.κ.)",
73
75
  "url": "http://publications.europa.eu/resource/cellar/e774ea2a-ef84-4bf6-be92-c9ebebf91c1b.0015.03/DOC_2",
74
- "note": "Two empty lists closed by citation rather than by absence of one. beforePunctuation and narrowBeforePunctuation are empty because Greek takes neither U+00A0 nor U+202F before «;» «:» «!» «·» — the source denies the French practice by name. abbreviations is empty because Greek multi-word abbreviations appear to be written with no internal space at all (κ.λπ., not «κ. λπ.»), so there is no U+0020 for the rule to promote. INFERENCE, NOT CITATION: §10.6 γ) states only that a full stop follows each abbreviated word; it says nothing about spacing between them. The no-space form is visible in the guide's own printed examples and in no normative sentence examined. The list would be empty on the absence of a citation alone (docs/PLAN.md §6.1), so nothing rests on the inference — it is labelled because an unlabelled inference in a cite field is the failure mode this field exists to prevent. The remaining lists are empty because no Greek normative source examined states a binding: the one candidate, the §6.4 table binding a number to «%» and «°C», sits in Part Three — «Συμβατικοί κανόνες κοινοί για ΟΛΕΣ τις γλώσσες» — whose own preamble says it replaced diverging national rules for uniform presentation, which makes it publisher house style rather than evidence about Greek. A missing citation is never a licence to guess (docs/PLAN.md §6.1). Observed usage does not contradict that reading, which is worth recording because it was checked rather than assumed: a byte-level scan on 2026-08-15 of the Greek-language home pages of kathimerini.gr, kathimerini.gr/economy, tovima.gr, tanea.gr, efsyn.gr, in.gr, naftemporiki.gr, protagon.gr, lifo.gr, meteo.gr, kedros.gr, onassis.org/el and emst.gr found 183 number-plus-unit occurrences — 140 «%», 41 «°C», 2 «€» — and NOT ONE of them carried a space of any kind, no U+0020, no U+00A0. Greek web practice sets «50%» and «20°C» tight, so beforeUnits would have nothing to promote even if it were populated. Method, so the figure can be re-derived rather than taken on trust: fetch each page, strip script, style and noscript elements and then all tags, decode HTML entities (so that   becomes the U+00A0 it denotes rather than disappearing), and count matches of a digit followed by an optional single space character from {U+0020, U+00A0, U+202F, U+2009} followed by the unit. Pages carrying under 200 Greek letters were excluded as not being Greek-language content. That scan is an observation of usage, is not offered as a normative claim, and nothing in this file depends on it: the lists would be empty on the absence of a citation alone. Retrieved 2026-08-15."
76
+ "note": "Two empty lists closed by citation rather than by absence of one. beforePunctuation and narrowBeforePunctuation are empty because Greek takes neither U+00A0 nor U+202F before «;» «:» «!» «·» — the source denies the French practice by name. abbreviations is empty because Greek multi-word abbreviations appear to be written with no internal space at all (κ.λπ., not «κ. λπ.»), so there is no U+0020 for the rule to promote. INFERENCE, NOT CITATION: §10.6 γ) states only that a full stop follows each abbreviated word; it says nothing about spacing between them. The no-space form is visible in the guide's own printed examples and in no normative sentence examined. The list would be empty on the absence of a citation alone (docs/PLAN.md §6.1), so nothing rests on the inference — it is labelled because an unlabelled inference in a cite field is the failure mode this field exists to prevent. The remaining lists are empty because no Greek normative source examined states a binding: the one candidate, the §6.4 table binding a number to «%» and «°C», sits in Part Three — «Συμβατικοί κανόνες κοινοί για ΟΛΕΣ τις γλώσσες» — whose own preamble says it replaced diverging national rules for uniform presentation, which makes it publisher house style rather than evidence about Greek. A missing citation is never a licence to guess (docs/PLAN.md §6.1). Observed usage does not contradict that reading, which is worth recording because it was checked rather than assumed: a byte-level scan on 2026-08-15 of the Greek-language home pages of kathimerini.gr, kathimerini.gr/economy, tovima.gr, tanea.gr, efsyn.gr, in.gr, naftemporiki.gr, protagon.gr, lifo.gr, meteo.gr, kedros.gr, onassis.org/el and emst.gr found 183 number-plus-unit occurrences — 140 «%», 41 «°C», 2 «€» — and NOT ONE of them carried a space of any kind, no U+0020, no U+00A0. Greek web practice sets «50%» and «20°C» tight, which is why closedUnits holds both (spec 1.22.0). Method, so the figure can be re-derived rather than taken on trust: fetch each page, strip script, style and noscript elements and then all tags, decode HTML entities (so that   becomes the U+00A0 it denotes rather than disappearing), and count matches of a digit followed by an optional single space character from {U+0020, U+00A0, U+202F, U+2009} followed by the unit. Pages carrying under 200 Greek letters were excluded as not being Greek-language content. That scan is an observation of usage, is not offered as a normative claim, and nothing in this file depends on it: the lists would be empty on the absence of a citation alone. Retrieved 2026-08-15."
75
77
  },
76
78
  {
77
79
  "rule": "hyphen",
@@ -90,6 +92,12 @@
90
92
  "cite": "Unicode Consortium, The Unicode Standard, Version 17.0, Core Specification, ch. 7 «Europe-I», §7.2.1 Greek, «Compatibility Punctuation», verbatim: «Therefore, use of U+037E and U+0387 is not necessary for interoperating with legacy Greek data, and their use is not generally encouraged for representation of Greek punctuation.» The preceding sentence of that subsection — to the effect that the two characters have canonical equivalences to U+003B and U+00B7, so that normalised Greek text loses the distinction — is given here as PARAPHRASE, not as quotation: it could not be confirmed word for word at review time. Its substance does not rest on the prose in any case; it is entailed directly by UnicodeData.txt, where U+037E carries the canonical decomposition mapping 003B and U+0387 carries 00B7, each as a singleton",
91
93
  "url": "https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-7/",
92
94
  "note": "Code-point identity only, which is the one thing this source is authoritative for. Note the split standing of the citation: one sentence is verbatim, one is paraphrase backed by UnicodeData.txt rather than by the Core Specification's wording, and the file says which is which. Everything the rules do rests on the machine-readable field, not on the prose. The ερωτηματικό is written U+003B, not U+037E; the άνω τελεία is written U+00B7, not U+0387. Consequence for the rules: no rule may emit U+037E or U+0387, and none may rewrite one to the character it decomposes to — that is normalisation, forbidden by docs/ARCHITECTURE.md §4.3 and performed anyway by any downstream NFC pass. The full argument, including why U+00B7 must not join the spaces rule's STRIP-BEFORE set, is in spec/rules/spaces.md §3.5. Retrieved 2026-08-15."
95
+ },
96
+ {
97
+ "rule": "nbsp",
98
+ "cite": "Διοργανικό εγχειρίδιο σύνταξης κειμένων (EL, 2011), Μέρος Τέταρτο, §10.8.1 Β ε): «συντελεστής 2,2 %», «θερμοκρασία 6 °C»; για ποσοστά και θερμοκρασία εκτός ΕΕ: «μπορούμε να μην αφήνουμε διάστημα μεταξύ αριθμού και συμβόλου»",
99
+ "url": "http://publications.europa.eu/resource/cellar/e774ea2a-ef84-4bf6-be92-c9ebebf91c1b.0015.03/DOC_2",
100
+ "note": "% and °C in closedUnits: the Greek part of the inter-institutional guide permits both forms for a percentage and a temperature outside the EU, and the web scan above found every occurrence closed. kg, kW are spaced in the same section but the section is house style, so they stay out of the lists. Retrieved 2026-11-11."
93
101
  }
94
102
  ]
95
103
  }
@@ -37,7 +37,6 @@
37
37
  "afterShortWords": [],
38
38
  "abbreviations": [],
39
39
  "beforeUnits": [
40
- "%",
41
40
  "kg",
42
41
  "g",
43
42
  "mg",
@@ -55,8 +54,6 @@
55
54
  "min",
56
55
  "s",
57
56
  "ms",
58
- "°C",
59
- "°F",
60
57
  "kB",
61
58
  "MB",
62
59
  "GB",
@@ -64,6 +61,8 @@
64
61
  "kW",
65
62
  "kWh"
66
63
  ],
64
+ "spacedUnits": [],
65
+ "closedUnits": ["%", "°C", "°F"],
67
66
  "beforeNumber": [],
68
67
  "beforeWord": [],
69
68
  "afterSymbols": [],
@@ -92,7 +91,7 @@
92
91
  "rule": "nbsp",
93
92
  "cite": "BIPM, The International System of Units (SI), 9th ed. (2019), concise summary, “The language of science: using the SI to express the values of quantities”",
94
93
  "url": "https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-concise-EN.pdf",
95
- "note": "Verbatim: “A single space is always left between the number and the unit.” Used here because the University of Oxford Style Guide sets measurements closed up (“The average height of a woman in the UK is 1.61m.”, “worth 10% of the available marks”) and is therefore silent on binding a space it does not itself write. The nbsp rule never inserts a space — it only makes an author-typed space non-breaking — so the two positions do not conflict."
94
+ "note": "Verbatim: “A single space is always left between the number and the unit.” Used here because the University of Oxford Style Guide sets measurements closed up (“The average height of a woman in the UK is 1.61m.”, “worth 10% of the available marks”) and is therefore silent on binding a space it does not itself write. Oxford is the named authority for en-GB, so where the two disagree on `%` and `°C`/`°F` the locale follows Oxford (closedUnits, see the entry below); for the remaining units BIPM only supplies the symbols."
96
95
  },
97
96
  {
98
97
  "rule": "nbsp",
@@ -127,6 +126,12 @@
127
126
  "cite": "University of Oxford Style Guide (2014; Michaelmas term 2014 edition), p. 16, “Using other punctuation with quotation marks”",
128
127
  "url": "https://warwick.ac.uk/fac/sci/lifesci/research/der/workshop/university_of_oxford_style_guide.pdf",
129
128
  "note": "Supports quotes.punctuationPlacement = \"none\". Verbatim: “If the quote would have required punctuation in its original form, place the punctuation inside the quotation marks.” and “Place any punctuation which does not belong to the quote outside the quotation marks (except closing punctuation if the end of the quote is also the end of the sentence).” Placement follows whether the mark belongs to the quoted material, which a scan of code points cannot decide, so the rule does nothing here rather than guess. This is a university house style, not a national norm, and the copy read is the 2014 edition at the URL above; the current edition on ox.ac.uk was not reachable. Consulted 2026-11-09."
129
+ },
130
+ {
131
+ "rule": "nbsp",
132
+ "cite": "University of Oxford Style Guide (2014), pp. 7, 10: “worth 10% of the available marks”; “The average height of a woman in the UK is 1.61m.”; “Preheat the oven to 350°F (180°C).”",
133
+ "url": "https://www.warwick.ac.uk/fac/sci/lifesci/research/der/workshop/university_of_oxford_style_guide.pdf",
134
+ "note": "`%`, `°C` and `°F` are in closedUnits: Oxford, the named authority for en-GB, sets them closed up. The other units stay in beforeUnits (an author-typed space is bound, nothing is inserted or deleted): Oxford's own example is the single-letter `m`, which no list holds, and BIPM sets a space. Retrieved 2026-11-11."
130
135
  }
131
136
  ]
132
137
  }
@@ -42,27 +42,20 @@
42
42
  "narrowBeforePunctuation": [],
43
43
  "afterShortWords": [],
44
44
  "abbreviations": [],
45
- "beforeUnits": [
46
- "%",
45
+ "beforeUnits": ["g", "m", "L", "h", "s", "°C", "°F"],
46
+ "spacedUnits": [
47
47
  "kg",
48
- "g",
49
48
  "mg",
50
49
  "km",
51
- "m",
52
50
  "cm",
53
51
  "mm",
54
52
  "mi",
55
53
  "ft",
56
54
  "lb",
57
55
  "oz",
58
- "L",
59
56
  "mL",
60
- "h",
61
- "min",
62
- "s",
63
57
  "ms",
64
- "°C",
65
- "°F",
58
+ "min",
66
59
  "kB",
67
60
  "MB",
68
61
  "GB",
@@ -70,6 +63,7 @@
70
63
  "kW",
71
64
  "kWh"
72
65
  ],
66
+ "closedUnits": ["%"],
73
67
  "beforeNumber": [],
74
68
  "beforeWord": [],
75
69
  "afterSymbols": [],
@@ -116,7 +110,7 @@
116
110
  "rule": "nbsp",
117
111
  "cite": "BIPM, The International System of Units (SI), 9th ed. (2019), concise summary, “The language of science: using the SI to express the values of quantities”",
118
112
  "url": "https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-concise-EN.pdf",
119
- "note": "Verbatim: “A single space is always left between the number and the unit.” This is the authority for the unit list itself; Chicago is the authority for making that space non-breaking. `%` is included even though Chicago sets percentages closed up (45%): the rule only converts a space the author already typed, and a spaced `45 %` in English is a deliberate scientific-style choice worth binding."
113
+ "note": "Verbatim: “A single space is always left between the number and the unit.” This is the authority for the unit list itself; Chicago is the authority for making that space non-breaking. BIPM supplies which strings are SI symbols; the spacing of `%`, which BIPM sets with a space and Chicago closed up, is decided by the entry above."
120
114
  },
121
115
  {
122
116
  "rule": "nbsp",
@@ -145,6 +139,12 @@
145
139
  "cite": "CMOS Shop Talk (the Chicago Manual of Style’s own blog), Russell Harper, “Commas and Periods with Quotation Marks”, 20 October 2020 (updated 20 January 2026), which cites Chicago Manual of Style 6.9–6.10",
146
140
  "url": "https://cmosshoptalk.com/2020/10/20/commas-and-periods-with-quotation-marks/",
147
141
  "note": "Supports quotes.punctuationPlacement = \"inside\". Verbatim: “In publications that follow Chicago style, commas and periods are placed before a closing quotation mark”; semicolons, colons, question marks, exclamation points and dashes “go after a closing quotation mark unless they belong to the quoted matter.” Only the comma and the full stop are positional, so only those two are moved (quote-punctuation.md §3); the others depend on whether they belong to the quotation, which no scan of code points can tell. The post also notes the convention is “no longer universally followed outside the United States”. The numbered paragraphs of the manual itself are behind a login and were not read; 6.9–6.10 are the numbers the post gives, and it names no edition; the current (18th) edition is inferred from the post’s update date, not stated by it. CMOS Shop Talk, “Section 7.75 in the Spotlight” (11 August 2015, 16th ed.), says punctuation that is not part of a quoted computer term stays outside the marks; whether that holds in the 18th edition was not checked, and the rule does not model it (accepted cost, quote-punctuation.md §6). Consulted 2026-11-09."
142
+ },
143
+ {
144
+ "rule": "nbsp",
145
+ "cite": "Chicago Manual of Style, 18th ed., 9.18 (as quoted by CMOS Shop Talk, “Introducing the Chicago Manual of Style for PerfectIt”, 31 Aug 2021): “20%” [with no space between the numeral and the symbol]; “A single space is always left between the number and the unit” (NIST SP 811, 2008 ed., §7.2) for kg, km, kW and the like",
146
+ "url": "https://cmosshoptalk.com/2021/08/31/introducing-the-chicago-manual-of-style-for-perfectit/",
147
+ "note": "`%` is in closedUnits: Chicago, the named style authority for en-US, sets it closed up; NIST SP 811 §7.10.2 sets a space (“0.25 %”), and where authorities disagree the locale follows the style guide. The listed multi-letter units are in spacedUnits (NIST §7.2; Chicago: “between a numeral and an abbreviated unit of measure, as in ‘10 kg’”). `°C` and `°F` stay in beforeUnits: Chicago is silent and NIST sets a space, practice sets them closed. Single-letter symbols stay in beforeUnits: `1970s` and `£2m` are not units. Retrieved 2026-11-11."
148
148
  }
149
149
  ]
150
150
  }
@@ -46,6 +46,8 @@
46
46
  "et al."
47
47
  ],
48
48
  "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "mg", "mL", "min", "dB", "kW", "kWh"],
49
+ "spacedUnits": [],
50
+ "closedUnits": [],
49
51
  "beforeNumber": ["art.", "cap.", "núm.", "nro.", "pág.", "págs."],
50
52
  "beforeWord": ["Sr.", "Sra.", "Srta."],
51
53
  "afterSymbols": [],
@@ -37,8 +37,6 @@
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["fil. maist."],
39
39
  "beforeUnits": [
40
- "%",
41
- "‰",
42
40
  "§",
43
41
  "kg",
44
42
  "g",
@@ -55,10 +53,11 @@
55
53
  "min",
56
54
  "s",
57
55
  "ms",
58
- "°C",
59
56
  "kW",
60
57
  "kWh"
61
58
  ],
59
+ "spacedUnits": ["%", "‰", "°C", "°F"],
60
+ "closedUnits": [],
62
61
  "beforeNumber": [],
63
62
  "beforeWord": [],
64
63
  "afterSymbols": ["§"],
@@ -136,6 +135,12 @@
136
135
  "cite": "Kotimaisten kielten keskus (Kotus), Kielitoimiston ohjepankki: “Yhdysmerkki eli yhdysviiva”",
137
136
  "url": "https://kielitoimistonohjepankki.fi/ohje/yhdysmerkki-eli-yhdysviiva/",
138
137
  "note": "`prefixes`, `suffixes` and `compounds` are empty. Kotus’s hyphen guidance is entirely about when to write a hyphen (compounds with numerals or abbreviations, identical adjoining vowels, word-group compounds such as “avaimet käteen -sopimus”), never about forbidding a line break at one. Finnish compounding is productive, so there is no closed normative list to encode — unlike Russian, where кое-, -таки and из-под are a fixed inventory. Nothing here, and no Kotus page found, prescribes U+2011."
138
+ },
139
+ {
140
+ "rule": "nbsp",
141
+ "cite": "Kotus, Kielitoimiston ohjepankki: «Prosenttimerkki»: «Numeron ja prosenttimerkin väliin kuuluu suomenkielisissä teksteissä välilyönti.»; «Promillemerkki»: «Luvun ja merkin väliin jätetään väli: 4 ‰»; «Asteen ja tuuman merkit»: «erotetaan numero ja asteikon tunnus (°C, °F) välilyönnillä», «Asteen merkki ° kirjoitetaan numeron perään ilman välilyöntiä»",
142
+ "url": "https://kielitoimistonohjepankki.fi/ohje/prosenttimerkki/",
143
+ "note": "%, ‰, °C and °F in spacedUnits. Bare ° is closed up and is in no list (the same page sets 10° closed for a temperature with no scale letter). Other units stay in beforeUnits: only BIPM supports them. Retrieved 2026-11-11."
139
144
  }
140
145
  ]
141
146
  }
@@ -50,7 +50,9 @@
50
50
  "narrowBeforePunctuation": [],
51
51
  "afterShortWords": [],
52
52
  "abbreviations": ["p. ex."],
53
- "beforeUnits": ["%", "‰", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
53
+ "beforeUnits": ["‰"],
54
+ "spacedUnits": ["%", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh", "$", "°F"],
55
+ "closedUnits": [],
54
56
  "beforeNumber": ["art.", "fig.", "n°", "N°"],
55
57
  "beforeWord": ["M.", "MM.", "Mme", "Mmes", "Mlle", "Mlles"],
56
58
  "afterSymbols": ["§"],
@@ -110,6 +112,12 @@
110
112
  "cite": "Office québécois de la langue française, Banque de dépannage linguistique, « Élision de lorsque, puisque et quoique » (2020) : « les conjonctions lorsque, puisque et quoique s'élident obligatoirement devant il(s), elle(s), on, un et une, et aussi devant la préposition en » ; l'élision généralisée devant tout mot commençant par une voyelle ou un h muet « demeure facultative »",
111
113
  "url": "https://vitrinelinguistique.oqlf.gouv.qc.ca/23623/lorthographe/elision-et-apostrophe/elision-de-lorsque-puisque-et-quoique",
112
114
  "note": "Justifie les trois entrées lorsqu, puisqu, quoiqu. L'élision obligatoire devant il(s), elle(s), on, un, une et en suffit à l'appartenance : la liste étant uniquement restrictive, le caractère facultatif de l'élision généralisée ne change rien. Là encore la plage maximale impose des entrées distinctes : qu n'apparie pas « lorsqu' ». quotes.md §3.2's span-boundary elision veto (spec 1.4.0) reads this list only when the mark's other literal neighbour is modes.md §3.2's inline span boundary, so every entry is matched against the maximal LETTER run on one side of the mark and nothing else. The list is decline-only: the worst it can do is refuse a pairing quotes would otherwise have formed."
115
+ },
116
+ {
117
+ "rule": "nbsp",
118
+ "cite": "Office québécois de la langue française, Banque de dépannage linguistique: «On sépare un symbole et le nombre qui le précède par une espace insécable.»; «20 °C, 451 °F (et non : 20°C, 451°F)»; pourcentage: «une espace insécable» avant le signe; «37,83 $»",
119
+ "url": "https://vitrinelinguistique.oqlf.gouv.qc.ca/21401/les-abreviations-et-les-symboles/les-symboles/ecriture-des-symboles-dunites-de-mesure",
120
+ "note": "%, €, $, °C, °F, km, cm, mm, kg, km/h, kWh in spacedUnits. ‰ stays in beforeUnits: not addressed. Bare ° is closed up («90°, 360°») and is in no list. Retrieved 2026-11-11 via a model summary of the page."
113
121
  }
114
122
  ]
115
123
  }
@@ -50,7 +50,9 @@
50
50
  "narrowBeforePunctuation": [";", "!", "?"],
51
51
  "afterShortWords": [],
52
52
  "abbreviations": ["p. ex."],
53
- "beforeUnits": ["%", "‰", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
53
+ "beforeUnits": ["‰", "km", "cm", "mm", "kg", "km/h", "kWh"],
54
+ "spacedUnits": ["%", "€", "°C"],
55
+ "closedUnits": [],
54
56
  "beforeNumber": ["art.", "fig.", "n°", "N°"],
55
57
  "beforeWord": ["M.", "MM.", "Mme", "Mmes", "Mlle", "Mlles"],
56
58
  "afterSymbols": ["§"],
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["dipl. ing.", "d. o. o."],
39
- "beforeUnits": ["%", "‰", "€", "°C", "kg"],
39
+ "beforeUnits": [],
40
+ "spacedUnits": ["%", "‰", "€", "°C", "kg"],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["str."],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": ["§"],
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["a. m.", "i. sz.", "Kr. e.", "Kr. u.", "s. k.", "i. e."],
39
- "beforeUnits": ["km", "kg", "kWh", "km/h", "°C"],
39
+ "beforeUnits": [],
40
+ "spacedUnits": ["km", "kg", "kWh", "km/h", "°C"],
41
+ "closedUnits": ["%"],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -84,6 +86,12 @@
84
86
  "cite": "Magyar Tudományos Akadémia, A magyar helyesírás szabályai, 12. kiadás (AkH12), §279 c: «A mértékegységnek a jelét szóköz választja el az előtte levő számtól, például: 100 km, 1 kg, 10 kWh, 120 km/h, 220 W.»; §275: «Fokjel. Például: 45°; 23 °C», «A százalék jele. Például: 48%»",
85
87
  "url": "https://helyesiras.mta.hu/helyesiras/default/akh12",
86
88
  "note": "beforeUnits = km, kg, kWh, km/h, °C, each attested with a space in §279 c or §275. '%' is deliberately absent: AkH prints 48% without a space; geometric 45° is likewise unspaced. Single-letter symbols are excluded by decision, not by citation: §279 c itself writes «220 W» with a space, but `s` is a Hungarian conjunction and a list of single letters would be a derivation (as in sk and ro). 'Ft' is omitted: it is a currency abbreviation attested only by example (§290), so it ships unverified-empty. Verified 2026-10-21."
89
+ },
90
+ {
91
+ "rule": "nbsp",
92
+ "cite": "Magyar Tudományos Akadémia, AkH12, 275.: «48%», «23 °C»; 279. c): «A mértékegységnek a jelét szóköz választja el az előtte levő számtól, például: 100 km, 1 kg, 10 kWh, 120 km/h, 220 W.»",
93
+ "url": "https://helyesiras.mta.hu/helyesiras/default/akh12",
94
+ "note": "% in closedUnits (§275: «48%»); km, kg, kWh, km/h, °C in spacedUnits (§279 c, §275). Geometric degree sign is closed up and is in no list. ‰ not found in the parts read. Retrieved 2026-11-11."
87
95
  }
88
96
  ]
89
97
  }
@@ -37,6 +37,8 @@
37
37
  "afterShortWords": [],
38
38
  "abbreviations": [],
39
39
  "beforeUnits": ["%", "‰", "€", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
40
+ "spacedUnits": [],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["n.", "pag."],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -36,23 +36,24 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["t. y.", "t. t.", "š. m."],
39
- "beforeUnits": [
39
+ "beforeUnits": ["cm", "mm", "m.", "d."],
40
+ "spacedUnits": [
40
41
  "%",
41
42
  "proc.",
42
43
  "°C",
43
44
  "kg",
44
45
  "km",
45
- "cm",
46
- "mm",
47
46
  "EUR",
48
47
  "Eur",
49
48
  "€",
50
49
  "mln.",
51
50
  "val.",
52
51
  "min.",
53
- "m.",
54
- "d."
52
+ "km/h",
53
+ "m/s",
54
+ "ha"
55
55
  ],
56
+ "closedUnits": [],
56
57
  "beforeNumber": [],
57
58
  "beforeWord": [],
58
59
  "afterSymbols": ["§"],
@@ -100,6 +101,12 @@
100
101
  "cite": "European Commission, ES institucijų vertimo į lietuvių kalbą vadovas (2014), A.9: jungiamasis tarpas «renkamas tada, kai norima, kad tekstas (pvz., skaičius ir mato simbolis) išliktų vienoje eilutėje»; A.9.4 «t. y., t. t., š. m.; E. Petraitis, R. Jutkonytė, J. M. Barroso»; A.9.5 «40 mln., 2007 m. liepos 16 d., 17 val. 20 min., § 19, 100 %, 100 proc., 23 °C, 5 000 EUR, 1 000 kg»; A.9.8 (no space before . ! ? : … , ;); A.9.9 (angular degrees closed up); Vilniaus universitetas ChGF, Kalbos patarimai (2021): nepertraukiamas tarpas for initials, units, currency and %; «53 €», «53 Eur»; A. Drukteinis (2020) p. 142 «33,00 mm»",
101
102
  "url": "http://www.laraneda.lt/failai/interinstitutional_translation_guide_lt.pdf",
102
103
  "note": "SECONDARY throughout (house styles; no norm of VLKK states a no-break rule). (1) beforePunctuation and narrowBeforePunctuation are empty: a stated negative (A.9.8; Drukteinis p. 9), not silence. (2) beforeUnits = %, proc., °C, kg, km, cm, mm, EUR, Eur, €, mln., val., min., m., d.: the no-break intent is stated (DGT A.9, VU), and km and cm are spaced in A.4.2.2; m. and d. are the year and day abbreviations of A.9.5 («2007 m. liepos 16 d.»), the same footing as bg «г.». DECISIONS: single-letter m (metre) and g are excluded, as in hr, sk, bg and sl; bare ° is not listed, since angular degrees are closed up; ‰ is not attested; vnt. and t. p. are not listed (form evidence only). (3) afterSymbols = §. (4) abbreviations = t. y., t. t., š. m., as named in A.9.4. (5) initialBinding = none: DGT A.9.4 and VU bind a single initial, but that is house style only and a rule on single initials collides at sentence boundaries; DECISION, MEDIUM. (6) afterShortWords is empty: no source binds į, ir, o, ar, su or iš, and DGT A.9.2–A.9.7 enumerates the no-break cases without them. beforeNumber and beforeWord are empty: decisions, not citations. Retrieved 2026-10-25."
104
+ },
105
+ {
106
+ "rule": "nbsp",
107
+ "cite": "Europos Komisija, Institucijų vertimo į lietuvių kalbą vadovas (2014), A.9.5, A.9.13, A.10.1: «100 %», «23 °C», «5 000 EUR», «1 000 kg», «Greitis – 100 km/h.», «vėjas 5–7 m/s»; Vilniaus universiteto Kalbos patarimai (2021): «1 ha – 53 Eur»",
108
+ "url": "http://www.laraneda.lt/failai/interinstitutional_translation_guide_lt.pdf",
109
+ "note": "%, proc., °C, kg, km, EUR, Eur, €, mln., val., min., km/h, m/s, ha in spacedUnits; m. and d. in beforeUnits (single-letter abbreviations, conversion only). Retrieved 2026-11-11."
103
110
  }
104
111
  ]
105
112
  }
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["prof. dr."],
39
- "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
39
+ "beforeUnits": ["°C", "km/h", "kWh"],
40
+ "spacedUnits": ["km", "cm", "mm", "kg"],
41
+ "closedUnits": ["%", "‰"],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": ["€", "$"],
@@ -77,7 +79,7 @@
77
79
  "rule": "nbsp",
78
80
  "cite": "Nederlandse Taalunie, Taaladvies.net, «Wel of geen spaties voor en na leestekens en symbolen (algemeen)» (12 mei 2021): «Vóór een punt, een komma, een dubbele punt, een puntkomma, een uitroepteken en een vraagteken komt geen spatie»; «Bij toevallige, niet-conventionele combinaties van een getal en een afgekorte eenheid […] komt er een spatie tussen het getal en de eenheid»; «Tussen een valutateken en het bijbehorende getal staat een spatie, tenzij het geheel deel uitmaakt van een samenstelling» — «De vaas kostte € 179,–»; BIPM, The International System of Units (SI), 9th ed., concise summary — uitsluitend voor de samenstelling van de symbolenlijst",
79
81
  "url": "https://taaladvies.net/wel-of-geen-spaties-voor-en-na-leestekens-en-symbolen-algemeen/",
80
- "note": "Drie velden uit één pagina. beforePunctuation en narrowBeforePunctuation leeg: alle zes leestekens worden bij name genoemd en krijgen geen spatie — een ontkenning, geen stilzwijgen. beforeUnits: BIPM levert welke reeksen SI-symbolen zijn, de Taalunie de Nederlandse conventie; eenletterige symbolen blijven weg zoals in fr.json. afterSymbols = [«€», «$»]: LET OP BIJ HET OVERNEMEN VAN fr.json — in het Nederlands gaat het valutateken aan het getal vooraf («€ 179»), in het Frans volgt het erop («2 €»), dus het hoort hier in afterSymbols en niet in beforeUnits. De twee leden zijn die welke het kopje «Valutatekens (€, $)» zelf noemt: een klasse-afleiding over een MET NAME GENOEMDE tweeledige klasse, gemarkeerd naar het voorbeeld van fr.json bij M., MM., Mmes. TOEGESTANE VARIANTEN, vastgelegd: voor het procentteken laat de Taalunie zowel «25 %» als «25%» toe, en bij °C schrijft zij dat er «meestal geen spatie» staat terwijl ISO er één voorschrijft. Dat hoeft niet beslecht te worden: N5 zet alleen een bestaande spatie om en voegt er nooit een in (nbsp.md §3.7). afterShortWords, beforeNumber en beforeWord zijn leeg: deze pagina loopt de leestekens en symbolen één voor één langs en zegt daarover niets, en het Nederlands kent geen tegenhanger van de Poolse sierotka-regel. Geraadpleegd op 18.09.2026."
82
+ "note": "Drie velden uit één pagina. beforePunctuation en narrowBeforePunctuation leeg: alle zes leestekens worden bij name genoemd en krijgen geen spatie — een ontkenning, geen stilzwijgen. beforeUnits: BIPM levert welke reeksen SI-symbolen zijn, de Taalunie de Nederlandse conventie; eenletterige symbolen blijven weg zoals in fr.json. afterSymbols = [«€», «$»]: LET OP BIJ HET OVERNEMEN VAN fr.json — in het Nederlands gaat het valutateken aan het getal vooraf («€ 179»), in het Frans volgt het erop («2 €»), dus het hoort hier in afterSymbols en niet in beforeUnits. De twee leden zijn die welke het kopje «Valutatekens (€, $)» zelf noemt: een klasse-afleiding over een MET NAME GENOEMDE tweeledige klasse, gemarkeerd naar het voorbeeld van fr.json bij M., MM., Mmes. TOEGESTANE VARIANTEN, vastgelegd: voor het procentteken laat de Taalunie zowel «25 %» als «25%» toe, en bij °C schrijft zij dat er «meestal geen spatie» staat terwijl ISO er één voorschrijft. Beslist op 11.11.2026: zie het item hieronder. afterShortWords, beforeNumber en beforeWord zijn leeg: deze pagina loopt de leestekens en symbolen één voor één langs en zegt daarover niets, en het Nederlands kent geen tegenhanger van de Poolse sierotka-regel. Geraadpleegd op 18.09.2026."
81
83
  },
82
84
  {
83
85
  "rule": "nbsp",
@@ -96,6 +98,12 @@
96
98
  "cite": "Nederlandse Taalunie, Taaladvies.net, « 'S avonds / 's Avonds (hoofdletter?) » (12 mei 2021, op grond van de Woordenlijst 2015) : « Als de zin met een apostrof begint, krijgt het eerstvolgende volledige woord in de zin de hoofdletter », met de voorbeelden « 's Avonds werkt John in een café », « 't Was een mooie dag » en « 'ns Kijken hoe we dat doen »",
97
99
  "url": "https://taaladvies.net/s-avonds-of-s-avonds-hoofdletter/",
98
100
  "note": "Attests s ('s avonds, from the older genitive des avonds), t ('t was) and ns ('ns kijken). The same entries cover 's-Gravenhage and 's-Hertogenbosch, where a hyphen rather than a space follows the letter run."
101
+ },
102
+ {
103
+ "rule": "nbsp",
104
+ "cite": "Nederlandse Taalunie, Taaladvies.net, «Wel of geen spaties voor en na leestekens en symbolen (algemeen)» (12 mei 2021): voor het procentteken is «25%» toegestaan («Daar is in niet-technische teksten geen bezwaar tegen»), de norm (NEN/NBN) schrijft «25 %",
105
+ "url": "https://taaladvies.net/wel-of-geen-spaties-voor-en-na-leestekens-en-symbolen-algemeen/",
106
+ "note": "%, ‰ in closedUnits: de bron laat beide vormen toe, en waar beide toegestaan zijn kiest polytypo de gesloten vorm zodat een tekst overal hetzelfde oogt (beslissing van de operator, 11.11.2026). km, cm, mm, kg in spacedUnits (Taalunie: «De afstand was 15 cm»). °C, km/h en kWh blijven in beforeUnits: de bron toont voor °C beide vormen zonder «geen bezwaar», km/h is niet bevestigd (nl: km/u) en kWh wordt niet genoemd. Samenstellingen blijven ongemoeid («de 15cm-norm», «de 37°C-grens»): dat is de rechtercontext van N5. Geraadpleegd op 11.11.2026."
99
107
  }
100
108
  ]
101
109
  }
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": ["a", "i", "o", "u", "w", "z"],
38
38
  "abbreviations": ["lek. med.", "inż. górn.", "bp sufr."],
39
- "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "km/h", "kWh"],
39
+ "beforeUnits": ["‰", "°C"],
40
+ "spacedUnits": ["km", "cm", "mm", "kg", "km/h", "kWh"],
41
+ "closedUnits": ["%"],
40
42
  "beforeNumber": [],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": ["§"],
@@ -89,13 +91,19 @@
89
91
  "rule": "nbsp",
90
92
  "cite": "Główny Urząd Miar, «Zasady stosowania oznaczeń i nazw jednostek miar», akapit «Spacja»: «należy zostawiać spację między wartością liczbową a oznaczeniem jednostki» (100 g, 2 L; ale nie: 100g); pkt 12: «pomiędzy [symbolem %] a wartością liczbową wielkości pozostawia się spację»; BIPM, The International System of Units (SI), 9th ed., concise summary — dla składu samej listy symboli",
91
93
  "url": "https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-concise-EN.pdf",
92
- "note": "Podział ról taki sam jak w en-US, fi, sv, es i pt: BIPM mówi, które łańcuchy są symbolami jednostek SI, a GUM i rozporządzenie — jaka jest polska konwencja odstępu. ZASTRZEŻENIE CO DO ŹRÓDŁA: dobór reguł w dokumencie GUM jest zawężony do towarów paczkowanych, natomiast akapit «Spacja» i pkt 12 powołują się na § 15 i § 8 ust. 4 rozporządzenia, które są prawem powszechnym. WARIANT DOPUSZCZALNY, odnotowany, bo dotyczy najczęstszego wpisu: polska tradycja ortotypograficzna pisze procent bez spacji, co Wolański («Jeszcze raz o spacji lub jej braku po znaku %», 26.11.2021) uznaje za równie poprawne. Rozbieżność nie wymaga rozstrzygnięcia: N5 wyłącznie ZAMIENIA istniejącą spację i nigdy jej nie wstawia (nbsp.md §3.7), więc «5 %» dostaje U+00A0, a «5%» zostaje nietknięte — jedna lista obsługuje obie poświadczone formy. Symbole jednoliterowe (m, g, l, s, A) pominięto zgodnie z praktyką fr.json. Konsultowano 18.09.2026."
94
+ "note": "Podział ról taki sam jak w en-US, fi, sv, es i pt: BIPM mówi, które łańcuchy są symbolami jednostek SI, a GUM i rozporządzenie — jaka jest polska konwencja odstępu. ZASTRZEŻENIE CO DO ŹRÓDŁA: dobór reguł w dokumencie GUM jest zawężony do towarów paczkowanych, natomiast akapit «Spacja» i pkt 12 powołują się na § 15 i § 8 ust. 4 rozporządzenia, które są prawem powszechnym. WARIANT DOPUSZCZALNY, odnotowany, bo dotyczy najczęstszego wpisu: polska tradycja ortotypograficzna pisze procent bez spacji, co Wolański («Jeszcze raz o spacji lub jej braku po znaku %», 26.11.2021) uznaje za równie poprawne. Rozstrzygnięcie (operator, 11.11.2026): «%» jest w closedUnits, patrz następny wpis. Symbole jednoliterowe (m, g, l, s, A) pominięto zgodnie z praktyką fr.json. Konsultowano 18.09.2026."
93
95
  },
94
96
  {
95
97
  "rule": "nbsp",
96
98
  "cite": "dr hab. Adam Wolański, Poradnia Językowa PWN, «Symbol paragrafu i wyróżnienia tytułów aktów prawnych» (20.02.2019): «Symbol §, zastępujący wyraz paragraf, może być użyty tylko przed liczbą zapisaną cyframi. Należy go oddzielać od liczby spacją»",
97
99
  "url": "https://sjp.pwn.pl/poradnia/haslo/Symbol-paragrafu-i-wyroznienia-tytulow-aktow-prawnych;19239.html",
98
100
  "note": "Uzasadnia afterSymbols = [«§»]. Warunek «tylko przed liczbą zapisaną cyframi» pokrywa się co do joty z własnym strażnikiem N6, który wymaga, by cp[a+k+1] należało do klasy DIGIT (nbsp.md §3.8). Poradnia jest źródłem doradczym; «Zasady» kwestii nie poruszają, więc nie ma sprzeczności. Konsultowano 18.09.2026."
101
+ },
102
+ {
103
+ "rule": "nbsp",
104
+ "cite": "Główny Urząd Miar, «Zasady stosowania oznaczeń i nazw jednostek miar» (2021): «Przykład: 5 % 0,5 % Ale nie: 5% 0,5%»; Adam Wolański, Poradnia Językowa PWN, «Jeszcze raz o spacji lub jej braku po znaku %» (26.11.2021): «za poprawny zapis należy uznać zarówno 38,4 % ± 3,4 %, jak i 38,4% ± 3,4%»; Mirosław Bańko, PWN, «procent i stopień Celsjusza» (18.7.2003): «Symbole % i °C piszemy bezpośrednio po liczbie»",
105
+ "url": "https://sjp.pwn.pl/poradnia/haslo/jeszcze-raz-o-spacji-lub-jej-braku-po-znaku-percent;21530.html",
106
+ "note": "% w closedUnits: źródła dopuszczają obie formy, a tam gdzie obie są dopuszczalne, locale wybiera formę łączną, żeby tekst wyglądał jednolicie (decyzja operatora, 11.11.2026). km, cm, mm, kg, km/h, kWh w spacedUnits (GUM: «100 g, 2 L ale nie: 100g»; Wolański: «5 km, 10 kg»). °C zostaje w beforeUnits: Bańko pisze łącznie, GUM i rozporządzenie ogólną regułą z odstępem. ‰ nie ma w polskim źródle i zostaje w beforeUnits. Sprawdzone 11.11.2026."
99
107
  }
100
108
  ]
101
109
  }
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["p. ex."],
39
- "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "kW", "kWh", "Hz"],
39
+ "beforeUnits": ["%", "‰"],
40
+ "spacedUnits": ["°C", "km", "cm", "mm", "kg", "kW", "kWh", "Hz"],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["p."],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -76,7 +78,7 @@
76
78
  "rule": "nbsp",
77
79
  "cite": "BIPM, The International System of Units (SI), 9.ª ed., resumo conciso: «A single space is always left between the number and the unit»; Código de Redação Interinstitucional (PT, 2022), anexo A3, pontos 2 e 3, para a lista de símbolos",
78
80
  "url": "https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-concise-EN.pdf",
79
- "note": "Justifica nbsp.beforeUnits. A locale atesta a PERTENÇA — que estes símbolos são unidades e que se escrevem depois do número com um espaço; o mecanismo (converter esse espaço em U+00A0, nunca o inserir) é da regra e está fixado em nbsp.md §2.1. REPARO CITADO, mais importante do que qualquer inclusão: o ponto 10.9.1 exclui «h» por nome — «horas (o símbolo «h» escreve-se sempre sem ponto, sem espaços): eram as 18h30» —, pelo que «h» NÃO entra na lista e há um caso de conformidade a fixá-lo. Os símbolos de uma só letra (m, g, l, t, s, A, W, V, K) ficam igualmente de fora, embora atestados, pela mesma razão que em fr: não são desambiguáveis sem contexto. Note-se que o português escreve «7 %» com espaço, ao contrário do grego. Consultado em 18.9.2026. Para pt-BR a lista é a mesma: nenhuma fonte brasileira consultada a contradiz, e o BIPM não é uma autoridade sobre o português mas sobre que cadeias são símbolos de unidade do SI."
81
+ "note": "Justifica nbsp.beforeUnits. A locale atesta a PERTENÇA — que estes símbolos são unidades e que se escrevem depois do número com um espaço; o mecanismo (converter esse espaço em U+00A0 e, nas listas spacedUnits, inseri-lo quando falta) é da regra e está fixado em nbsp.md §3.7. REPARO CITADO, mais importante do que qualquer inclusão: o ponto 10.9.1 exclui «h» por nome — «horas (o símbolo «h» escreve-se sempre sem ponto, sem espaços): eram as 18h30» —, pelo que «h» NÃO entra na lista e há um caso de conformidade a fixá-lo. Os símbolos de uma só letra (m, g, l, t, s, A, W, V, K) ficam igualmente de fora, embora atestados, pela mesma razão que em fr: não são desambiguáveis sem contexto. Note-se que o português escreve «7 %» com espaço, ao contrário do grego. Consultado em 18.9.2026. Para pt-BR a lista é a mesma: nenhuma fonte brasileira consultada a contradiz, e o BIPM não é uma autoridade sobre o português mas sobre que cadeias são símbolos de unidade do SI."
80
82
  },
81
83
  {
82
84
  "rule": "nbsp",
@@ -36,7 +36,9 @@
36
36
  "narrowBeforePunctuation": [],
37
37
  "afterShortWords": [],
38
38
  "abbreviations": ["p. ex."],
39
- "beforeUnits": ["%", "‰", "°C", "km", "cm", "mm", "kg", "kW", "kWh", "Hz"],
39
+ "beforeUnits": ["‰", "kWh"],
40
+ "spacedUnits": ["%", "°C", "km", "cm", "mm", "kg", "kW", "Hz"],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["p."],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],
@@ -75,9 +77,9 @@
75
77
  },
76
78
  {
77
79
  "rule": "nbsp",
78
- "cite": "Código de Redação Interinstitucional (PT, 2022), anexo A3 «Abreviaturas e símbolos», pontos 2 e 3, com as Observações «Todos os números são acompanhados dos respetivos símbolos: de 4 m em 4 m; de 1 kg, 6 kg a 15 kg», e Quarta parte, ponto 10.9.1: «As percentagens, pesos e medidas escrevem-se numericamente: 7 % do volume de negócios», «a temperatura atingiu hoje os 39 °C»; BIPM, The International System of Units (SI), 9.ª ed., resumo conciso: «A single space is always left between the number and the unit»",
80
+ "cite": "Código de Redação Interinstitucional (PT, 2022), anexo A3 «Abreviaturas e símbolos», pontos 2 e 3, com as Observações «Todos os números são acompanhados dos respetivos símbolos: de 4 m em 4 m; de 1 kg, 6 kg a 15 kg», e Quarta parte, ponto 10.9.1: «este montante equivale a 15 % da produção total», «a temperatura atingiu hoje os 39 °C»; BIPM, The International System of Units (SI), 9.ª ed., resumo conciso: «A single space is always left between the number and the unit»",
79
81
  "url": "https://www.bipm.org/documents/20126/41483022/SI-Brochure-9-concise-EN.pdf",
80
- "note": "Justifica nbsp.beforeUnits. A locale atesta a PERTENÇA — que estes símbolos são unidades e que se escrevem depois do número com um espaço; o mecanismo (converter esse espaço em U+00A0, nunca o inserir) é da regra e está fixado em nbsp.md §2.1. REPARO CITADO, mais importante do que qualquer inclusão: o ponto 10.9.1 exclui «h» por nome — «horas (o símbolo «h» escreve-se sempre sem ponto, sem espaços): eram as 18h30» —, pelo que «h» NÃO entra na lista e há um caso de conformidade a fixá-lo. Os símbolos de uma só letra (m, g, l, t, s, A, W, V, K) ficam igualmente de fora, embora atestados, pela mesma razão que em fr: não são desambiguáveis sem contexto. Note-se que o português escreve «7 %» com espaço, ao contrário do grego. Consultado em 18.9.2026."
82
+ "note": "Justifica nbsp.beforeUnits. A locale atesta a PERTENÇA — que estes símbolos são unidades e que se escrevem depois do número com um espaço; o mecanismo (converter esse espaço em U+00A0 e, nas listas spacedUnits, inseri-lo quando falta) é da regra e está fixado em nbsp.md §3.7. REPARO CITADO, mais importante do que qualquer inclusão: o ponto 10.9.1 exclui «h» por nome — «horas (o símbolo «h» escreve-se sempre sem ponto, sem espaços): eram as 18h30» —, pelo que «h» NÃO entra na lista e há um caso de conformidade a fixá-lo. Os símbolos de uma só letra (m, g, l, t, s, A, W, V, K) ficam igualmente de fora, embora atestados, pela mesma razão que em fr: não são desambiguáveis sem contexto. Note-se que o português escreve «7 %» com espaço, ao contrário do grego. Consultado em 18.9.2026."
81
83
  },
82
84
  {
83
85
  "rule": "nbsp",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.21.0",
2
+ "spec": "1.23.0",
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",
@@ -37,6 +37,8 @@
37
37
  "afterShortWords": [],
38
38
  "abbreviations": [],
39
39
  "beforeUnits": ["km", "kg", "cm", "mm", "km/h", "°C"],
40
+ "spacedUnits": [],
41
+ "closedUnits": [],
40
42
  "beforeNumber": ["art.", "nr."],
41
43
  "beforeWord": [],
42
44
  "afterSymbols": [],