polytypo 1.20.0 → 1.21.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.
- checksums.yaml +4 -4
- data/lib/polytypo/data/VERSION +1 -1
- data/lib/polytypo/data/fixtures/bg.json +12 -1
- data/lib/polytypo/data/fixtures/cs.json +12 -1
- data/lib/polytypo/data/fixtures/de-CH.json +12 -1
- data/lib/polytypo/data/fixtures/de-DE.json +12 -1
- data/lib/polytypo/data/fixtures/el.json +12 -1
- data/lib/polytypo/data/fixtures/en-GB.json +12 -1
- data/lib/polytypo/data/fixtures/en-US.json +403 -1
- data/lib/polytypo/data/fixtures/es.json +12 -1
- data/lib/polytypo/data/fixtures/fi.json +12 -1
- data/lib/polytypo/data/fixtures/fr-CA.json +12 -1
- data/lib/polytypo/data/fixtures/fr.json +12 -1
- data/lib/polytypo/data/fixtures/hr.json +12 -1
- data/lib/polytypo/data/fixtures/hu.json +12 -1
- data/lib/polytypo/data/fixtures/it.json +12 -1
- data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
- data/lib/polytypo/data/fixtures/lt.json +12 -1
- data/lib/polytypo/data/fixtures/nl.json +12 -1
- data/lib/polytypo/data/fixtures/pl.json +12 -1
- data/lib/polytypo/data/fixtures/pt-BR.json +12 -1
- data/lib/polytypo/data/fixtures/pt-PT.json +12 -1
- data/lib/polytypo/data/fixtures/ro.json +12 -1
- data/lib/polytypo/data/fixtures/ru.json +12 -1
- data/lib/polytypo/data/fixtures/sk.json +12 -1
- data/lib/polytypo/data/fixtures/sl.json +12 -1
- data/lib/polytypo/data/fixtures/sr.json +12 -1
- data/lib/polytypo/data/fixtures/sv.json +12 -1
- data/lib/polytypo/data/fixtures/tr.json +12 -1
- data/lib/polytypo/data/fixtures/uk.json +12 -1
- data/lib/polytypo/data/locales/bg.json +1 -0
- data/lib/polytypo/data/locales/cs.json +1 -0
- data/lib/polytypo/data/locales/de-CH.json +6 -0
- data/lib/polytypo/data/locales/de-DE.json +7 -0
- data/lib/polytypo/data/locales/el.json +1 -0
- data/lib/polytypo/data/locales/en-GB.json +7 -0
- data/lib/polytypo/data/locales/en-US.json +7 -0
- data/lib/polytypo/data/locales/es.json +1 -0
- data/lib/polytypo/data/locales/fi.json +1 -0
- data/lib/polytypo/data/locales/fr-CA.json +1 -0
- data/lib/polytypo/data/locales/fr.json +1 -0
- data/lib/polytypo/data/locales/hr.json +1 -0
- data/lib/polytypo/data/locales/hu.json +1 -0
- data/lib/polytypo/data/locales/it.json +1 -0
- data/lib/polytypo/data/locales/lt.json +1 -0
- data/lib/polytypo/data/locales/nl.json +1 -0
- data/lib/polytypo/data/locales/pl.json +1 -0
- data/lib/polytypo/data/locales/pt-BR.json +1 -0
- data/lib/polytypo/data/locales/pt-PT.json +1 -0
- data/lib/polytypo/data/locales/registry.json +1 -1
- data/lib/polytypo/data/locales/ro.json +1 -0
- data/lib/polytypo/data/locales/ru.json +1 -0
- data/lib/polytypo/data/locales/sk.json +1 -0
- data/lib/polytypo/data/locales/sl.json +1 -0
- data/lib/polytypo/data/locales/sr.json +2 -1
- data/lib/polytypo/data/locales/sv.json +1 -0
- data/lib/polytypo/data/locales/tr.json +1 -0
- data/lib/polytypo/data/locales/uk.json +1 -0
- data/lib/polytypo/data/rules/order.json +9 -1
- data/lib/polytypo/data/rules/pipeline-idempotency.md +23 -3
- data/lib/polytypo/data/rules/quote-punctuation.md +334 -0
- data/lib/polytypo/data/rules/quotes.md +9 -0
- data/lib/polytypo/data/schema/fixtures.schema.json +1 -0
- data/lib/polytypo/data/schema/locale.schema.json +12 -1
- data/lib/polytypo/engine/locale.rb +22 -1
- data/lib/polytypo/engine/pipeline.rb +1 -1
- data/lib/polytypo/engine/rules/quote_punctuation.rb +79 -0
- data/lib/polytypo/engine/rules.rb +1 -0
- data/lib/polytypo/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3efff1325f70a9a596b97fb50bd750cd8eda11c77889144d4065fc793f3ee9f0
|
|
4
|
+
data.tar.gz: c1f54484e3e851c05697ad401ede83852862ffca60a09a9cc3c056f771d82588
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2de242466a5d8574db226adeffb2fe3997d42e7bfd37f588491583024e60a5f56b25ff49fa82b648ddac92ffd7320aa00f158f55499561f684cab517a1660e74
|
|
7
|
+
data.tar.gz: 1f2deb60d153872a60c2225ca52e6d71bb81d0e04539d6fa9aab694f49e2921645cae5018d8d3e86831a13a410c37f1f04ce91a012cedf4cf8c9bab13c57f9f5
|
data/lib/polytypo/data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.21.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "bg",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -248,6 +248,17 @@
|
|
|
248
248
|
"in": "Това е McDonald's",
|
|
249
249
|
"out": "Това е McDonald’s",
|
|
250
250
|
"note": "apostrophe rule, locale-neutral."
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "bg-quote-punctuation-none",
|
|
254
|
+
"rule": "quote-punctuation",
|
|
255
|
+
"mode": "text",
|
|
256
|
+
"in": "alpha „beta“, gamma",
|
|
257
|
+
"out": "alpha „beta“, gamma",
|
|
258
|
+
"rules": {
|
|
259
|
+
"quote-punctuation": true
|
|
260
|
+
},
|
|
261
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for bg, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
251
262
|
}
|
|
252
263
|
]
|
|
253
264
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "cs",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -156,6 +156,17 @@
|
|
|
156
156
|
"in": "Šel do McDonald's a zpět",
|
|
157
157
|
"out": "Šel do McDonald’s a zpět",
|
|
158
158
|
"note": "Pravidlo apostrophe nečte data locale: U+0027 mezi písmeny se stane U+2019. V téže větě je vidět N3, které váže spojku «a» k následujícímu slovu — dvě nezávislá pravidla na jednom řádku."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "cs-quote-punctuation-none",
|
|
162
|
+
"rule": "quote-punctuation",
|
|
163
|
+
"mode": "text",
|
|
164
|
+
"in": "alpha „beta“, gamma",
|
|
165
|
+
"out": "alpha „beta“, gamma",
|
|
166
|
+
"rules": {
|
|
167
|
+
"quote-punctuation": true
|
|
168
|
+
},
|
|
169
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for cs, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
159
170
|
}
|
|
160
171
|
]
|
|
161
172
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "de-CH",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -504,6 +504,17 @@
|
|
|
504
504
|
"in": "die Zeitung l'\"Express\"",
|
|
505
505
|
"out": "die Zeitung l’«Express»",
|
|
506
506
|
"note": "apostrophe.md §3.3 case 3a (spec 1.2.0): `quotes` gives de-CH's « », and the elision before « converts."
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"id": "de-ch-quote-punctuation-none",
|
|
510
|
+
"rule": "quote-punctuation",
|
|
511
|
+
"mode": "text",
|
|
512
|
+
"in": "alpha «beta», gamma",
|
|
513
|
+
"out": "alpha «beta», gamma",
|
|
514
|
+
"rules": {
|
|
515
|
+
"quote-punctuation": true
|
|
516
|
+
},
|
|
517
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for de-CH, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
507
518
|
}
|
|
508
519
|
]
|
|
509
520
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "de-DE",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -846,6 +846,17 @@
|
|
|
846
846
|
}
|
|
847
847
|
],
|
|
848
848
|
"note": "modes.md §3.9.3: the same pairing in a locale whose glyphs differ in shape."
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"id": "de-de-quote-punctuation-none",
|
|
852
|
+
"rule": "quote-punctuation",
|
|
853
|
+
"mode": "text",
|
|
854
|
+
"in": "alpha „beta“, gamma",
|
|
855
|
+
"out": "alpha „beta“, gamma",
|
|
856
|
+
"rules": {
|
|
857
|
+
"quote-punctuation": true
|
|
858
|
+
},
|
|
859
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for de-DE, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
849
860
|
}
|
|
850
861
|
]
|
|
851
862
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "el",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -284,6 +284,17 @@
|
|
|
284
284
|
"in": "η εφημερίδα l'\"Humanité\"",
|
|
285
285
|
"out": "η εφημερίδα l’«Humanité»",
|
|
286
286
|
"note": "apostrophe.md §3.3 case 3a (spec 1.2.0): `quotes` gives el's « », and the elision before « converts."
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "el-quote-punctuation-none",
|
|
290
|
+
"rule": "quote-punctuation",
|
|
291
|
+
"mode": "text",
|
|
292
|
+
"in": "alpha «beta», gamma",
|
|
293
|
+
"out": "alpha «beta», gamma",
|
|
294
|
+
"rules": {
|
|
295
|
+
"quote-punctuation": true
|
|
296
|
+
},
|
|
297
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for el, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
287
298
|
}
|
|
288
299
|
]
|
|
289
300
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "en-GB",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -1934,6 +1934,17 @@
|
|
|
1934
1934
|
"in": "- [ ] item and a , b.\n",
|
|
1935
1935
|
"out": "- [ ] item and a, b.\n",
|
|
1936
1936
|
"note": "modes.md §3.4 bracket-shape rule: collapsing two spaces between the brackets to one would make an unchecked task-list marker out of literal text; that edit is discarded."
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"id": "en-gb-quote-punctuation-none",
|
|
1940
|
+
"rule": "quote-punctuation",
|
|
1941
|
+
"mode": "text",
|
|
1942
|
+
"in": "She said \"hello\", then left.",
|
|
1943
|
+
"out": "She said ‘hello’, then left.",
|
|
1944
|
+
"rules": {
|
|
1945
|
+
"quote-punctuation": true
|
|
1946
|
+
},
|
|
1947
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for en-GB (Oxford places the mark by whether it belongs to the quotation, which a scan cannot decide), so enabling the rule changes nothing; `quotes` alone converts the glyphs and the comma stays outside."
|
|
1937
1948
|
}
|
|
1938
1949
|
]
|
|
1939
1950
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "en-US",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -4347,6 +4347,408 @@
|
|
|
4347
4347
|
"in": "- [ ] item and a , b.\n",
|
|
4348
4348
|
"out": "- [ ] item and a, b.\n",
|
|
4349
4349
|
"note": "modes.md §3.4 bracket-shape rule: collapsing two spaces between the brackets to one would make an unchecked task-list marker out of literal text; that edit is discarded."
|
|
4350
|
+
},
|
|
4351
|
+
{
|
|
4352
|
+
"id": "en-us-quote-punctuation-comma-then-space",
|
|
4353
|
+
"rule": "quote-punctuation",
|
|
4354
|
+
"mode": "text",
|
|
4355
|
+
"in": "She said \"hello\", then left.",
|
|
4356
|
+
"out": "She said “hello,” then left.",
|
|
4357
|
+
"rules": {
|
|
4358
|
+
"quote-punctuation": true
|
|
4359
|
+
},
|
|
4360
|
+
"note": "quote-punctuation.md §3.2, §6 row 1: C1-C4 hold, so the comma moves inside the mark `quotes` produced."
|
|
4361
|
+
},
|
|
4362
|
+
{
|
|
4363
|
+
"id": "en-us-quote-punctuation-full-stop-then-space",
|
|
4364
|
+
"rule": "quote-punctuation",
|
|
4365
|
+
"mode": "text",
|
|
4366
|
+
"in": "He called it \"done\". Then he left.",
|
|
4367
|
+
"out": "He called it “done.” Then he left.",
|
|
4368
|
+
"rules": {
|
|
4369
|
+
"quote-punctuation": true
|
|
4370
|
+
},
|
|
4371
|
+
"note": "quote-punctuation.md §3.2, §6 row 2: a full stop followed by a space moves inside; the space stays where it was."
|
|
4372
|
+
},
|
|
4373
|
+
{
|
|
4374
|
+
"id": "en-us-quote-punctuation-full-stop-end-of-text",
|
|
4375
|
+
"rule": "quote-punctuation",
|
|
4376
|
+
"mode": "text",
|
|
4377
|
+
"in": "Call it \"ready\".",
|
|
4378
|
+
"out": "Call it “ready.”",
|
|
4379
|
+
"rules": {
|
|
4380
|
+
"quote-punctuation": true
|
|
4381
|
+
},
|
|
4382
|
+
"note": "quote-punctuation.md §3.2 C4, §6 row 3: the end of the text is NONE, which satisfies C4."
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
"id": "en-us-quote-punctuation-full-stop-before-newline",
|
|
4386
|
+
"rule": "quote-punctuation",
|
|
4387
|
+
"mode": "text",
|
|
4388
|
+
"in": "Call it \"ready\".\nNext",
|
|
4389
|
+
"out": "Call it “ready.”\nNext",
|
|
4390
|
+
"rules": {
|
|
4391
|
+
"quote-punctuation": true
|
|
4392
|
+
},
|
|
4393
|
+
"note": "quote-punctuation.md §3.2 C4, §6 row 4: a line break is SPACELIKE."
|
|
4394
|
+
},
|
|
4395
|
+
{
|
|
4396
|
+
"id": "en-us-quote-punctuation-two-quotations",
|
|
4397
|
+
"rule": "quote-punctuation",
|
|
4398
|
+
"mode": "text",
|
|
4399
|
+
"in": "The \"first\", the \"second\".",
|
|
4400
|
+
"out": "The “first,” the “second.”",
|
|
4401
|
+
"rules": {
|
|
4402
|
+
"quote-punctuation": true
|
|
4403
|
+
},
|
|
4404
|
+
"note": "quote-punctuation.md §3.2, §6 row 5: two independent edits in one text."
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
"id": "en-us-quote-punctuation-complete-sentence",
|
|
4408
|
+
"rule": "quote-punctuation",
|
|
4409
|
+
"mode": "text",
|
|
4410
|
+
"in": "\"Go home\".",
|
|
4411
|
+
"out": "“Go home.”",
|
|
4412
|
+
"rules": {
|
|
4413
|
+
"quote-punctuation": true
|
|
4414
|
+
},
|
|
4415
|
+
"note": "quote-punctuation.md §1, §6 row 6: a quotation that is a complete sentence is not treated differently — the rule is positional and never asks what the punctuation belongs to."
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
"id": "en-us-quote-punctuation-comma-end-of-text",
|
|
4419
|
+
"rule": "quote-punctuation",
|
|
4420
|
+
"mode": "text",
|
|
4421
|
+
"in": "He said \"no\",",
|
|
4422
|
+
"out": "He said “no,”",
|
|
4423
|
+
"rules": {
|
|
4424
|
+
"quote-punctuation": true
|
|
4425
|
+
},
|
|
4426
|
+
"note": "quote-punctuation.md §3.2 C4: the comma is the last code point of the text."
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
"id": "en-us-quote-punctuation-list-of-quotations",
|
|
4430
|
+
"rule": "quote-punctuation",
|
|
4431
|
+
"mode": "text",
|
|
4432
|
+
"in": "Both \"a\", \"b\" and \"c\".",
|
|
4433
|
+
"out": "Both “a,” “b” and “c.”",
|
|
4434
|
+
"rules": {
|
|
4435
|
+
"quote-punctuation": true
|
|
4436
|
+
},
|
|
4437
|
+
"note": "quote-punctuation.md §6 row 7: the middle quotation has no punctuation to move and is left alone."
|
|
4438
|
+
},
|
|
4439
|
+
{
|
|
4440
|
+
"id": "en-us-quote-punctuation-dialogue-tag",
|
|
4441
|
+
"rule": "quote-punctuation",
|
|
4442
|
+
"mode": "text",
|
|
4443
|
+
"in": "\"Hello\", he said.",
|
|
4444
|
+
"out": "“Hello,” he said.",
|
|
4445
|
+
"rules": {
|
|
4446
|
+
"quote-punctuation": true
|
|
4447
|
+
},
|
|
4448
|
+
"note": "quote-punctuation.md §6: the usual dialogue shape, comma before the speech tag."
|
|
4449
|
+
},
|
|
4450
|
+
{
|
|
4451
|
+
"id": "en-us-quote-punctuation-already-inside",
|
|
4452
|
+
"rule": "quote-punctuation",
|
|
4453
|
+
"mode": "text",
|
|
4454
|
+
"in": "She said “hello,” then left.",
|
|
4455
|
+
"out": "She said “hello,” then left.",
|
|
4456
|
+
"rules": {
|
|
4457
|
+
"quote-punctuation": true
|
|
4458
|
+
},
|
|
4459
|
+
"note": "quote-punctuation.md §6 row 8: input already in the target form; cp[i+1] is a space, so nothing is a candidate."
|
|
4460
|
+
},
|
|
4461
|
+
{
|
|
4462
|
+
"id": "en-us-quote-punctuation-unpaired-closing-mark",
|
|
4463
|
+
"rule": "quote-punctuation",
|
|
4464
|
+
"mode": "text",
|
|
4465
|
+
"in": "Broken pair”, then",
|
|
4466
|
+
"out": "Broken pair,” then",
|
|
4467
|
+
"rules": {
|
|
4468
|
+
"quote-punctuation": true
|
|
4469
|
+
},
|
|
4470
|
+
"note": "quote-punctuation.md §6 row 9, accepted cost: the rule trusts the glyph, not the pairing, so a stray curly closing mark moves its comma too."
|
|
4471
|
+
},
|
|
4472
|
+
{
|
|
4473
|
+
"id": "en-us-quote-punctuation-after-terminal",
|
|
4474
|
+
"rule": "quote-punctuation",
|
|
4475
|
+
"mode": "text",
|
|
4476
|
+
"in": "\"Stop!\".",
|
|
4477
|
+
"out": "“Stop!”.",
|
|
4478
|
+
"rules": {
|
|
4479
|
+
"quote-punctuation": true
|
|
4480
|
+
},
|
|
4481
|
+
"note": "quote-punctuation.md §3.2 C3, §6 row 10: the code point left of the mark is `!`, not a letter; the duplicate stop is not removed."
|
|
4482
|
+
},
|
|
4483
|
+
{
|
|
4484
|
+
"id": "en-us-quote-punctuation-after-ellipsis-glyph",
|
|
4485
|
+
"rule": "quote-punctuation",
|
|
4486
|
+
"mode": "text",
|
|
4487
|
+
"in": "It said \"wait…\".",
|
|
4488
|
+
"out": "It said “wait…”.",
|
|
4489
|
+
"rules": {
|
|
4490
|
+
"quote-punctuation": true
|
|
4491
|
+
},
|
|
4492
|
+
"note": "quote-punctuation.md §3.2 C3, §6 row 11: the code point left of the mark is U+2026."
|
|
4493
|
+
},
|
|
4494
|
+
{
|
|
4495
|
+
"id": "en-us-quote-punctuation-after-abbreviation-stop",
|
|
4496
|
+
"rule": "quote-punctuation",
|
|
4497
|
+
"mode": "text",
|
|
4498
|
+
"in": "Use \"e.g.\", then",
|
|
4499
|
+
"out": "Use “e.g.”, then",
|
|
4500
|
+
"rules": {
|
|
4501
|
+
"quote-punctuation": true
|
|
4502
|
+
},
|
|
4503
|
+
"note": "quote-punctuation.md §3.2 C3, §6 row 12: whether the stop belongs to the abbreviation cannot be decided here, so a stop on the left declines."
|
|
4504
|
+
},
|
|
4505
|
+
{
|
|
4506
|
+
"id": "en-us-quote-punctuation-after-digit",
|
|
4507
|
+
"rule": "quote-punctuation",
|
|
4508
|
+
"mode": "text",
|
|
4509
|
+
"in": "\"Route 66\".",
|
|
4510
|
+
"out": "“Route 66”.",
|
|
4511
|
+
"rules": {
|
|
4512
|
+
"quote-punctuation": true
|
|
4513
|
+
},
|
|
4514
|
+
"note": "quote-punctuation.md §3.2 C3, §6 row 13: a digit on the left declines (the shape of an inch mark and of a quoted number)."
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
"id": "en-us-quote-punctuation-nested-quotation",
|
|
4518
|
+
"rule": "quote-punctuation",
|
|
4519
|
+
"mode": "text",
|
|
4520
|
+
"in": "\"He said 'hi'\".",
|
|
4521
|
+
"out": "“He said ‘hi’”.",
|
|
4522
|
+
"rules": {
|
|
4523
|
+
"quote-punctuation": true
|
|
4524
|
+
},
|
|
4525
|
+
"note": "quote-punctuation.md §3.2 C3, §6 row 14: the code point left of the primary close is the secondary close U+2019; accepted miss."
|
|
4526
|
+
},
|
|
4527
|
+
{
|
|
4528
|
+
"id": "en-us-quote-punctuation-other-punctuation",
|
|
4529
|
+
"rule": "quote-punctuation",
|
|
4530
|
+
"mode": "text",
|
|
4531
|
+
"in": "Say \"a\"; say \"b\": say \"c\"?",
|
|
4532
|
+
"out": "Say “a”; say “b”: say “c”?",
|
|
4533
|
+
"rules": {
|
|
4534
|
+
"quote-punctuation": true
|
|
4535
|
+
},
|
|
4536
|
+
"note": "quote-punctuation.md §3.2 C2, §6 row 15: only the comma and the full stop are ever moved."
|
|
4537
|
+
},
|
|
4538
|
+
{
|
|
4539
|
+
"id": "en-us-quote-punctuation-letter-follows",
|
|
4540
|
+
"rule": "quote-punctuation",
|
|
4541
|
+
"mode": "text",
|
|
4542
|
+
"in": "\"file\".txt",
|
|
4543
|
+
"out": "“file”.txt",
|
|
4544
|
+
"rules": {
|
|
4545
|
+
"quote-punctuation": true
|
|
4546
|
+
},
|
|
4547
|
+
"note": "quote-punctuation.md §3.2 C4, §6 row 16: a letter after the stop declines."
|
|
4548
|
+
},
|
|
4549
|
+
{
|
|
4550
|
+
"id": "en-us-quote-punctuation-bracket-follows",
|
|
4551
|
+
"rule": "quote-punctuation",
|
|
4552
|
+
"mode": "text",
|
|
4553
|
+
"in": "He said (\"hi\".)",
|
|
4554
|
+
"out": "He said (“hi”.)",
|
|
4555
|
+
"rules": {
|
|
4556
|
+
"quote-punctuation": true
|
|
4557
|
+
},
|
|
4558
|
+
"note": "quote-punctuation.md §3.2 C4, §6 row 17: a bracket after the stop declines."
|
|
4559
|
+
},
|
|
4560
|
+
{
|
|
4561
|
+
"id": "en-us-quote-punctuation-three-dots-follow",
|
|
4562
|
+
"rule": "quote-punctuation",
|
|
4563
|
+
"mode": "text",
|
|
4564
|
+
"in": "He said \"wait\"...",
|
|
4565
|
+
"out": "He said “wait”…",
|
|
4566
|
+
"rules": {
|
|
4567
|
+
"quote-punctuation": true
|
|
4568
|
+
},
|
|
4569
|
+
"note": "quote-punctuation.md §3.2 C2, §6 row 18: `ellipsis` runs first and turns the three dots into U+2026, which is not a comma or a full stop."
|
|
4570
|
+
},
|
|
4571
|
+
{
|
|
4572
|
+
"id": "en-us-quote-punctuation-secondary-close-apostrophe",
|
|
4573
|
+
"rule": "quote-punctuation",
|
|
4574
|
+
"mode": "text",
|
|
4575
|
+
"in": "Check the dogs’, bowls and cats.",
|
|
4576
|
+
"out": "Check the dogs’, bowls and cats.",
|
|
4577
|
+
"rules": {
|
|
4578
|
+
"quote-punctuation": true
|
|
4579
|
+
},
|
|
4580
|
+
"note": "quote-punctuation.md §2 QP-1, §6 row 19: U+2019 is the secondary close and the apostrophe glyph; the scan keys on the primary close only."
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
"id": "en-us-quote-punctuation-default-off",
|
|
4584
|
+
"rule": "quote-punctuation",
|
|
4585
|
+
"mode": "text",
|
|
4586
|
+
"in": "She said \"hello\", then left.",
|
|
4587
|
+
"out": "She said “hello”, then left.",
|
|
4588
|
+
"note": "quote-punctuation.md §4, §6 row 20: no `rules` override, so the rule is off and the comma stays where the author typed it."
|
|
4589
|
+
},
|
|
4590
|
+
{
|
|
4591
|
+
"id": "en-us-quote-punctuation-html-one-text-node",
|
|
4592
|
+
"rule": "quote-punctuation",
|
|
4593
|
+
"mode": "html",
|
|
4594
|
+
"in": "<p>She said \"hello\", then left.</p>",
|
|
4595
|
+
"out": "<p>She said “hello,” then left.</p>",
|
|
4596
|
+
"rules": {
|
|
4597
|
+
"quote-punctuation": true
|
|
4598
|
+
},
|
|
4599
|
+
"note": "quote-punctuation.md §3.3, §6 row H1: mark, comma and the text around them are in one span."
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
"id": "en-us-quote-punctuation-html-boundary-right",
|
|
4603
|
+
"rule": "quote-punctuation",
|
|
4604
|
+
"mode": "html",
|
|
4605
|
+
"in": "<p>She said <em>\"hello\"</em>, then left.</p>",
|
|
4606
|
+
"out": "<p>She said <em>“hello”</em>, then left.</p>",
|
|
4607
|
+
"rules": {
|
|
4608
|
+
"quote-punctuation": true
|
|
4609
|
+
},
|
|
4610
|
+
"note": "quote-punctuation.md §3.3, §6 row H2: a marker sits at cp[i+1], so C2 fails; the comma stays outside."
|
|
4611
|
+
},
|
|
4612
|
+
{
|
|
4613
|
+
"id": "en-us-quote-punctuation-html-boundary-left",
|
|
4614
|
+
"rule": "quote-punctuation",
|
|
4615
|
+
"mode": "html",
|
|
4616
|
+
"in": "<p>She said \"<em>hello</em>\", then left.</p>",
|
|
4617
|
+
"out": "<p>She said “<em>hello</em>”, then left.</p>",
|
|
4618
|
+
"rules": {
|
|
4619
|
+
"quote-punctuation": true
|
|
4620
|
+
},
|
|
4621
|
+
"note": "quote-punctuation.md §3.3, §6 row H3: a marker sits at cp[i-1], so C3 fails."
|
|
4622
|
+
},
|
|
4623
|
+
{
|
|
4624
|
+
"id": "en-us-quote-punctuation-html-inline-boundary",
|
|
4625
|
+
"rule": "quote-punctuation",
|
|
4626
|
+
"mode": "html",
|
|
4627
|
+
"in": "<p>She said \"hello\".</p><p>Next.</p>",
|
|
4628
|
+
"out": "<p>She said “hello”.</p><p>Next.</p>",
|
|
4629
|
+
"rules": {
|
|
4630
|
+
"quote-punctuation": true
|
|
4631
|
+
},
|
|
4632
|
+
"note": "quote-punctuation.md §3.3, §6 row H5, accepted cost: the gap between the paragraphs is a -1 marker at cp[i+2], so C4 fails."
|
|
4633
|
+
},
|
|
4634
|
+
{
|
|
4635
|
+
"id": "en-us-quote-punctuation-markdown-commonmark-one-span",
|
|
4636
|
+
"rule": "quote-punctuation",
|
|
4637
|
+
"mode": "markdown",
|
|
4638
|
+
"dialect": "commonmark",
|
|
4639
|
+
"in": "She said \"hello\", then left.\n",
|
|
4640
|
+
"out": "She said “hello,” then left.\n",
|
|
4641
|
+
"rules": {
|
|
4642
|
+
"quote-punctuation": true
|
|
4643
|
+
},
|
|
4644
|
+
"note": "quote-punctuation.md §3.3, §6 row M1: mark, comma and the text around them are in one span."
|
|
4645
|
+
},
|
|
4646
|
+
{
|
|
4647
|
+
"id": "en-us-quote-punctuation-markdown-commonmark-emphasis-boundary",
|
|
4648
|
+
"rule": "quote-punctuation",
|
|
4649
|
+
"mode": "markdown",
|
|
4650
|
+
"dialect": "commonmark",
|
|
4651
|
+
"in": "*She said \"hello\"*, then left.\n",
|
|
4652
|
+
"out": "*She said “hello”*, then left.\n",
|
|
4653
|
+
"rules": {
|
|
4654
|
+
"quote-punctuation": true
|
|
4655
|
+
},
|
|
4656
|
+
"note": "quote-punctuation.md §3.3, §6 row M2: the closing emphasis delimiter is a boundary between the mark and the comma, so C2 fails."
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
"id": "en-us-quote-punctuation-markdown-commonmark-boundary-after-stop",
|
|
4660
|
+
"rule": "quote-punctuation",
|
|
4661
|
+
"mode": "markdown",
|
|
4662
|
+
"dialect": "commonmark",
|
|
4663
|
+
"in": "*He said \"hi\".* Next\n",
|
|
4664
|
+
"out": "*He said “hi”.* Next\n",
|
|
4665
|
+
"rules": {
|
|
4666
|
+
"quote-punctuation": true
|
|
4667
|
+
},
|
|
4668
|
+
"note": "quote-punctuation.md §3.3, §6 row M3, accepted cost: a boundary at cp[i+2] fails C4."
|
|
4669
|
+
},
|
|
4670
|
+
{
|
|
4671
|
+
"id": "en-us-quote-punctuation-yaml-plain-scalar",
|
|
4672
|
+
"rule": "quote-punctuation",
|
|
4673
|
+
"mode": "yaml",
|
|
4674
|
+
"keys": [
|
|
4675
|
+
"title"
|
|
4676
|
+
],
|
|
4677
|
+
"in": "title: She said \"hello\", then left.\n",
|
|
4678
|
+
"out": "title: She said “hello,” then left.\n",
|
|
4679
|
+
"rules": {
|
|
4680
|
+
"quote-punctuation": true
|
|
4681
|
+
},
|
|
4682
|
+
"note": "quote-punctuation.md §3.3, §6 row Y1: a processable plain scalar is one span."
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
"id": "en-us-quote-punctuation-protect-after",
|
|
4686
|
+
"rule": "quote-punctuation",
|
|
4687
|
+
"mode": "text",
|
|
4688
|
+
"in": "Set \"file\".${ext} now",
|
|
4689
|
+
"protect": [
|
|
4690
|
+
{
|
|
4691
|
+
"start": 11,
|
|
4692
|
+
"end": 17
|
|
4693
|
+
}
|
|
4694
|
+
],
|
|
4695
|
+
"out": "Set “file”.${ext} now",
|
|
4696
|
+
"protectOut": [
|
|
4697
|
+
{
|
|
4698
|
+
"start": 11,
|
|
4699
|
+
"end": 17
|
|
4700
|
+
}
|
|
4701
|
+
],
|
|
4702
|
+
"rules": {
|
|
4703
|
+
"quote-punctuation": true
|
|
4704
|
+
},
|
|
4705
|
+
"note": "quote-punctuation.md §3.3, §6 row P1: the protected run is a boundary marker at cp[i+2], so C4 fails (modes.md §3.9.3)."
|
|
4706
|
+
},
|
|
4707
|
+
{
|
|
4708
|
+
"id": "en-us-quote-punctuation-protect-before",
|
|
4709
|
+
"rule": "quote-punctuation",
|
|
4710
|
+
"mode": "text",
|
|
4711
|
+
"in": "Use \"${name}\", then stop.",
|
|
4712
|
+
"protect": [
|
|
4713
|
+
{
|
|
4714
|
+
"start": 5,
|
|
4715
|
+
"end": 12
|
|
4716
|
+
}
|
|
4717
|
+
],
|
|
4718
|
+
"out": "Use “${name}”, then stop.",
|
|
4719
|
+
"protectOut": [
|
|
4720
|
+
{
|
|
4721
|
+
"start": 5,
|
|
4722
|
+
"end": 12
|
|
4723
|
+
}
|
|
4724
|
+
],
|
|
4725
|
+
"rules": {
|
|
4726
|
+
"quote-punctuation": true
|
|
4727
|
+
},
|
|
4728
|
+
"note": "quote-punctuation.md §3.3, §6 row P2: the protected run is a boundary marker at cp[i-1], so C3 fails."
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
"id": "en-us-quote-punctuation-protect-elsewhere",
|
|
4732
|
+
"rule": "quote-punctuation",
|
|
4733
|
+
"mode": "text",
|
|
4734
|
+
"in": "Say \"hi\", then ${x}.",
|
|
4735
|
+
"protect": [
|
|
4736
|
+
{
|
|
4737
|
+
"start": 15,
|
|
4738
|
+
"end": 19
|
|
4739
|
+
}
|
|
4740
|
+
],
|
|
4741
|
+
"out": "Say “hi,” then ${x}.",
|
|
4742
|
+
"protectOut": [
|
|
4743
|
+
{
|
|
4744
|
+
"start": 15,
|
|
4745
|
+
"end": 19
|
|
4746
|
+
}
|
|
4747
|
+
],
|
|
4748
|
+
"rules": {
|
|
4749
|
+
"quote-punctuation": true
|
|
4750
|
+
},
|
|
4751
|
+
"note": "quote-punctuation.md §3.3, §6 row P3: the hole is clear of the pair; the edit is length-preserving, so protectOut equals protect."
|
|
4350
4752
|
}
|
|
4351
4753
|
]
|
|
4352
4754
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "es",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -469,6 +469,17 @@
|
|
|
469
469
|
"in": "Copyright (c) 2026, tamaño 40x60 cm",
|
|
470
470
|
"out": "Copyright © 2026, tamaño 40×60 cm",
|
|
471
471
|
"note": "symbols.md: «(c)» pasa a U+00A9 y la «x» entre cifras a U+00D7. El U+00A0 ante «cm» lo pone nbsp N5, no symbols; se deja en el mismo caso porque así se ve que las dos reglas componen."
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"id": "es-quote-punctuation-none",
|
|
475
|
+
"rule": "quote-punctuation",
|
|
476
|
+
"mode": "text",
|
|
477
|
+
"in": "alpha «beta», gamma",
|
|
478
|
+
"out": "alpha «beta», gamma",
|
|
479
|
+
"rules": {
|
|
480
|
+
"quote-punctuation": true
|
|
481
|
+
},
|
|
482
|
+
"note": "quote-punctuation.md §2, §6: quotes.punctuationPlacement is \"none\" for es, so enabling the rule is a no-op; the input is already in the locale's own quotation marks."
|
|
472
483
|
}
|
|
473
484
|
]
|
|
474
485
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "fi",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -1317,6 +1317,17 @@
|
|
|
1317
1317
|
"in": "lehti l'\"Humanité\"",
|
|
1318
1318
|
"out": "lehti l’”Humanité”",
|
|
1319
1319
|
"note": "apostrophe.md §3.3 cases 3 and 3a (spec 1.2.0): fi opens and closes with U+201D, which is in CLOSEISH, so case 3 already converted this before 1.2.0. Pinned so that case 3a is not read as changing a shared-glyph locale."
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"id": "fi-quote-punctuation-none",
|
|
1323
|
+
"rule": "quote-punctuation",
|
|
1324
|
+
"mode": "text",
|
|
1325
|
+
"in": "alpha ”beta”, gamma",
|
|
1326
|
+
"out": "alpha ”beta”, gamma",
|
|
1327
|
+
"rules": {
|
|
1328
|
+
"quote-punctuation": true
|
|
1329
|
+
},
|
|
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."
|
|
1320
1331
|
}
|
|
1321
1332
|
]
|
|
1322
1333
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"spec": "1.
|
|
2
|
+
"spec": "1.21.0",
|
|
3
3
|
"locale": "fr-CA",
|
|
4
4
|
"cases": [
|
|
5
5
|
{
|
|
@@ -320,6 +320,17 @@
|
|
|
320
320
|
"in": "Il dit 'l'<em>idée</em> est bonne.' Fin.",
|
|
321
321
|
"out": "Il dit « l’<em>idée</em> est bonne. » Fin.",
|
|
322
322
|
"note": "quotes.md §3.2's span-boundary elision veto (spec 1.4.0), on the identical OQLF citation fr carries — the OQLF is Quebec's own authority, so for fr-CA the evidence is direct rather than a substitute. No retrieved source states any France/Quebec divergence on elision, so the two lists are identical."
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"id": "fr-ca-quote-punctuation-none",
|
|
326
|
+
"rule": "quote-punctuation",
|
|
327
|
+
"mode": "text",
|
|
328
|
+
"in": "alpha « beta », gamma",
|
|
329
|
+
"out": "alpha « beta », gamma",
|
|
330
|
+
"rules": {
|
|
331
|
+
"quote-punctuation": true
|
|
332
|
+
},
|
|
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."
|
|
323
334
|
}
|
|
324
335
|
]
|
|
325
336
|
}
|