polytypo 1.23.0 → 1.24.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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/polytypo/data/VERSION +1 -1
  3. data/lib/polytypo/data/fixtures/bg.json +1 -1
  4. data/lib/polytypo/data/fixtures/cs.json +1 -1
  5. data/lib/polytypo/data/fixtures/de-CH.json +1 -1
  6. data/lib/polytypo/data/fixtures/de-DE.json +1 -1
  7. data/lib/polytypo/data/fixtures/el.json +1 -1
  8. data/lib/polytypo/data/fixtures/en-GB.json +1 -1
  9. data/lib/polytypo/data/fixtures/en-US.json +105 -1
  10. data/lib/polytypo/data/fixtures/es.json +1 -1
  11. data/lib/polytypo/data/fixtures/fi.json +1 -1
  12. data/lib/polytypo/data/fixtures/fr-CA.json +1 -1
  13. data/lib/polytypo/data/fixtures/fr.json +1 -1
  14. data/lib/polytypo/data/fixtures/hr.json +1 -1
  15. data/lib/polytypo/data/fixtures/hu.json +1 -1
  16. data/lib/polytypo/data/fixtures/it.json +1 -1
  17. data/lib/polytypo/data/fixtures/locale-resolution.json +7 -1
  18. data/lib/polytypo/data/fixtures/lt.json +1 -1
  19. data/lib/polytypo/data/fixtures/lv.json +290 -0
  20. data/lib/polytypo/data/fixtures/nl.json +1 -1
  21. data/lib/polytypo/data/fixtures/pl.json +1 -1
  22. data/lib/polytypo/data/fixtures/pt-BR.json +1 -1
  23. data/lib/polytypo/data/fixtures/pt-PT.json +1 -1
  24. data/lib/polytypo/data/fixtures/ro.json +1 -1
  25. data/lib/polytypo/data/fixtures/ru.json +1 -1
  26. data/lib/polytypo/data/fixtures/sk.json +1 -1
  27. data/lib/polytypo/data/fixtures/sl.json +1 -1
  28. data/lib/polytypo/data/fixtures/sr.json +1 -1
  29. data/lib/polytypo/data/fixtures/sv.json +1 -1
  30. data/lib/polytypo/data/fixtures/tr.json +1 -1
  31. data/lib/polytypo/data/fixtures/uk.json +1 -1
  32. data/lib/polytypo/data/locales/lv.json +85 -0
  33. data/lib/polytypo/data/locales/registry.json +3 -2
  34. data/lib/polytypo/data/rules/modes.md +14 -1
  35. data/lib/polytypo/data/rules/order.json +1 -1
  36. data/lib/polytypo/version.rb +1 -1
  37. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf32a1fd59f440c4a84d20c8bfc7b060dedbe31ef49645157c7c6a9444de5ee2
4
- data.tar.gz: b5dbda1251e0ba0126e3c7c5434d499222043ffac43b54ceb3de59e522f3b9e8
3
+ metadata.gz: 1a765fbcce3a27a8b165b2907ec1def7de8fe8ce47802129b3ef9bed1bd440bd
4
+ data.tar.gz: 87df1625c45ba7c0af39ce16804c39a5e4e1c9b4eb1b41b94e2760f37379ba8e
5
5
  SHA512:
6
- metadata.gz: 6b4fbc155ef5232f02f6dae3e2a487d0ef538e51840f7d5d344f08734810553e66c9dcfba93838926e65c95e73a9c7d0aaf43342152bbc82c8423c479c9e84ac
7
- data.tar.gz: d8149021c09b493ed7cd2e77275e893898e1be9502856797a2e01d8c89eedae0b370681cb4e4e8e30dcc5333330bd666777bd1e6a730d881f209f7d53c632566
6
+ metadata.gz: 8afe0284a8bba1dea257e02fb2e3c26188ec8d5e4d0f4f94c24fece75578d4a0ffccbc48d5d3fecf8ce67c3585b8989d6de1fe6dbb3162ac8c2b6904a00d5492
7
+ data.tar.gz: 3ec86a334527d574e65b32f75e4b0b832d2ab61997444249326d7c8e13a1c603442cf80c7f2637c07ae2ae30f4dd190351dceb84b5c3c616243582a8fe183277
@@ -1 +1 @@
1
- 1.23.0
1
+ 1.24.0
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "bg",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "cs",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "de-CH",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "de-DE",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "el",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "en-GB",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "en-US",
4
4
  "cases": [
5
5
  {
@@ -5281,6 +5281,110 @@
5281
5281
  "rules": {
5282
5282
  "ranges": true
5283
5283
  }
5284
+ },
5285
+ {
5286
+ "id": "en-us-apostrophe-html-stray-end-tag-gap",
5287
+ "rule": "apostrophe",
5288
+ "mode": "html",
5289
+ "in": "<p>dogs'</span> bones</p>",
5290
+ "out": "<p>dogs’</span> bones</p>",
5291
+ "note": "modes.md §3.6: an end tag with no open element is markup; the run around it is two spans with a −1 between, so the apostrophe is word-final."
5292
+ },
5293
+ {
5294
+ "id": "en-us-apostrophe-html-stray-end-tag-no-parent",
5295
+ "rule": "apostrophe",
5296
+ "mode": "html",
5297
+ "in": "dogs'</span> bones",
5298
+ "out": "dogs’</span> bones",
5299
+ "note": "modes.md §3.6: the same at the document level, where the parser has no element at all."
5300
+ },
5301
+ {
5302
+ "id": "en-us-apostrophe-html-stray-end-tag-newline-in-tag",
5303
+ "rule": "apostrophe",
5304
+ "mode": "html",
5305
+ "in": "<p>dogs'</span\n> bones</p>",
5306
+ "out": "<p>dogs’</span\n> bones</p>",
5307
+ "note": "modes.md §3.6, §3.2: the apostrophe is word-final before either marker, so this pins only that the tag's own bytes are not edited; the marker is pinned by the dashes cases below."
5308
+ },
5309
+ {
5310
+ "id": "en-us-apostrophe-html-stray-body-start-tag",
5311
+ "rule": "apostrophe",
5312
+ "mode": "html",
5313
+ "in": "<p>dogs'<body class=\"a\"> bones</p>",
5314
+ "out": "<p>dogs’<body class=\"a\"> bones</p>",
5315
+ "note": "modes.md §3.6: a start tag the parser ignores (a second body) is markup too, and its attribute is untouched."
5316
+ },
5317
+ {
5318
+ "id": "en-us-apostrophe-html-empty-end-tag",
5319
+ "rule": "apostrophe",
5320
+ "mode": "html",
5321
+ "in": "<p>dogs'</> bones</p>",
5322
+ "out": "<p>dogs’</> bones</p>",
5323
+ "note": "modes.md §3.6: `</>` is dropped by the tokenizer but is still a tag in the source."
5324
+ },
5325
+ {
5326
+ "id": "en-us-quotes-html-stray-end-tag-single-pair",
5327
+ "rule": "quotes",
5328
+ "mode": "html",
5329
+ "in": "<p>say 'hi</span> there' ok</p>",
5330
+ "out": "<p>say “hi</span> there” ok</p>",
5331
+ "note": "modes.md §3.6: a pair opens and closes across an ignored tag, the boundary being a −1."
5332
+ },
5333
+ {
5334
+ "id": "en-us-quotes-html-stray-end-tag-attribute-quotes-untouched",
5335
+ "rule": "quotes",
5336
+ "mode": "html",
5337
+ "in": "<p>say \"a</span title=\"x y\"> b\" ok</p>",
5338
+ "out": "<p>say “a</span title=\"x y\"> b” ok</p>",
5339
+ "note": "modes.md §3.6: the quotes inside the ignored tag's attribute are source, never text."
5340
+ },
5341
+ {
5342
+ "id": "en-us-dashes-html-stray-end-tag-gap",
5343
+ "rule": "dashes",
5344
+ "mode": "html",
5345
+ "in": "<p>a - </span>b</p>",
5346
+ "out": "<p>a—</span>b</p>",
5347
+ "note": "modes.md §3.6, §3.2: the ignored end tag is a −1 gap, so the spaced hyphen is a dash."
5348
+ },
5349
+ {
5350
+ "id": "en-us-dashes-html-stray-end-tag-line-feed-in-tag",
5351
+ "rule": "dashes",
5352
+ "mode": "html",
5353
+ "in": "<p>a - </span\n>b</p>",
5354
+ "out": "<p>a - </span\n>b</p>",
5355
+ "note": "modes.md §3.2: the gap holds a line terminator inside the tag, so the marker is −2 and the spaced hyphen stays, exactly as beside a well-formed tag with a line feed in it."
5356
+ },
5357
+ {
5358
+ "id": "en-us-dashes-html-stray-end-tag-quoted-gt",
5359
+ "rule": "dashes",
5360
+ "mode": "html",
5361
+ "in": "<p>a - </span title=\"a>b\">c</p>",
5362
+ "out": "<p>a—</span title=\"a>b\">c</p>",
5363
+ "note": "modes.md §3.6: a `>` inside a quoted attribute value does not end the ignored tag."
5364
+ },
5365
+ {
5366
+ "id": "en-us-apostrophe-html-stray-html-start-tag",
5367
+ "rule": "apostrophe",
5368
+ "mode": "html",
5369
+ "in": "<p>dogs'<html lang=\"x\"> bones</p>",
5370
+ "out": "<p>dogs’<html lang=\"x\"> bones</p>",
5371
+ "note": "modes.md §3.6: a second html start tag is ignored by the parser and still markup."
5372
+ },
5373
+ {
5374
+ "id": "en-us-quotes-html-less-than-is-text",
5375
+ "rule": "quotes",
5376
+ "mode": "html",
5377
+ "in": "<p>say 'a < b' ok</p>",
5378
+ "out": "<p>say “a < b” ok</p>",
5379
+ "note": "modes.md §3.6: a `<` that begins no tag is text and the pair spans it."
5380
+ },
5381
+ {
5382
+ "id": "en-us-quotes-html-bogus-comment-gap",
5383
+ "rule": "quotes",
5384
+ "mode": "html",
5385
+ "in": "<p>say 'hi</ x> there' ok</p>",
5386
+ "out": "<p>say “hi</ x> there” ok</p>",
5387
+ "note": "modes.md §3.6: `</ x>` is a bogus comment, already markup, and the pair spans it."
5284
5388
  }
5285
5389
  ]
5286
5390
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "es",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "fi",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "fr-CA",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "fr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "hr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "hu",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "it",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "cases": [
4
4
  {
5
5
  "id": "exact-en-us",
@@ -288,6 +288,12 @@
288
288
  "tag": "tr-TR",
289
289
  "resolves": "tr",
290
290
  "note": "section 3.4 step 3a, and the tag a Turkish caller actually sends. tr needs no registry alias precisely because the region strip reaches it — this case is what makes that claim testable rather than asserted."
291
+ },
292
+ {
293
+ "id": "strip-lv-lv",
294
+ "tag": "lv-LV",
295
+ "resolves": "lv",
296
+ "note": "section 3.4 step 3a: the region strip reaches lv, which needs no registry alias."
291
297
  }
292
298
  ]
293
299
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "lt",
4
4
  "cases": [
5
5
  {
@@ -0,0 +1,290 @@
1
+ {
2
+ "spec": "1.24.0",
3
+ "locale": "lv",
4
+ "cases": [
5
+ {
6
+ "id": "lv-quotes-primary",
7
+ "rule": "quotes",
8
+ "mode": "text",
9
+ "in": "Viņš teica: \"jā\" un aizgāja.",
10
+ "out": "Viņš teica: “jā” un aizgāja.",
11
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) 7.2.3, p. 87: round marks, opener high U+201C, closer U+201D, no inner space (pinned pair; LVEK 14.05.2014 also permits a low opener but names no closer)."
12
+ },
13
+ {
14
+ "id": "lv-quotes-nested-same-pair",
15
+ "rule": "quotes",
16
+ "mode": "text",
17
+ "in": "Viņš teica: \"Es zinu, ka \"Pīlādzis\" ir laba grāmata.\"",
18
+ "out": "Viņš teica: “Es zinu, ka “Pīlādzis” ir laba grāmata.”",
19
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) I pielikums p. 117: a quotation or title inside a quotation takes double marks («dubultpēdiņas»); the same pair at both levels is the pin, not the source."
20
+ },
21
+ {
22
+ "id": "lv-quotes-nested-with-words",
23
+ "rule": "quotes",
24
+ "mode": "text",
25
+ "in": "Viņš teica: \"Tā ir 'citāta' no grāmatas\" un aizgāja.",
26
+ "out": "Viņš teica: “Tā ir “citāta” no grāmatas” un aizgāja.",
27
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 117: no single-mark nesting level; single straight inner quotes become the same U+201C/U+201D pair."
28
+ },
29
+ {
30
+ "id": "lv-quotes-before-question-mark",
31
+ "rule": "quotes",
32
+ "mode": "text",
33
+ "in": "Vai tiešām? \"Jā!\" viņš teica.",
34
+ "out": "Vai tiešām? “Jā!” viņš teica.",
35
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 117: a closing mark follows the sentence mark flush; innerSpace is none."
36
+ },
37
+ {
38
+ "id": "lv-quotes-already-typeset",
39
+ "rule": "quotes",
40
+ "mode": "text",
41
+ "in": "Viņš teica “jā” un aizgāja.",
42
+ "out": "Viņš teica “jā” un aizgāja.",
43
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 87: text already carrying U+201C/U+201D is a fixed point."
44
+ },
45
+ {
46
+ "id": "lv-quotes-low-open-input",
47
+ "rule": "quotes",
48
+ "mode": "text",
49
+ "in": "Viņš teica „jā” un aizgāja.",
50
+ "out": "Viņš teica “jā” un aizgāja.",
51
+ "note": "A low-opening pair typed by the author is normalised to the pinned pair; LVEK 14.05.2014 permits either opener but names no closer, so one pair is pinned."
52
+ },
53
+ {
54
+ "id": "lv-quotes-angle-input",
55
+ "rule": "quotes",
56
+ "mode": "text",
57
+ "in": "Viņš teica «jā» un aizgāja.",
58
+ "out": "Viņš teica “jā” un aizgāja.",
59
+ "note": "Angle quotes are attested only through Blinkena (2009) p. 398 as quoted in VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) fn. 50; they are normalised to the pinned pair."
60
+ },
61
+ {
62
+ "id": "lv-quotes-no-inner-space",
63
+ "rule": "quotes",
64
+ "mode": "text",
65
+ "in": "Viņš teica: \" jā \" un aizgāja.",
66
+ "out": "Viņš teica: “jā” un aizgāja.",
67
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 117: «Starp pēdiņām un tajās iekļauto tekstu atstarpes neliek.»"
68
+ },
69
+ {
70
+ "id": "lv-quotes-nest-at-end-declined",
71
+ "rule": "quotes",
72
+ "mode": "text",
73
+ "in": "Viņš teica: \"Tā ir 'citāta'\" un aizgāja.",
74
+ "out": "Viņš teica: \"Tā ir ’citāta'\" un aizgāja.",
75
+ "note": "ACCEPTED COST of the identical pair: a nest whose inner mark touches the outer one is declined (quotes.md §6, §3.2 V1); the inner apostrophe-shaped mark is left to the apostrophe rule."
76
+ },
77
+ {
78
+ "id": "lv-quotes-nest-at-start-declined",
79
+ "rule": "quotes",
80
+ "mode": "text",
81
+ "in": "Viņš teica: \"'Pīlādzis' ir\" un aizgāja.",
82
+ "out": "Viņš teica: \"'Pīlādzis’ ir\" un aizgāja.",
83
+ "note": "ACCEPTED COST of the identical pair: the nest opens against the outer opener, so it is declined (quotes.md §6, §3.2 V1)."
84
+ },
85
+ {
86
+ "id": "lv-ellipsis-three-dots",
87
+ "rule": "ellipsis",
88
+ "mode": "text",
89
+ "in": "Pagaidi... un tad.",
90
+ "out": "Pagaidi… un tad.",
91
+ "note": "Three dots become the ellipsis character."
92
+ },
93
+ {
94
+ "id": "lv-ellipsis-after-question",
95
+ "rule": "ellipsis",
96
+ "mode": "text",
97
+ "in": "Ko gan viņš pateiks?...",
98
+ "out": "Ko gan viņš pateiks?…",
99
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) I pielikums p. 122: «?...» keeps three dots, so abbreviatedAfterTerminal is false and the dots become the ellipsis character after the mark."
100
+ },
101
+ {
102
+ "id": "lv-ellipsis-after-exclamation",
103
+ "rule": "ellipsis",
104
+ "mode": "text",
105
+ "in": "Neesi mierā!...",
106
+ "out": "Neesi mierā!…",
107
+ "note": "abbreviatedAfterTerminal is false: no two-dot form after «!» is attested."
108
+ },
109
+ {
110
+ "id": "lv-dashes-parenthetical",
111
+ "rule": "dashes",
112
+ "mode": "text",
113
+ "in": "Viņš teica - protams - ka nāks.",
114
+ "out": "Viņš teica – protams – ka nāks.",
115
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) pp. 86, 114: en dash with a space on both sides."
116
+ },
117
+ {
118
+ "id": "lv-dashes-em-input",
119
+ "rule": "dashes",
120
+ "mode": "text",
121
+ "in": "Tas — protams — labi.",
122
+ "out": "Tas – protams – labi.",
123
+ "note": "LVEK 10.09.2014 prot. Nr. 36 5. §: «latviešu valodā nelieto garo jeb dubulto domuzīmi (—)»; an em dash is normalised to the en dash."
124
+ },
125
+ {
126
+ "id": "lv-dashes-existing-en",
127
+ "rule": "dashes",
128
+ "mode": "text",
129
+ "in": "Dēls – meita atnāca.",
130
+ "out": "Dēls – meita atnāca.",
131
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 86: an en dash already in place is a fixed point."
132
+ },
133
+ {
134
+ "id": "lv-ranges-digits-tight",
135
+ "rule": "ranges",
136
+ "mode": "text",
137
+ "in": "1999-2000 un 30-35 gadi",
138
+ "out": "1999⁠–⁠2000 un 30⁠–⁠35 gadi",
139
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 86: «30–35 gadi», en dash, no spaces; the en-tight form carries U+2060 either side (ranges.md §3).",
140
+ "rules": {
141
+ "ranges": true
142
+ }
143
+ },
144
+ {
145
+ "id": "lv-ranges-already-tight",
146
+ "rule": "ranges",
147
+ "mode": "text",
148
+ "in": "2001–2006",
149
+ "out": "2001–2006",
150
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 114: «(1899–1915)» is a fixed point (ranges.md §3).",
151
+ "rules": {
152
+ "ranges": true
153
+ }
154
+ },
155
+ {
156
+ "id": "lv-ranges-word-hyphen-untouched",
157
+ "rule": "ranges",
158
+ "mode": "text",
159
+ "in": "jūnijs-augusts",
160
+ "out": "jūnijs-augusts",
161
+ "note": "A hyphen between words is not a range (ranges.md §2).",
162
+ "rules": {
163
+ "ranges": true
164
+ }
165
+ },
166
+ {
167
+ "id": "lv-hyphen-noop",
168
+ "rule": "hyphen",
169
+ "mode": "text",
170
+ "in": "Rīga-Jūrmala",
171
+ "out": "Rīga-Jūrmala",
172
+ "note": "The hyphen lists are empty: no closed list of unbreakable hyphenated forms is attested."
173
+ },
174
+ {
175
+ "id": "lv-nbsp-units",
176
+ "rule": "nbsp",
177
+ "mode": "text",
178
+ "in": "10 % un 21 € un 5 EUR un 3 km un -8 °C",
179
+ "out": "10 % un 21 € un 5 EUR un 3 km un -8 °C",
180
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89: «5 km, 25 t, 10 %, 21 €, –8 °C»; LVEK 12.03.2014 prot. Nr. 33 2. §: currency goes after the sum with a bound space."
181
+ },
182
+ {
183
+ "id": "lv-nbsp-single-letter-unit-inert",
184
+ "rule": "nbsp",
185
+ "mode": "text",
186
+ "in": "5 m un 3 g un 25 t",
187
+ "out": "5 m un 3 g un 25 t",
188
+ "note": "Single-letter m, g and t are not listed by DECISION, although «25 t» is attested on p. 89: they are also common words."
189
+ },
190
+ {
191
+ "id": "lv-nbsp-abbreviations",
192
+ "rule": "nbsp",
193
+ "mode": "text",
194
+ "in": "Tas ir, piemēram, u. c. un u. tml. un š. g. rudenī",
195
+ "out": "Tas ir, piemēram, u. c. un u. tml. un š. g. rudenī",
196
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89: «dažos saīsinājumos (u. c., u. tml., š. g.)»."
197
+ },
198
+ {
199
+ "id": "lv-nbsp-before-number",
200
+ "rule": "nbsp",
201
+ "mode": "text",
202
+ "in": "Nr. 20 un nr. 5",
203
+ "out": "Nr. 20 un nr. 5",
204
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89: «Nr. 20» binds; the only lowercase example of «nr.» stands after the number («155. nr.»), so it is not listed and stays as typed."
205
+ },
206
+ {
207
+ "id": "lv-nbsp-initial-binds",
208
+ "rule": "nbsp",
209
+ "mode": "text",
210
+ "in": "J. Kalniņš un A. Bērziņš",
211
+ "out": "J. Kalniņš un A. Bērziņš",
212
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89 «starp iniciāli un uzvārdu (J. Kalniņš)»; LVEK 10.09.2014 prot. Nr. 36 5. §: a bound space after an initial (initialBinding single)."
213
+ },
214
+ {
215
+ "id": "lv-nbsp-initials-chain",
216
+ "rule": "nbsp",
217
+ "mode": "text",
218
+ "in": "J. K. Bērziņš atnāca.",
219
+ "out": "J. K. Bērziņš atnāca.",
220
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89; LVEK prot. Nr. 36 5. §: the sources state the single-initial rule; binding within a run of initials is nbsp.md §3.9 behaviour."
221
+ },
222
+ {
223
+ "id": "lv-nbsp-initial-sentence-boundary",
224
+ "rule": "nbsp",
225
+ "mode": "text",
226
+ "in": "Es izvēlējos plānu B. Tad aizgāju.",
227
+ "out": "Es izvēlējos plānu B. Tad aizgāju.",
228
+ "note": "ACCEPTED COST of initialBinding = single: a lone capital before a full stop is read as an initial even at a sentence boundary (nbsp.md §3.9, §7.9a), the price of binding «J. // Kalniņš»."
229
+ },
230
+ {
231
+ "id": "lv-nbsp-short-words-inert",
232
+ "rule": "nbsp",
233
+ "mode": "text",
234
+ "in": "uz mājām un ar draugu",
235
+ "out": "uz mājām un ar draugu",
236
+ "note": "afterShortWords is empty: no source binds un, ar, uz or no."
237
+ },
238
+ {
239
+ "id": "lv-nbsp-bare-degree-closed",
240
+ "rule": "nbsp",
241
+ "mode": "text",
242
+ "in": "15°",
243
+ "out": "15°",
244
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 89 fn. 54: the bare degree sign is closed up."
245
+ },
246
+ {
247
+ "id": "lv-nbsp-spaced-unit-inserted",
248
+ "rule": "nbsp",
249
+ "mode": "text",
250
+ "in": "Value 50% here",
251
+ "out": "Value 50 % here",
252
+ "note": "spec 1.22.0, nbsp.md §3.7: the unit is in spacedUnits, so the missing space is inserted as U+00A0."
253
+ },
254
+ {
255
+ "id": "lv-spaces-brackets",
256
+ "rule": "spaces",
257
+ "mode": "text",
258
+ "in": "Viņš ( klusi ) aizgāja .",
259
+ "out": "Viņš (klusi) aizgāja.",
260
+ "note": "Spaces inside brackets and before a full stop are removed."
261
+ },
262
+ {
263
+ "id": "lv-symbols-copyright",
264
+ "rule": "symbols",
265
+ "mode": "text",
266
+ "in": "(c) 2026",
267
+ "out": "© 2026",
268
+ "note": "(c) becomes the copyright sign."
269
+ },
270
+ {
271
+ "id": "lv-apostrophe-foreign-name",
272
+ "rule": "apostrophe",
273
+ "mode": "text",
274
+ "in": "O'Brien atnāca.",
275
+ "out": "O’Brien atnāca.",
276
+ "note": "A straight apostrophe in a name becomes U+2019."
277
+ },
278
+ {
279
+ "id": "lv-quote-punctuation-none",
280
+ "rule": "quote-punctuation",
281
+ "mode": "text",
282
+ "in": "alfa “beta”, gamma",
283
+ "out": "alfa “beta”, gamma",
284
+ "note": "VVC, Tiesību aktu tulkošanas rokasgrāmata (2021) p. 117: placement depends on context, so punctuationPlacement is none and the rule leaves the text alone.",
285
+ "rules": {
286
+ "quote-punctuation": true
287
+ }
288
+ }
289
+ ]
290
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "nl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "pl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "pt-BR",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "pt-PT",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "ro",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "ru",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "sk",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "sl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "sr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "sv",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "tr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "locale": "uk",
4
4
  "cases": [
5
5
  {
@@ -0,0 +1,85 @@
1
+ {
2
+ "locale": "lv",
3
+ "name": "Latvian",
4
+ "quotes": {
5
+ "primary": {
6
+ "open": "“",
7
+ "close": "”",
8
+ "innerSpace": "none"
9
+ },
10
+ "secondary": {
11
+ "open": "“",
12
+ "close": "”",
13
+ "innerSpace": "none"
14
+ },
15
+ "punctuationPlacement": "none",
16
+ "elisionIdioms": [],
17
+ "elisionClitics": {
18
+ "before": [],
19
+ "after": []
20
+ }
21
+ },
22
+ "dash": {
23
+ "parenthetical": "en-spaced",
24
+ "range": "en-tight"
25
+ },
26
+ "ellipsis": {
27
+ "abbreviatedAfterTerminal": false
28
+ },
29
+ "hyphen": {
30
+ "prefixes": [],
31
+ "suffixes": [],
32
+ "compounds": []
33
+ },
34
+ "nbsp": {
35
+ "beforePunctuation": [],
36
+ "narrowBeforePunctuation": [],
37
+ "afterShortWords": [],
38
+ "abbreviations": ["u. c.", "u. tml.", "š. g."],
39
+ "beforeUnits": [],
40
+ "spacedUnits": ["%", "€", "EUR", "km", "°C"],
41
+ "closedUnits": [],
42
+ "beforeNumber": ["Nr."],
43
+ "beforeWord": [],
44
+ "afterSymbols": [],
45
+ "initialBinding": "single"
46
+ },
47
+ "sources": [
48
+ {
49
+ "rule": "quotes",
50
+ "cite": "Valsts valodas centrs, Latviešu valodas ekspertu komisija, «Svarīgākie lēmumi 2014. gadā», 14.05.2014, protokols Nr. 34 3. §: «no valodas prakses viedokļa ir pareizs atverošo pēdiņu novietojums gan apakšā („) gan augšā (“), tomēr vienā tekstā konsekventi lietojams viens variants»; Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021), 7.2.3 «Pēdiņas», p. 87: «centra tulkojumos lietojam apaļās pēdiņas (“”) … Centra tulkojumu praksē atvērējpēdiņas liekam augšā»; I pielikums p. 117: «Ja tiešajā runā vai citātā ir iekļauts cita runātāja teksts, cits citāts vai nosaukums (virsraksts), lietojamas dubultpēdiņas.»; «Starp pēdiņām un tajās iekļauto tekstu atstarpes neliek.»; «Ja pēdiņās ietvertā daļa ir teikuma (vai frāzes) beigās, pieturzīmi liek aiz pēdiņām»",
51
+ "url": "https://vvc.gov.lv/lv/media/149/download",
52
+ "note": "PICK-AND-PIN. LVEK accepts opening U+201E or U+201C in one text and names no closing mark, so a low-opening pair has no attested closer. The only complete pair attested is the VVC house style U+201C…U+201D (code points read from the PDF text layer of the handbook, HIGH); it is pinned, not claimed as the only legal Latvian form. « » is attested only through Blinkena (2009) p. 398, as quoted in handbook fn. 50; the book was not read. Secondary equals primary (p. 117: double marks for a quotation inside a quotation; single marks ‘’ only for cultivar names and glosses, p. 88). ACCEPTED COST of the identical pair: a nest whose inner mark touches the outer one is declined (quotes.md §6, §3.2 V1), pinned by fixtures. innerSpace none for both. punctuationPlacement none: placement depends on context (p. 117, p. 87). elisionIdioms and elisionClitics empty: apostrophe elision exists (p. 121) but no closed set. Handbook: https://vvc.gov.lv/lv/media/62/download (house style, SECONDARY). Retrieved 2026-11-14."
53
+ },
54
+ {
55
+ "rule": "dashes",
56
+ "cite": "Valsts valodas centrs, LVEK, «Svarīgākie lēmumi 2014. gadā», 10.09.2014, protokols Nr. 36 5. §: «latviešu valodā nelieto garo jeb dubulto domuzīmi (—)»; Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021), p. 86: «domuzīmi (–) (Alt + 0150)», «liekot to savrupinātās daļas abās pusēs»; p. 114: «Domuzīmi no pārējā teksta atdala ar atstarpēm abās pusēs.»",
57
+ "url": "https://vvc.gov.lv/lv/media/149/download",
58
+ "note": "dash.parenthetical = en-spaced (U+0020 U+2013 U+0020). The exclusion of U+2014 is NORMATIVE (LVEK); width U+2013 from Alt 0150 and the spacing from the VVC handbook (SECONDARY, HIGH). Retrieved 2026-11-14. Handbook: https://vvc.gov.lv/lv/media/62/download."
59
+ },
60
+ {
61
+ "rule": "ranges",
62
+ "cite": "Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021), p. 86: «Prievārda “līdz” vietā (ja saistāmie jēdzieni ir rakstīti ar cipariem) izmanto vienotājdomuzīmi, un to ar atstarpēm neatdala. 2005.–2007. gada plāns; viņa vecums varēja būt 30–35 gadi»; I pielikums p. 114: «(1899–1915)»",
63
+ "url": "https://vvc.gov.lv/lv/media/62/download",
64
+ "note": "dash.range = en-tight (U+2013, no spaces). SECONDARY (VVC house style), HIGH. Ordinal-dotted ranges such as «2005.–2007.» are not range candidates (the flank is U+002E): an algorithm limit, not data. The ranges rule is off by default. Retrieved 2026-11-14."
65
+ },
66
+ {
67
+ "rule": "ellipsis",
68
+ "cite": "Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021), I pielikums «Jautājuma zīme», p. 122: «kopā ar daudzpunkti, lai pavēstītu par lielāku pauzi, kas sekos (Ko gan viņš visu tur nepiedzīvos?...)»",
69
+ "url": "https://vvc.gov.lv/lv/media/62/download",
70
+ "note": "abbreviatedAfterTerminal = false: the handbook writes «?...» with three dots (read from a page image). One house-style example, MEDIUM; no source read reduces the dots after ? or ! (the handbook's «Divpunkte», pp. 88 and 118, is a different mark: two dots for an omission), so the three dots become the ellipsis character. Retrieved 2026-11-14."
71
+ },
72
+ {
73
+ "rule": "hyphen",
74
+ "cite": "Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021), p. 87 «Defise» and I pielikums p. 115 «Defise»",
75
+ "url": "https://vvc.gov.lv/lv/media/62/download",
76
+ "note": "All three lists are empty: uses of the hyphen are described, but no closed list of unbreakable hyphenated forms is given. Retrieved 2026-11-14."
77
+ },
78
+ {
79
+ "rule": "nbsp",
80
+ "cite": "Valsts valodas centrs, LVEK, «Svarīgākie lēmumi 2014. gadā», 12.03.2014, prot. Nr. 33 2. §: valūtu nosaukumus, kodus un grafiskos simbolus «norādīt aiz summas ar saistīto atstarpi, piemēram: … 1 234 EUR; 5678,90 $»; Valsts valodas centrs, Tiesību aktu tulkošanas rokasgrāmata (2021; https://vvc.gov.lv/lv/media/62/download), p. 89 «Atstarpes»: «5 km, 25 t, 10 %, 21 €, –8 °C»; «dažos saīsinājumos (u. c., u. tml., š. g.)»; «starp saīsinājumu Nr., nr. un skaitli (Nr. 20, 155. nr.)»; «starp iniciāli un uzvārdu (J. Kalniņš)»; pp. 107–124 «… un iepriekšējo burtu vai ciparu atstarpi neliek»; p. 78 §7.1.13 (currency)",
81
+ "url": "https://vvc.gov.lv/lv/media/149/download",
82
+ "note": "Currency after the sum is NORMATIVE (LVEK 12.03.2014 prot. Nr. 33 2. §, restated in the handbook p. 78 §7.1.13); the rest is VVC house style, called «vēlams» and bounded by a warning against overuse (p. 89), SECONDARY. Handbook: https://vvc.gov.lv/lv/media/62/download. (1) beforePunctuation and narrowBeforePunctuation empty: a stated negative, «… un iepriekšējo burtu vai ciparu atstarpi neliek» for . , : ; ? ! and the apostrophe (pp. 107–124). (2) spacedUnits: % and km and °C from p. 89 (and p. 88 «15 %»), € from pp. 78 and 89, EUR from LVEK («1 234 EUR») and p. 78. Not listed though attested, by DECISION: $ (LVEK «5678,90 $»), £, ¥, USD, GBP (p. 78) and °F (fn. 54); no closed set is stated. Single-letter t, m and g are excluded by DECISION although «25 t» is attested on p. 89: they are also common words. kg and cm are not listed because no read source spaces them. A bare ° is closed up (fn. 54) and not listed; closedUnits is empty. (3) abbreviations = u. c., u. tml., š. g. (p. 89). (4) beforeNumber = Nr. only (p. 89 «Nr. 20», p. 88, p. 119); the only lowercase example of «nr.» stands after the number («155. nr.»), which N5 cannot express, so it is not listed. (5) initialBinding = single: LVEK 10.09.2014 prot. Nr. 36 5. § («pēc datuma un iniciāļa norādes lietojama saistītā atstarpe») and p. 89 («starp iniciāli un uzvārdu (J. Kalniņš)») state the rule for one initial, so «chain» would leave the cited rule unmet. ACCEPTED COST, as in fr, cs and ro: a lone capital before a full stop is read as an initial even at a sentence boundary (nbsp.md §3.9, §7.9a). (6) afterShortWords, beforeUnits, beforeWord and afterSymbols empty: no source binds un, ar, uz or no, and § is written after its number («3. §», p. 85). Not expressible and so not covered: binding after a dotted ordinal («2018. gada», «4. stāvs», «155. nr.», p. 89), after a date (LVEK), and inside digit groups («10 000»). Retrieved 2026-11-14."
83
+ }
84
+ ]
85
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.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",
@@ -28,7 +28,8 @@
28
28
  "hr",
29
29
  "sr",
30
30
  "sl",
31
- "lt"
31
+ "lt",
32
+ "lv"
32
33
  ],
33
34
  "aliases": {
34
35
  "en": "en-US",
@@ -19,7 +19,7 @@ step 9 with §3.8.5's content-line condition, added in 1.10.0, §3.8.4's carriag
19
19
  continuation line with the bails of §3.8.6 that use it, added in 1.11.0, and §3.8.4's node lines,
20
20
  declined keys, node markers and own-line region, with the changes to steps 1, 3, 4, 5, 6, 7 and 8
21
21
  that go with them, added in 1.11.0, and §3.9 with the amendments it carries to §3.1, §3.5 step 2,
22
- §4, §5, §7 item 7 and §8, added in 1.13.0, and §3.4's delimiter-neighbour rule with §3.7.3's autolink-literal tail, terminator guard and reference labels, and the amendments they carry to §3.4's deletion paragraph, §5 items 2 and 3, its fifth-part note and testing obligation, and §6, added in 1.17.2, and §3.4's escape-and-reference rule with the amendments it carries to §3.6, §3.7.3, §5 item 2's fifth-part note, §5 item 3 and the testing obligation, added in 1.17.4, and §3.4's bracket-shape rule, added in 1.17.5, and §3.6's whitespace-only text node rule, added in 1.23.0).
22
+ §4, §5, §7 item 7 and §8, added in 1.13.0, and §3.4's delimiter-neighbour rule with §3.7.3's autolink-literal tail, terminator guard and reference labels, and the amendments they carry to §3.4's deletion paragraph, §5 items 2 and 3, its fifth-part note and testing obligation, and §6, added in 1.17.2, and §3.4's escape-and-reference rule with the amendments it carries to §3.6, §3.7.3, §5 item 2's fifth-part note, §5 item 3 and the testing obligation, added in 1.17.4, and §3.4's bracket-shape rule, added in 1.17.5, and §3.6's whitespace-only text node rule, added in 1.23.0, and §3.6's ignored-tag rule, added in 1.23.1).
23
23
 
24
24
  ---
25
25
 
@@ -558,6 +558,19 @@ Skipped, exhaustively and exactly:
558
558
  `<p>b</p>`) is now left alone, exactly as `text` mode leaves it between two line feeds,
559
559
  where before 1.23.0 it became a dash.
560
560
 
561
+ - **every tag is markup, including one the parser ignores** (since 1.23.1): a start or end tag
562
+ that opens or closes nothing (`</span>` with no open `span`, a second `<body>` or `<html>`, `</>`)
563
+ is still a tag in the source, so its code points lie outside every span, whatever the parser did
564
+ with it. A parser that merges the text on either side of an ignored tag into one text node
565
+ (`parse5` does) does not change that: the runtime splits the run around the tag, and the gap
566
+ between the two spans carries the tag's raw source, so §3.2 chooses the marker from it: −1, or
567
+ −2 when that gap holds a line terminator, whether inside the tag itself (`</span` followed by a
568
+ line feed and `>`) or in a whitespace-only run beside it (above). A tag extends as the WHATWG
569
+ tokenizer delimits it, so `>` inside a quoted attribute value does not end it. `dogs'</span> bones` is the span `dogs'`,
570
+ a −1, and the span ` bones`, so the apostrophe is word-final before a boundary and becomes
571
+ U+2019, as it does before a well-formed `</i>`. A `<` that begins no tag (`a < b`, `</ x>` read
572
+ as a comment) is unchanged: text stays text, and a bogus comment is already a comment.
573
+
561
574
  **Element names compare case-insensitively**, per HTML: `<CODE>`, `<Code>` and `<code>` are all
562
575
  skipped. (In MDX, JSX names compare case-sensitively — §3.7.3.)
563
576
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.24.0",
3
3
  "$comment": "Single source of truth for pipeline order. Rules run in ascending `order`. Disabling a rule removes it from the sequence and never reorders the rest. Rule ids are public API (see docs/ARCHITECTURE.md section 5). \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
4
4
  "rules": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polytypo
4
- VERSION = "1.23.0"
4
+ VERSION = "1.24.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytypo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.0
4
+ version: 1.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iurii Rogulia
@@ -56,6 +56,7 @@ files:
56
56
  - lib/polytypo/data/fixtures/it.json
57
57
  - lib/polytypo/data/fixtures/locale-resolution.json
58
58
  - lib/polytypo/data/fixtures/lt.json
59
+ - lib/polytypo/data/fixtures/lv.json
59
60
  - lib/polytypo/data/fixtures/nl.json
60
61
  - lib/polytypo/data/fixtures/pl.json
61
62
  - lib/polytypo/data/fixtures/pt-BR.json
@@ -83,6 +84,7 @@ files:
83
84
  - lib/polytypo/data/locales/hu.json
84
85
  - lib/polytypo/data/locales/it.json
85
86
  - lib/polytypo/data/locales/lt.json
87
+ - lib/polytypo/data/locales/lv.json
86
88
  - lib/polytypo/data/locales/nl.json
87
89
  - lib/polytypo/data/locales/pl.json
88
90
  - lib/polytypo/data/locales/pt-BR.json