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": "en-US",
4
4
  "cases": [
5
5
  {
@@ -1287,12 +1287,12 @@
1287
1287
  "note": "nbsp N5: `km` is in this locale's beforeUnits, the separator is U+0020 and a digit run precedes it."
1288
1288
  },
1289
1289
  {
1290
- "id": "en-us-nbsp-unit-no-space",
1290
+ "id": "en-us-nbsp-unit-inserted",
1291
1291
  "rule": "nbsp",
1292
1292
  "mode": "text",
1293
1293
  "in": "It is 20km to the coast",
1294
- "out": "It is 20km to the coast",
1295
- "note": "nbsp.md §6 case 17 and §7.2: N5 converts, it never inserts."
1294
+ "out": "It is 20 km to the coast",
1295
+ "note": "`km` is in spacedUnits (spec 1.22.0; NIST §7.2 and Chicago set the space), so the missing space is inserted as U+00A0."
1296
1296
  },
1297
1297
  {
1298
1298
  "id": "en-us-nbsp-unit-already-bound",
@@ -1303,12 +1303,12 @@
1303
1303
  "note": "nbsp.md §5: N5's already-correct branch emits nothing."
1304
1304
  },
1305
1305
  {
1306
- "id": "en-us-nbsp-percent-spaced",
1306
+ "id": "en-us-nbsp-percent-space-deleted",
1307
1307
  "rule": "nbsp",
1308
1308
  "mode": "text",
1309
1309
  "in": "Prices rose 5 %",
1310
- "out": "Prices rose 5 %",
1311
- "note": "`%` is in beforeUnits. Chicago sets percentages closed up, so this only binds a space the author already typed."
1310
+ "out": "Prices rose 5%",
1311
+ "note": "`%` is in closedUnits: Chicago sets percentages closed up (spec 1.22.0), so the typed space is deleted."
1312
1312
  },
1313
1313
  {
1314
1314
  "id": "en-us-nbsp-percent-closed",
@@ -1316,7 +1316,7 @@
1316
1316
  "mode": "text",
1317
1317
  "in": "Prices rose 5%",
1318
1318
  "out": "Prices rose 5%",
1319
- "note": "Never inserts."
1319
+ "note": "Already closed up: `%` is in closedUnits and nothing is inserted."
1320
1320
  },
1321
1321
  {
1322
1322
  "id": "en-us-nbsp-formula-not-a-unit",
@@ -1390,7 +1390,7 @@
1390
1390
  "rule": "nbsp",
1391
1391
  "mode": "text",
1392
1392
  "in": "The report -- published 2026-08-15 -- says \"growth was 5 %\", but...",
1393
- "out": "The report—published 2026-08-15—says “growth was 5 %”, but…",
1393
+ "out": "The report—published 2026-08-15—says “growth was 5%”, but…",
1394
1394
  "note": "Second prose case: the ISO date is protected by the chain guard while the parenthetical dashes around it convert."
1395
1395
  },
1396
1396
  {
@@ -1908,7 +1908,9 @@
1908
1908
  "rule": "quotes",
1909
1909
  "mode": "markdown",
1910
1910
  "dialect": "commonmark",
1911
- "frontmatterKeys": ["title"],
1911
+ "frontmatterKeys": [
1912
+ "title"
1913
+ ],
1912
1914
  "in": "---\ntitle: \"He said 'hi' twice\"\nslug: \"he-said-hi\"\n---\n\nBody has \"quotes\" here.\n",
1913
1915
  "out": "---\ntitle: \"He said “hi” twice\"\nslug: \"he-said-hi\"\n---\n\nBody has “quotes” here.\n",
1914
1916
  "note": "modes.md §3.7.4: the option names title, so that scalar is processable and everything else in the block — the unlisted slug, both delimiters, every key — is not. Compare en-us-markdown-commonmark-frontmatter, the same shape with the option absent."
@@ -1928,7 +1930,9 @@
1928
1930
  "rule": "dashes",
1929
1931
  "mode": "markdown",
1930
1932
  "dialect": "commonmark",
1931
- "frontmatterKeys": ["title"],
1933
+ "frontmatterKeys": [
1934
+ "title"
1935
+ ],
1932
1936
  "in": "---\ndescription: \"Fast - reliable\"\n---\n\nBody - here.\n",
1933
1937
  "out": "---\ndescription: \"Fast - reliable\"\n---\n\nBody—here.\n",
1934
1938
  "note": "modes.md §3.7.4: a block containing none of the listed keys is left exactly as the skip left it. The same dash converts in the body, so the case pins that the block was not processed rather than that the rule declined."
@@ -1938,7 +1942,9 @@
1938
1942
  "rule": "quotes",
1939
1943
  "mode": "markdown",
1940
1944
  "dialect": "commonmark",
1941
- "frontmatterKeys": ["title"],
1945
+ "frontmatterKeys": [
1946
+ "title"
1947
+ ],
1942
1948
  "in": "+++\ntitle = \"He said 'hi'\"\n+++\n\nBody has \"quotes\" here.\n",
1943
1949
  "out": "+++\ntitle = \"He said 'hi'\"\n+++\n\nBody has “quotes” here.\n",
1944
1950
  "note": "modes.md §3.7.4: a TOML block yields no spans with the option given. TOML quoting is a second grammar the scan does not claim (§7.13), so +++ keeps §3.7.3's skip-whole treatment whatever the caller lists."
@@ -1948,7 +1954,9 @@
1948
1954
  "rule": "quotes",
1949
1955
  "mode": "markdown",
1950
1956
  "dialect": "commonmark",
1951
- "frontmatterKeys": ["title"],
1957
+ "frontmatterKeys": [
1958
+ "title"
1959
+ ],
1952
1960
  "in": "---\ntitle: \"Unclosed\"\n\nBody \"quotes\" here.\n",
1953
1961
  "out": "---\ntitle: “Unclosed”\n\nBody “quotes” here.\n",
1954
1962
  "note": "modes.md §3.7.4: an opening delimiter with no closing one is not a block, so the option has nothing to name and adds no spans. The line converts anyway — as ordinary prose, per en-us-markdown-commonmark-frontmatter-unterminated — which is why the option must not be credited with it."
@@ -1958,7 +1966,9 @@
1958
1966
  "rule": "quotes",
1959
1967
  "mode": "markdown",
1960
1968
  "dialect": "commonmark",
1961
- "frontmatterKeys": ["title"],
1969
+ "frontmatterKeys": [
1970
+ "title"
1971
+ ],
1962
1972
  "in": "---\ntitle: \"She said \\\"hi\\\" to me\"\n---\n\nBody has \"quotes\" here.\n",
1963
1973
  "out": "---\ntitle: \"She said \\\"hi\\\" to me\"\n---\n\nBody has “quotes” here.\n",
1964
1974
  "note": "modes.md §3.7.4 inherits every bail of §3.8.6: a double-quoted scalar whose content contains U+005C yields no spans, because the source spells the content with more characters than it has. The listed key is not enough on its own."
@@ -1968,7 +1978,9 @@
1968
1978
  "rule": "ellipsis",
1969
1979
  "mode": "markdown",
1970
1980
  "dialect": "commonmark",
1971
- "frontmatterKeys": ["title"],
1981
+ "frontmatterKeys": [
1982
+ "title"
1983
+ ],
1972
1984
  "in": "---\ntitle: 'It''s a test...'\n---\n\nBody it's here.\n",
1973
1985
  "out": "---\ntitle: 'It''s a test…'\n---\n\nBody it’s here.\n",
1974
1986
  "note": "modes.md §3.7.4 inherits §3.8.6's split of `''` (spec 1.9.0): the value converts on both sides of the unit and the apostrophe it spells stays straight, while the body's own apostrophe converts. Until 1.9.0 the whole value yielded no spans."
@@ -1978,7 +1990,9 @@
1978
1990
  "rule": "quotes",
1979
1991
  "mode": "markdown",
1980
1992
  "dialect": "commonmark",
1981
- "frontmatterKeys": ["title"],
1993
+ "frontmatterKeys": [
1994
+ "title"
1995
+ ],
1982
1996
  "in": "---\ntitle: He said \"hello\n---\n\nworld\" she said\n",
1983
1997
  "out": "---\ntitle: He said \"hello\n---\n\nworld\" she said\n",
1984
1998
  "note": "modes.md §3.7.4: the block is its own text unit, so the unbalanced mark in title cannot pair with the one in the body. This case discriminates: run as one unit the pair converts — measured, text mode over the same characters gives “hello … world” — and under two units both marks stay straight. A runtime that concatenates the block with the body passes every other frontmatter case and fails this one."
@@ -1988,7 +2002,9 @@
1988
2002
  "rule": "quotes",
1989
2003
  "mode": "markdown",
1990
2004
  "dialect": "commonmark",
1991
- "frontmatterKeys": ["title"],
2005
+ "frontmatterKeys": [
2006
+ "title"
2007
+ ],
1992
2008
  "in": "---\nseo:\n title: He said \"hi\"\nslug: \"x\"\n---\n\nBody \"quotes\" here.\n",
1993
2009
  "out": "---\nseo:\n title: He said “hi”\nslug: \"x\"\n---\n\nBody “quotes” here.\n",
1994
2010
  "note": "modes.md §3.7.4 with §3.8.2's matching: a listed key is processable at any depth and by bare name only, so a nested title converts while the sibling slug does not. §7.12's accepted cost is the same one — a caller cannot say seo.title and not title."
@@ -1998,7 +2014,9 @@
1998
2014
  "rule": "dashes",
1999
2015
  "mode": "markdown",
2000
2016
  "dialect": "commonmark",
2001
- "frontmatterKeys": ["summary"],
2017
+ "frontmatterKeys": [
2018
+ "summary"
2019
+ ],
2002
2020
  "in": "---\nsummary: |\n One line - here.\n Another - line.\n---\n\nBody - here.\n",
2003
2021
  "out": "---\nsummary: |\n One line—here.\n Another—line.\n---\n\nBody—here.\n",
2004
2022
  "note": "modes.md §3.7.4 reuses §3.8.5: each non-blank content line of a listed block scalar is one span, the header and the indentation stay outside every span, and the gap between two content lines is a −2 marker."
@@ -2008,7 +2026,9 @@
2008
2026
  "rule": "quotes",
2009
2027
  "mode": "markdown",
2010
2028
  "dialect": "commonmark",
2011
- "frontmatterKeys": ["title"],
2029
+ "frontmatterKeys": [
2030
+ "title"
2031
+ ],
2012
2032
  "in": "---\r\ntitle: \"He said 'hi'\"\r\n---\r\n\r\nBody has \"quotes\" here.\r\n",
2013
2033
  "out": "---\r\ntitle: \"He said “hi”\"\r\n---\r\n\r\nBody has “quotes” here.\r\n",
2014
2034
  "note": "modes.md §3.7.4: a U+000D before the terminator belongs to the terminator, so a CRLF document gives the same block content as the same bytes with LF and the delimiters stay outside every span."
@@ -2018,7 +2038,9 @@
2018
2038
  "rule": "quotes",
2019
2039
  "mode": "markdown",
2020
2040
  "dialect": "mdx",
2021
- "frontmatterKeys": ["title"],
2041
+ "frontmatterKeys": [
2042
+ "title"
2043
+ ],
2022
2044
  "in": "---\ntitle: \"He said 'hi'\"\n---\n\n<Callout>Body \"quotes\" here</Callout>\n",
2023
2045
  "out": "---\ntitle: \"He said “hi”\"\n---\n\n<Callout>Body “quotes” here</Callout>\n",
2024
2046
  "note": "modes.md §3.7.4 applies to both dialects: YAML frontmatter is the same construct in mdx as in commonmark, and §3.7.3 lists it once for both."
@@ -2208,7 +2230,9 @@
2208
2230
  "id": "en-us-yaml-plain-value",
2209
2231
  "rule": "quotes",
2210
2232
  "mode": "yaml",
2211
- "keys": ["description"],
2233
+ "keys": [
2234
+ "description"
2235
+ ],
2212
2236
  "in": "description: He said \"hi\" to us\n",
2213
2237
  "out": "description: He said “hi” to us\n",
2214
2238
  "note": "modes.md §3.8.4: a plain scalar under a listed key is a processable span and converts exactly as text mode does."
@@ -2217,7 +2241,9 @@
2217
2241
  "id": "en-us-yaml-unlisted-key-untouched",
2218
2242
  "rule": "ellipsis",
2219
2243
  "mode": "yaml",
2220
- "keys": ["description"],
2244
+ "keys": [
2245
+ "description"
2246
+ ],
2221
2247
  "in": "description: one...two\nrun: three...four\n",
2222
2248
  "out": "description: one…two\nrun: three...four\n",
2223
2249
  "note": "modes.md §3.8.2: `keys` is the whole of what makes a scalar processable. A port that processes every string scalar changes the `run:` value too, which is the defect this option exists to prevent."
@@ -2235,7 +2261,9 @@
2235
2261
  "id": "en-us-yaml-key-never-processed",
2236
2262
  "rule": "ellipsis",
2237
2263
  "mode": "yaml",
2238
- "keys": ["a...b"],
2264
+ "keys": [
2265
+ "a...b"
2266
+ ],
2239
2267
  "in": "a...b: one...two\n",
2240
2268
  "out": "a...b: one…two\n",
2241
2269
  "note": "modes.md §3.8.4 step 5: keys are never processable, including the key that was matched against `keys`."
@@ -2244,7 +2272,9 @@
2244
2272
  "id": "en-us-yaml-colon-inside-key",
2245
2273
  "rule": "ellipsis",
2246
2274
  "mode": "yaml",
2247
- "keys": ["a:b"],
2275
+ "keys": [
2276
+ "a:b"
2277
+ ],
2248
2278
  "in": "a:b: one...two\n",
2249
2279
  "out": "a:b: one…two\n",
2250
2280
  "note": "modes.md §3.8.4 step 5: a colon not followed by U+0020 or the line end is an ordinary key character, so the key here is `a:b`. A port that stops at the first colon finds no key and yields no spans."
@@ -2253,7 +2283,9 @@
2253
2283
  "id": "en-us-yaml-quoted-scalar-with-colon",
2254
2284
  "rule": "ellipsis",
2255
2285
  "mode": "yaml",
2256
- "keys": ["title"],
2286
+ "keys": [
2287
+ "title"
2288
+ ],
2257
2289
  "in": "title: \"Chapter 1: one...two\"\n",
2258
2290
  "out": "title: \"Chapter 1: one…two\"\n",
2259
2291
  "note": "modes.md §3.8.6: the plain-scalar colon test does not apply to a quoted scalar — quoting neutralises the colon. A port that applies it declines this line."
@@ -2262,7 +2294,9 @@
2262
2294
  "id": "en-us-yaml-plain-colon-declined",
2263
2295
  "rule": "ellipsis",
2264
2296
  "mode": "yaml",
2265
- "keys": ["description"],
2297
+ "keys": [
2298
+ "description"
2299
+ ],
2266
2300
  "in": "description: She asked: one...two\n",
2267
2301
  "out": "description: She asked: one...two\n",
2268
2302
  "note": "modes.md §3.8.6 \"compact nesting is not a value\": a plain scalar containing a colon followed by U+0020 yields no spans, even though its key is listed. The line is not what it looks like — YAML reads it as a nested mapping and a real parser rejects the document outright (\"Nested mappings are not allowed in compact mappings\"), so a port that processes it is rewriting text it cannot read back. The pair with en-us-yaml-block-scalar-takes-the-same-colon is what makes the distinction visible: identical prose, opposite outcome, decided only by the value's form."
@@ -2271,7 +2305,9 @@
2271
2305
  "id": "en-us-yaml-block-scalar-takes-the-same-colon",
2272
2306
  "rule": "ellipsis",
2273
2307
  "mode": "yaml",
2274
- "keys": ["description"],
2308
+ "keys": [
2309
+ "description"
2310
+ ],
2275
2311
  "in": "description: |\n She asked: one...two\n",
2276
2312
  "out": "description: |\n She asked: one…two\n",
2277
2313
  "note": "modes.md §3.8.5: the compact-nesting bail of §3.8.6 belongs to the plain form alone and does not leak into a block scalar, so this line is processed. Paired with en-us-yaml-plain-colon-declined: identical prose, opposite outcome, decided only by the value's form. This case does NOT discriminate whether a port wrongly applies §3.8.6's colon split to block-scalar content — `one...two` is not adjacent to the colon, so such a port emits the same output; §8 item 3a's `-spaced` locale requirement is what covers that."
@@ -2280,7 +2316,9 @@
2280
2316
  "id": "en-us-yaml-block-literal-lines",
2281
2317
  "rule": "ellipsis",
2282
2318
  "mode": "yaml",
2283
- "keys": ["description"],
2319
+ "keys": [
2320
+ "description"
2321
+ ],
2284
2322
  "in": "description: |\n one...two\n three...four\n",
2285
2323
  "out": "description: |\n one…two\n three…four\n",
2286
2324
  "note": "modes.md §3.8.5: one span per content line, beginning after the block indentation; indentation beyond that is content and stays inside the span."
@@ -2289,7 +2327,9 @@
2289
2327
  "id": "en-us-yaml-chomping-clip",
2290
2328
  "rule": "ellipsis",
2291
2329
  "mode": "yaml",
2292
- "keys": ["description"],
2330
+ "keys": [
2331
+ "description"
2332
+ ],
2293
2333
  "in": "description: |\n one...two\n\n\nz: 1\n",
2294
2334
  "out": "description: |\n one…two\n\n\nz: 1\n",
2295
2335
  "note": "modes.md §3.8.5: the trailing line terminators the chomping indicator governs are outside every span. Compare en-us-yaml-chomping-strip and en-us-yaml-chomping-keep: three indicators, identical content edit, identical trailing bytes."
@@ -2298,7 +2338,9 @@
2298
2338
  "id": "en-us-yaml-chomping-strip",
2299
2339
  "rule": "ellipsis",
2300
2340
  "mode": "yaml",
2301
- "keys": ["description"],
2341
+ "keys": [
2342
+ "description"
2343
+ ],
2302
2344
  "in": "description: |-\n one...two\n\n\nz: 1\n",
2303
2345
  "out": "description: |-\n one…two\n\n\nz: 1\n",
2304
2346
  "note": "modes.md §3.8.5: `|-` differs from `|` only in bytes the mode never touches. A port that decodes the block and re-encodes it produces a different byte count here than for en-us-yaml-chomping-clip."
@@ -2307,7 +2349,9 @@
2307
2349
  "id": "en-us-yaml-chomping-keep",
2308
2350
  "rule": "ellipsis",
2309
2351
  "mode": "yaml",
2310
- "keys": ["description"],
2352
+ "keys": [
2353
+ "description"
2354
+ ],
2311
2355
  "in": "description: |+\n one...two\n\n\nz: 1\n",
2312
2356
  "out": "description: |+\n one…two\n\n\nz: 1\n",
2313
2357
  "note": "modes.md §3.8.5: `|+` keeps every trailing line terminator, and they are outside every span. This is the case the reported corruption in §3.8.1 failed."
@@ -2316,7 +2360,9 @@
2316
2360
  "id": "en-us-yaml-quotes-pair-across-block-lines",
2317
2361
  "rule": "quotes",
2318
2362
  "mode": "yaml",
2319
- "keys": ["description"],
2363
+ "keys": [
2364
+ "description"
2365
+ ],
2320
2366
  "in": "description: |\n He said \"hi\n there\" and left\n",
2321
2367
  "out": "description: |\n He said “hi\n there” and left\n",
2322
2368
  "note": "modes.md §3.2 model C: a block scalar's content lines are separate spans joined by a −2 marker, so a quotation opened on one line pairs with a mark on the next. A port that runs each line independently leaves both marks straight."
@@ -2325,7 +2371,10 @@
2325
2371
  "id": "en-us-yaml-multiline-quoted-untouched",
2326
2372
  "rule": "quotes",
2327
2373
  "mode": "yaml",
2328
- "keys": ["a", "b"],
2374
+ "keys": [
2375
+ "a",
2376
+ "b"
2377
+ ],
2329
2378
  "in": "a: \"open here\n b: some prose \"word\" close\"\n",
2330
2379
  "out": "a: \"open here\n b: some prose \"word\" close\"\n",
2331
2380
  "note": "modes.md §3.8.4 step 7: a quoted scalar that does not close on its opening line consumes its continuation lines, which are never rescanned. A port that rescans them puts the scalar's own closing quote inside a span, and `quotes` can then leave the scalar unterminated."
@@ -2334,7 +2383,11 @@
2334
2383
  "id": "en-us-yaml-multiline-flow-untouched",
2335
2384
  "rule": "ellipsis",
2336
2385
  "mode": "yaml",
2337
- "keys": ["a", "b", "c"],
2386
+ "keys": [
2387
+ "a",
2388
+ "b",
2389
+ "c"
2390
+ ],
2338
2391
  "in": "a: {\n b: one...two,\n c: x\n}\n",
2339
2392
  "out": "a: {\n b: one...two,\n c: x\n}\n",
2340
2393
  "note": "modes.md §3.8.4 step 7: a flow collection spanning several lines consumes them all. A port that bails only on the opening line processes the interior and can edit next to the structural comma."
@@ -2343,7 +2396,9 @@
2343
2396
  "id": "en-us-yaml-block-ambiguous-indent-untouched",
2344
2397
  "rule": "ellipsis",
2345
2398
  "mode": "yaml",
2346
- "keys": ["description"],
2399
+ "keys": [
2400
+ "description"
2401
+ ],
2347
2402
  "in": "description: |\n deep one...two\n shallow three...four\n",
2348
2403
  "out": "description: |\n deep one...two\n shallow three...four\n",
2349
2404
  "note": "modes.md §3.8.5: a later content line dedented inside the block is ambiguous, so the whole block yields no spans rather than the scan guessing which line the author meant as content."
@@ -2352,7 +2407,9 @@
2352
2407
  "id": "en-us-yaml-not-yaml-untouched",
2353
2408
  "rule": "ellipsis",
2354
2409
  "mode": "yaml",
2355
- "keys": ["description"],
2410
+ "keys": [
2411
+ "description"
2412
+ ],
2356
2413
  "in": "{{ not yaml at all ... }}\n\t\tmixed\tindentation...\n",
2357
2414
  "out": "{{ not yaml at all ... }}\n\t\tmixed\tindentation...\n",
2358
2415
  "note": "modes.md §3.8.3: a construct the scan does not recognise yields no spans and the input comes back byte for byte. `transform` never throws on input in this mode."
@@ -2361,7 +2418,10 @@
2361
2418
  "id": "en-us-yaml-document-marker-prefix-untouched",
2362
2419
  "rule": "ellipsis",
2363
2420
  "mode": "yaml",
2364
- "keys": ["description", "--- description"],
2421
+ "keys": [
2422
+ "description",
2423
+ "--- description"
2424
+ ],
2365
2425
  "in": "--- description: one...two\n",
2366
2426
  "out": "--- description: one...two\n",
2367
2427
  "note": "modes.md §3.8.4 step 3: a document marker introducing a node is declined along with the bare form, so no key of `--- description` can ever be formed."
@@ -2370,7 +2430,9 @@
2370
2430
  "id": "en-us-yaml-astral-preserved",
2371
2431
  "rule": "quotes",
2372
2432
  "mode": "yaml",
2373
- "keys": ["description"],
2433
+ "keys": [
2434
+ "description"
2435
+ ],
2374
2436
  "in": "description: A rocket 🚀 and a \"quote\"\n",
2375
2437
  "out": "description: A rocket 🚀 and a “quote”\n",
2376
2438
  "note": "modes.md §4: offsets are code points, not code units. A runtime indexing UTF-16 code units mis-slices the span after the astral character."
@@ -2387,7 +2449,9 @@
2387
2449
  "id": "en-us-yaml-folded-clip",
2388
2450
  "rule": "ellipsis",
2389
2451
  "mode": "yaml",
2390
- "keys": ["description"],
2452
+ "keys": [
2453
+ "description"
2454
+ ],
2391
2455
  "in": "description: >\n one...two\n\n\nz: 1\n",
2392
2456
  "out": "description: >\n one…two\n\n\nz: 1\n",
2393
2457
  "note": "modes.md §3.8.5: `>` is handled identically to `|` because the difference between them lives entirely in bytes the mode never touches. Companion to en-us-yaml-folded-strip and en-us-yaml-folded-keep."
@@ -2396,7 +2460,9 @@
2396
2460
  "id": "en-us-yaml-folded-strip",
2397
2461
  "rule": "ellipsis",
2398
2462
  "mode": "yaml",
2399
- "keys": ["description"],
2463
+ "keys": [
2464
+ "description"
2465
+ ],
2400
2466
  "in": "description: >-\n one...two\n\n\nz: 1\n",
2401
2467
  "out": "description: >-\n one…two\n\n\nz: 1\n",
2402
2468
  "note": "modes.md §3.8.5: identical content edit and identical trailing bytes to en-us-yaml-folded-clip and en-us-yaml-folded-keep — a port that decodes the block and re-encodes it produces three different byte counts."
@@ -2405,7 +2471,9 @@
2405
2471
  "id": "en-us-yaml-folded-keep",
2406
2472
  "rule": "ellipsis",
2407
2473
  "mode": "yaml",
2408
- "keys": ["description"],
2474
+ "keys": [
2475
+ "description"
2476
+ ],
2409
2477
  "in": "description: >+\n one...two\n\n\nz: 1\n",
2410
2478
  "out": "description: >+\n one…two\n\n\nz: 1\n",
2411
2479
  "note": "modes.md §3.8.5: `>+` keeps every trailing line terminator, and they lie outside every span. Completes the six chomping indicators with en-us-yaml-chomping-clip, -strip and -keep."
@@ -2414,7 +2482,9 @@
2414
2482
  "id": "en-us-yaml-quoted-key-untouched",
2415
2483
  "rule": "ellipsis",
2416
2484
  "mode": "yaml",
2417
- "keys": ["description"],
2485
+ "keys": [
2486
+ "description"
2487
+ ],
2418
2488
  "in": "\"description\": one...two\n",
2419
2489
  "out": "\"description\": one...two\n",
2420
2490
  "note": "modes.md §3.8.4 step 5 and §7.11: a key containing a quote is declined before it is ever compared against `keys`, so a document that quotes its keys gets nothing from this mode. An accepted cost, pinned so it is a decision rather than a surprise."
@@ -2423,7 +2493,9 @@
2423
2493
  "id": "en-us-yaml-bang-in-key-untouched",
2424
2494
  "rule": "ellipsis",
2425
2495
  "mode": "yaml",
2426
- "keys": ["a!b"],
2496
+ "keys": [
2497
+ "a!b"
2498
+ ],
2427
2499
  "in": "a!b: one...two\n",
2428
2500
  "out": "a!b: one...two\n",
2429
2501
  "note": "modes.md §3.8.4 step 5: the character test applies at every position of the key, not only the first, so a key merely containing `!` is declined too. A port testing only the first position processes this line and diverges."
@@ -2432,7 +2504,9 @@
2432
2504
  "id": "en-us-yaml-same-key-two-depths",
2433
2505
  "rule": "ellipsis",
2434
2506
  "mode": "yaml",
2435
- "keys": ["description"],
2507
+ "keys": [
2508
+ "description"
2509
+ ],
2436
2510
  "in": "description: one...two\nnested:\n inner:\n description: three...four\n",
2437
2511
  "out": "description: one…two\nnested:\n inner:\n description: three…four\n",
2438
2512
  "note": "modes.md §3.8.2: `keys` matches a bare name at any depth and nothing narrower. Both occurrences convert; a port that matches only at the top level converts one."
@@ -2441,7 +2515,9 @@
2441
2515
  "id": "en-us-yaml-crlf-block",
2442
2516
  "rule": "ellipsis",
2443
2517
  "mode": "yaml",
2444
- "keys": ["description"],
2518
+ "keys": [
2519
+ "description"
2520
+ ],
2445
2521
  "in": "description: |\r\n one...two\r\n",
2446
2522
  "out": "description: |\r\n one…two\r\n",
2447
2523
  "note": "modes.md §3.8.4: a U+000D immediately before the U+000A is a terminator, not part of the line, so a CRLF file yields the same spans as the same bytes with LF and the carriage returns come back untouched. A port splitting lines on U+000A alone reads the header as `|` + U+000D and yields nothing."
@@ -2450,7 +2526,9 @@
2450
2526
  "id": "en-us-yaml-sequence-entry",
2451
2527
  "rule": "ellipsis",
2452
2528
  "mode": "yaml",
2453
- "keys": ["description"],
2529
+ "keys": [
2530
+ "description"
2531
+ ],
2454
2532
  "in": "- description: one...two\n- - description: three...four\n",
2455
2533
  "out": "- description: one…two\n- - description: three…four\n",
2456
2534
  "note": "modes.md §3.8.4 step 4: block sequence entries are consumed rather than skipped, and they nest."
@@ -2459,7 +2537,9 @@
2459
2537
  "id": "en-us-yaml-single-quoted",
2460
2538
  "rule": "ellipsis",
2461
2539
  "mode": "yaml",
2462
- "keys": ["description"],
2540
+ "keys": [
2541
+ "description"
2542
+ ],
2463
2543
  "in": "description: 'one...two'\n",
2464
2544
  "out": "description: 'one…two'\n",
2465
2545
  "note": "modes.md §3.8.6: a single-quoted scalar's content is one span; the quotes themselves are outside it."
@@ -2468,7 +2548,9 @@
2468
2548
  "id": "en-us-yaml-single-quoted-escape-split",
2469
2549
  "rule": "ellipsis",
2470
2550
  "mode": "yaml",
2471
- "keys": ["description"],
2551
+ "keys": [
2552
+ "description"
2553
+ ],
2472
2554
  "in": "description: 'it''s one...two'\n",
2473
2555
  "out": "description: 'it''s one…two'\n",
2474
2556
  "note": "modes.md §3.8.6 (spec 1.9.0): `''` is one apostrophe of content spelled with two code points, so it is an opaque skipped unit and the scalar is split around it. Everything on either side converts; the apostrophe it spells is outside every span and stays U+0027. Until 1.9.0 the whole scalar yielded no spans."
@@ -2477,7 +2559,9 @@
2477
2559
  "id": "en-us-yaml-single-quoted-escape-quotes",
2478
2560
  "rule": "quotes",
2479
2561
  "mode": "yaml",
2480
- "keys": ["description"],
2562
+ "keys": [
2563
+ "description"
2564
+ ],
2481
2565
  "in": "description: 'It''s -- he said \"hi\" to me...'\n",
2482
2566
  "out": "description: 'It''s—he said “hi” to me…'\n",
2483
2567
  "note": "modes.md §3.8.6: the same scalar with a double-quoted run after the unit. The run pairs and converts, the dash and ellipsis convert, and the apostrophe stays straight."
@@ -2486,7 +2570,9 @@
2486
2570
  "id": "en-us-yaml-single-quoted-escape-at-ends",
2487
2571
  "rule": "ellipsis",
2488
2572
  "mode": "yaml",
2489
- "keys": ["description"],
2573
+ "keys": [
2574
+ "description"
2575
+ ],
2490
2576
  "in": "description: '''one...two'''\n",
2491
2577
  "out": "description: '''one…two'''\n",
2492
2578
  "note": "modes.md §3.8.6: a unit directly after the opening quote and directly before the closing one. The scan claims each pair as it is met, so `'''` is the unit followed by content and `'''` at the end is the unit followed by the closing quote."
@@ -2495,7 +2581,9 @@
2495
2581
  "id": "en-us-yaml-single-quoted-escape-only",
2496
2582
  "rule": "ellipsis",
2497
2583
  "mode": "yaml",
2498
- "keys": ["description"],
2584
+ "keys": [
2585
+ "description"
2586
+ ],
2499
2587
  "in": "description: ''''\n",
2500
2588
  "out": "description: ''''\n",
2501
2589
  "note": "modes.md §3.8.6: a scalar that is nothing but one unit yields no non-empty segment, so no span, and comes back byte for byte."
@@ -2504,7 +2592,9 @@
2504
2592
  "id": "en-us-yaml-single-quoted-escape-contraction-at-unit",
2505
2593
  "rule": "dashes",
2506
2594
  "mode": "yaml",
2507
- "keys": ["description"],
2595
+ "keys": [
2596
+ "description"
2597
+ ],
2508
2598
  "in": "description: 'a''--''b'\n",
2509
2599
  "out": "description: 'a''—''b'\n",
2510
2600
  "note": "modes.md §3.8.6 and §3.4: the dash sits between two units, so it is a whole span. A contraction (2 → 1) is applied at a span extremity, exactly as it is against `:` and `#` in a plain scalar."
@@ -2513,7 +2603,9 @@
2513
2603
  "id": "en-us-yaml-single-quoted-escape-unterminated",
2514
2604
  "rule": "ellipsis",
2515
2605
  "mode": "yaml",
2516
- "keys": ["description"],
2606
+ "keys": [
2607
+ "description"
2608
+ ],
2517
2609
  "in": "description: 'it''s one...two\n",
2518
2610
  "out": "description: 'it''s one...two\n",
2519
2611
  "note": "modes.md §3.8.6: after a unit the scan keeps looking for a closing quote on the same line, finds none, and the value yields no spans — a trailing unit is not mistaken for a close."
@@ -2522,7 +2614,9 @@
2522
2614
  "id": "en-us-yaml-double-quoted-escape-untouched",
2523
2615
  "rule": "ellipsis",
2524
2616
  "mode": "yaml",
2525
- "keys": ["description"],
2617
+ "keys": [
2618
+ "description"
2619
+ ],
2526
2620
  "in": "description: \"one \\\"two\\\"... three\"\n",
2527
2621
  "out": "description: \"one \\\"two\\\"... three\"\n",
2528
2622
  "note": "modes.md §3.8.6: a backslash in a double-quoted scalar means the same thing — source characters and content characters stop being the same, exactly as an HTML character reference does in §3.6."
@@ -2531,7 +2625,10 @@
2531
2625
  "id": "en-us-yaml-anchor-untouched",
2532
2626
  "rule": "ellipsis",
2533
2627
  "mode": "yaml",
2534
- "keys": ["description", "use"],
2628
+ "keys": [
2629
+ "description",
2630
+ "use"
2631
+ ],
2535
2632
  "in": "description: &anchor one...two\nuse: *anchor\n",
2536
2633
  "out": "description: &anchor one...two\nuse: *anchor\n",
2537
2634
  "note": "modes.md §3.8.4 step 9: an anchored or aliased value is not a construct this scan claims, listed key or not."
@@ -2540,7 +2637,9 @@
2540
2637
  "id": "en-us-yaml-tag-untouched",
2541
2638
  "rule": "ellipsis",
2542
2639
  "mode": "yaml",
2543
- "keys": ["description"],
2640
+ "keys": [
2641
+ "description"
2642
+ ],
2544
2643
  "in": "description: !!str one...two\n",
2545
2644
  "out": "description: !!str one...two\n",
2546
2645
  "note": "modes.md §3.8.4 step 9: a tagged value is declined for the same reason as an anchored one."
@@ -2549,7 +2648,9 @@
2549
2648
  "id": "en-us-yaml-comment-only-value",
2550
2649
  "rule": "ellipsis",
2551
2650
  "mode": "yaml",
2552
- "keys": ["description"],
2651
+ "keys": [
2652
+ "description"
2653
+ ],
2553
2654
  "in": "# a comment...here\n%TAG ! tag:example.com,2000:\ndescription: # one...two\n",
2554
2655
  "out": "# a comment...here\n%TAG ! tag:example.com,2000:\ndescription: # one...two\n",
2555
2656
  "note": "modes.md §3.8.4 steps 2 and 9: a comment line, a directive line, and a value that is only a comment all yield no spans."
@@ -2558,7 +2659,9 @@
2558
2659
  "id": "en-us-yaml-document-markers",
2559
2660
  "rule": "ellipsis",
2560
2661
  "mode": "yaml",
2561
- "keys": ["description"],
2662
+ "keys": [
2663
+ "description"
2664
+ ],
2562
2665
  "in": "---\ndescription: one...two\n...\n",
2563
2666
  "out": "---\ndescription: one…two\n...\n",
2564
2667
  "note": "modes.md §3.8.4 step 3: the bare document markers are declined as lines, and the mapping between them is scanned normally."
@@ -2567,7 +2670,10 @@
2567
2670
  "id": "en-us-yaml-flow-one-line-untouched",
2568
2671
  "rule": "ellipsis",
2569
2672
  "mode": "yaml",
2570
- "keys": ["description", "inner"],
2673
+ "keys": [
2674
+ "description",
2675
+ "inner"
2676
+ ],
2571
2677
  "in": "description: [one...two, three]\ninner: {a: four...five}\n",
2572
2678
  "out": "description: [one...two, three]\ninner: {a: four...five}\n",
2573
2679
  "note": "modes.md §3.8.4 step 9: a flow collection is declined whole, on one line as much as across several."
@@ -2576,7 +2682,9 @@
2576
2682
  "id": "en-us-yaml-explicit-indent-indicator",
2577
2683
  "rule": "ellipsis",
2578
2684
  "mode": "yaml",
2579
- "keys": ["description"],
2685
+ "keys": [
2686
+ "description"
2687
+ ],
2580
2688
  "in": "description: |2\n one...two\n",
2581
2689
  "out": "description: |2\n one…two\n",
2582
2690
  "note": "modes.md §3.8.5: an explicit indentation indicator sets `bi` to `indent + n`, so the leading space here is content and stays inside the span."
@@ -2585,7 +2693,9 @@
2585
2693
  "id": "en-us-yaml-empty-value-nested-node",
2586
2694
  "rule": "ellipsis",
2587
2695
  "mode": "yaml",
2588
- "keys": ["description"],
2696
+ "keys": [
2697
+ "description"
2698
+ ],
2589
2699
  "in": "outer:\n description: one...two\n",
2590
2700
  "out": "outer:\n description: one…two\n",
2591
2701
  "note": "modes.md §3.8.4 step 6: a key with no inline value introduces a nested node whose lines ARE scanned on their own — the one case where following lines are not consumed by step 7."
@@ -2594,7 +2704,9 @@
2594
2704
  "id": "en-us-yaml-multiline-plain-untouched",
2595
2705
  "rule": "ellipsis",
2596
2706
  "mode": "yaml",
2597
- "keys": ["description"],
2707
+ "keys": [
2708
+ "description"
2709
+ ],
2598
2710
  "in": "description: one...two\n three...four\n",
2599
2711
  "out": "description: one...two\n three...four\n",
2600
2712
  "note": "modes.md §3.8.6: a multi-line plain scalar's folding is a construct this scan does not claim, so the whole value yields no spans — including its first line."
@@ -2660,7 +2772,9 @@
2660
2772
  "id": "en-us-yaml-plain-apostrophe",
2661
2773
  "rule": "apostrophe",
2662
2774
  "mode": "yaml",
2663
- "keys": ["description"],
2775
+ "keys": [
2776
+ "description"
2777
+ ],
2664
2778
  "in": "description: it's one of theirs\n",
2665
2779
  "out": "description: it’s one of theirs\n",
2666
2780
  "note": "modes.md §3.8.6 and §7.11: an apostrophe is ordinary content in a plain scalar — nothing about it is syntactic, so the scan claims the value and `apostrophe` curls it. The style matrix's first cell: the single-quoted bail is about how the source spells the character, not about the character."
@@ -2669,7 +2783,9 @@
2669
2783
  "id": "en-us-yaml-double-quoted-apostrophe",
2670
2784
  "rule": "apostrophe",
2671
2785
  "mode": "yaml",
2672
- "keys": ["description"],
2786
+ "keys": [
2787
+ "description"
2788
+ ],
2673
2789
  "in": "description: \"it's one of theirs\"\n",
2674
2790
  "out": "description: \"it’s one of theirs\"\n",
2675
2791
  "note": "modes.md §3.8.6: inside a double-quoted scalar an apostrophe needs no escape, so the content and the source are the same characters and the scan claims it. Compare en-us-yaml-single-quoted-escape-untouched, the same sentence in the one style that has to double the mark."
@@ -2678,7 +2794,9 @@
2678
2794
  "id": "en-us-yaml-block-scalar-apostrophe",
2679
2795
  "rule": "apostrophe",
2680
2796
  "mode": "yaml",
2681
- "keys": ["description"],
2797
+ "keys": [
2798
+ "description"
2799
+ ],
2682
2800
  "in": "description: |-\n it's one of theirs\n",
2683
2801
  "out": "description: |-\n it’s one of theirs\n",
2684
2802
  "note": "modes.md §3.8.5: a block scalar has no quoting and therefore no escaping, so an apostrophe in it is content like any other. Together with the plain and double-quoted cases this pins that only one of the four styles declines, which is what makes §7.13's measured cost a property of that style rather than of the mark."
@@ -2688,7 +2806,9 @@
2688
2806
  "rule": "apostrophe",
2689
2807
  "mode": "markdown",
2690
2808
  "dialect": "commonmark",
2691
- "frontmatterKeys": ["title"],
2809
+ "frontmatterKeys": [
2810
+ "title"
2811
+ ],
2692
2812
  "in": "---\ntitle: it's one of theirs\n---\n\nBody it's here.\n",
2693
2813
  "out": "---\ntitle: it’s one of theirs\n---\n\nBody it’s here.\n",
2694
2814
  "note": "modes.md §3.7.4 inherits §3.8.6 whole, so the style matrix holds inside a frontmatter block too: a plain scalar's apostrophe converts, while the single-quoted form does not (en-us-markdown-commonmark-frontmatter-keys-single-quote-bail)."
@@ -2851,7 +2971,9 @@
2851
2971
  "rule": "quotes",
2852
2972
  "mode": "markdown",
2853
2973
  "dialect": "commonmark",
2854
- "frontmatterKeys": ["title"],
2974
+ "frontmatterKeys": [
2975
+ "title"
2976
+ ],
2855
2977
  "in": "--- \ntitle: He said \"hello\" once\nslug: \"he-said-hello\"\n---\n\nBody \"quotes\" here.\n",
2856
2978
  "out": "--- \ntitle: He said “hello” once\nslug: \"he-said-hello\"\n---\n\nBody “quotes” here.\n",
2857
2979
  "note": "modes.md §3.7.4 with §3.7.3a: every other locator case takes the skip path, where a wrong extent only costs prose. Here it costs an offset — a port computing the content start as \"four code points in\" is right for every bare fence and wrong for this one, and the spans it emits land on the wrong characters."
@@ -2924,7 +3046,9 @@
2924
3046
  "rule": "quotes",
2925
3047
  "mode": "markdown",
2926
3048
  "dialect": "commonmark",
2927
- "frontmatterKeys": ["title"],
3049
+ "frontmatterKeys": [
3050
+ "title"
3051
+ ],
2928
3052
  "in": "---\rtitle: a \"b\"\rslug: \"x\"\r---\r\rBody \"c\" here.\r",
2929
3053
  "out": "---\rtitle: a \"b\"\rslug: \"x\"\r---\r\rBody “c” here.\r",
2930
3054
  "note": "modes.md §3.7.3a step 5 and §7.13: the block is found by CommonMark's line model, and the content is then read by §3.8.4's LF-only one, which sees a two-line block as a single line and yields no span. So the option is inert here — nothing machine-read is typeset, the block is still skipped, and the body converts. Pinned because it is a silence, and a silence nobody pinned is a silence nobody notices."
@@ -2934,7 +3058,9 @@
2934
3058
  "rule": "quotes",
2935
3059
  "mode": "markdown",
2936
3060
  "dialect": "commonmark",
2937
- "frontmatterKeys": ["title"],
3061
+ "frontmatterKeys": [
3062
+ "title"
3063
+ ],
2938
3064
  "in": "---\rtitle: a \"b\"\r---\r\rBody \"c\" here.\r",
2939
3065
  "out": "---\rtitle: a \"b\"\r---\r\rBody “c” here.\r",
2940
3066
  "note": "modes.md §3.7.4: a block whose content carries a U+000D not followed by U+000A yields no spans, however few lines it has. An earlier draft let a one-line block through and declined a two-line one, which made the rule depend on a line count rather than on the character; the two-line case is en-us-markdown-commonmark-frontmatter-keys-lone-cr-is-inert and this is the other side of it."
@@ -2962,7 +3088,9 @@
2962
3088
  "rule": "apostrophe",
2963
3089
  "mode": "markdown",
2964
3090
  "dialect": "commonmark",
2965
- "frontmatterKeys": ["title"],
3091
+ "frontmatterKeys": [
3092
+ "title"
3093
+ ],
2966
3094
  "in": "---\ntitle: café 😀 it's ok\n---\n\nBody \"q\" here...\n",
2967
3095
  "out": "---\ntitle: café 😀 it’s ok\n---\n\nBody “q” here…\n",
2968
3096
  "note": "modes.md §3.7.3a's mask is one U+0020 per index unit, not per code point: a runtime that indexes bytes and masks an astral character to a single space shortens its input by three and shifts every body offset after it. The trailing ellipsis is what a shift eats first, so this case fails loudly rather than subtly."
@@ -2972,7 +3100,10 @@
2972
3100
  "rule": "quotes",
2973
3101
  "mode": "markdown",
2974
3102
  "dialect": "commonmark",
2975
- "frontmatterKeys": ["title", "slug"],
3103
+ "frontmatterKeys": [
3104
+ "title",
3105
+ "slug"
3106
+ ],
2976
3107
  "in": "---\ntitle: \"a\rb\"\nslug: c \"d\"\n---\n\nBody \"q\" here.\n",
2977
3108
  "out": "---\ntitle: \"a\rb\"\nslug: c “d”\n---\n\nBody “q” here.\n",
2978
3109
  "note": "modes.md §3.7.4's U+000D bail is per line, not per block: `title`'s value carries a stray carriage return and is declined, `slug`'s line converts, and the body converts. The other side of the lone-U+000D document cases, which lose everything because such a document is one §3.8.4 line. Implementers: the per-line test has to run to the next line's start rather than to the line's end, or a block whose only line ends in U+000D looks clean — that is the one reading under which both this case and -keys-lone-cr-one-key pass."
@@ -2982,7 +3113,10 @@
2982
3113
  "rule": "quotes",
2983
3114
  "mode": "markdown",
2984
3115
  "dialect": "commonmark",
2985
- "frontmatterKeys": ["title", "slug"],
3116
+ "frontmatterKeys": [
3117
+ "title",
3118
+ "slug"
3119
+ ],
2986
3120
  "in": "---\ntitle: a \"b\"\nslug: c \"d\"\n\r---\n\nBody \"q\" here.\n",
2987
3121
  "out": "---\ntitle: a “b”\nslug: c “d”\n\r---\n\nBody “q” here.\n",
2988
3122
  "note": "modes.md §3.7.4 and §3.8.4 step 7: the content's last line is a lone U+000D on a line of its own, and both `title` and `slug` convert. That line is blank to the value-run test, so it is not a continuation line of `slug` (1.11.0; until then it joined `slug`'s run and silenced it, which this note used to describe as the point of the case). What the case discriminates now is an implementation that substitutes the U+000D for another declining character such as U+0009: that makes the last line non-blank and silences `slug`. The per-line filter itself is exercised by -keys-lone-cr-one-key and -keys-lone-cr-costs-one-line."
@@ -2992,7 +3126,10 @@
2992
3126
  "rule": "dashes",
2993
3127
  "mode": "markdown",
2994
3128
  "dialect": "commonmark",
2995
- "frontmatterKeys": ["summary", "title"],
3129
+ "frontmatterKeys": [
3130
+ "summary",
3131
+ "title"
3132
+ ],
2996
3133
  "in": "---\nsummary: a\rb\n title: c -- d\n---\n\nBody \"q\" here.\n",
2997
3134
  "out": "---\nsummary: a\rb\n title: c -- d\n---\n\nBody “q” here.\n",
2998
3135
  "note": "modes.md §3.7.4: the decline drops the spans the content scan produced for that line and does not alter the content the scan was given. Here the U+000D sits on a listed key whose value run continues onto a more-indented line, so the scan yields nothing for the block at all — `title` is inside `summary`'s value run, not a key of its own. Substituting the U+000D for U+0009 instead converts `c -- d` and is the divergence this case exists to fail."
@@ -3002,7 +3139,9 @@
3002
3139
  "rule": "quotes",
3003
3140
  "mode": "markdown",
3004
3141
  "dialect": "commonmark",
3005
- "frontmatterKeys": ["title"],
3142
+ "frontmatterKeys": [
3143
+ "title"
3144
+ ],
3006
3145
  "in": "---\rtitle: a \"b\"\r---\r\rBody \"q\".\r",
3007
3146
  "out": "---\rtitle: a \"b\"\r---\r\rBody “q”.\r",
3008
3147
  "note": "modes.md §3.7.3a steps 1 and 5 composed: a byte-order mark in front of a document whose lines end with lone U+000D. Each clause is pinned alone and their combination is where one runtime lost the body entirely — found by an adversarial pass over a finished port, not by any fixture then in the suite. The block is located and skipped, its content is declined for the U+000D, and the body converts."
@@ -3011,7 +3150,11 @@
3011
3150
  "id": "en-us-yaml-lone-cr-plain-untouched",
3012
3151
  "rule": "dashes",
3013
3152
  "mode": "yaml",
3014
- "keys": ["title", "slug", "summary"],
3153
+ "keys": [
3154
+ "title",
3155
+ "slug",
3156
+ "summary"
3157
+ ],
3015
3158
  "in": "title: a\rb -- c\n",
3016
3159
  "out": "title: a\rb -- c\n",
3017
3160
  "note": "modes.md §3.8.4 step 9 (spec 1.10.0): a U+000D that is not a line's terminator would land inside the scalar's span, and line terminators are never inside a span. The line yields no spans and comes back byte for byte. Until 1.10.0 this converted, with the carriage return inside the span."
@@ -3020,7 +3163,11 @@
3020
3163
  "id": "en-us-yaml-lone-cr-quoted-untouched",
3021
3164
  "rule": "dashes",
3022
3165
  "mode": "yaml",
3023
- "keys": ["title", "slug", "summary"],
3166
+ "keys": [
3167
+ "title",
3168
+ "slug",
3169
+ "summary"
3170
+ ],
3024
3171
  "in": "title: \"a\rb -- c\"\n",
3025
3172
  "out": "title: \"a\rb -- c\"\n",
3026
3173
  "note": "modes.md §3.8.4 step 9: the same line with a double-quoted scalar. The decline is on the line, not on the scalar form."
@@ -3029,7 +3176,11 @@
3029
3176
  "id": "en-us-yaml-lone-cr-block-scalar-untouched",
3030
3177
  "rule": "dashes",
3031
3178
  "mode": "yaml",
3032
- "keys": ["title", "slug", "summary"],
3179
+ "keys": [
3180
+ "title",
3181
+ "slug",
3182
+ "summary"
3183
+ ],
3033
3184
  "in": "title: |\n a -- b\n c\rd -- e\n",
3034
3185
  "out": "title: |\n a -- b\n c\rd -- e\n",
3035
3186
  "note": "modes.md §3.8.5 (spec 1.10.0): a U+000D on any line of a block scalar's run makes the whole block yield no spans, as a tab does — the first line, which is clean, is not converted either."
@@ -3038,7 +3189,11 @@
3038
3189
  "id": "en-us-yaml-lone-cr-value-run-consumed",
3039
3190
  "rule": "dashes",
3040
3191
  "mode": "yaml",
3041
- "keys": ["title", "slug", "summary"],
3192
+ "keys": [
3193
+ "title",
3194
+ "slug",
3195
+ "summary"
3196
+ ],
3042
3197
  "in": "summary: a\rb\n title: c -- d\n",
3043
3198
  "out": "summary: a\rb\n title: c -- d\n",
3044
3199
  "note": "modes.md §3.8.4 step 9: the declined line's value run is still consumed, so the indented `title: c -- d` stays a continuation of `summary` and is not read as a mapping line of its own. Declining without consuming would convert a key that is not a key."
@@ -3047,7 +3202,11 @@
3047
3202
  "id": "en-us-yaml-trailing-cr-is-a-terminator",
3048
3203
  "rule": "dashes",
3049
3204
  "mode": "yaml",
3050
- "keys": ["title", "slug", "summary"],
3205
+ "keys": [
3206
+ "title",
3207
+ "slug",
3208
+ "summary"
3209
+ ],
3051
3210
  "in": "title: a -- b\r",
3052
3211
  "out": "title: a—b\r",
3053
3212
  "note": "modes.md §3.8.4: a U+000D that ends the input with no U+000A after it is a terminator, like one before a U+000A, so it is not a lone carriage return and the line converts."
@@ -3056,7 +3215,11 @@
3056
3215
  "id": "en-us-yaml-crlf-still-converts",
3057
3216
  "rule": "dashes",
3058
3217
  "mode": "yaml",
3059
- "keys": ["title", "slug", "summary"],
3218
+ "keys": [
3219
+ "title",
3220
+ "slug",
3221
+ "summary"
3222
+ ],
3060
3223
  "in": "title: a -- b\r\nslug: c -- d\r\n",
3061
3224
  "out": "title: a—b\r\nslug: c—d\r\n",
3062
3225
  "note": "modes.md §3.8.4: CRLF is two terminator characters and neither is lone, so step 9 does not apply to a Windows-line-ended document."
@@ -3065,7 +3228,11 @@
3065
3228
  "id": "en-us-yaml-cr-line-is-not-blank",
3066
3229
  "rule": "dashes",
3067
3230
  "mode": "yaml",
3068
- "keys": ["title", "slug", "summary"],
3231
+ "keys": [
3232
+ "title",
3233
+ "slug",
3234
+ "summary"
3235
+ ],
3069
3236
  "in": "title: |\n a -- b\n\r \n c -- d\n",
3070
3237
  "out": "title: |\n a—b\n\r \n c -- d\n",
3071
3238
  "note": "modes.md §3.8.4 step 1 (spec 1.10.0): a line is blank only if it is empty or all U+0020, so `<CR>␣␣` is not blank. It has indent 0, which ends the block's value run, and `a -- b` converts while `c -- d` is outside the block. A port that trims U+000D before testing blankness keeps the line in the run and declines the whole block instead."
@@ -3074,7 +3241,11 @@
3074
3241
  "id": "en-us-yaml-double-trailing-cr-untouched",
3075
3242
  "rule": "dashes",
3076
3243
  "mode": "yaml",
3077
- "keys": ["title", "slug", "summary"],
3244
+ "keys": [
3245
+ "title",
3246
+ "slug",
3247
+ "summary"
3248
+ ],
3078
3249
  "in": "title: a -- b\r\r",
3079
3250
  "out": "title: a -- b\r\r",
3080
3251
  "note": "modes.md §3.8.4: only the last U+000D at the end of the input is a terminator, so the first is a lone one and the line yields no spans. A port that strips every trailing U+000D converts it."
@@ -3083,7 +3254,11 @@
3083
3254
  "id": "en-us-yaml-cr-before-lf-after-cr-untouched",
3084
3255
  "rule": "dashes",
3085
3256
  "mode": "yaml",
3086
- "keys": ["title", "slug", "summary"],
3257
+ "keys": [
3258
+ "title",
3259
+ "slug",
3260
+ "summary"
3261
+ ],
3087
3262
  "in": "title: a -- b\r\r\n",
3088
3263
  "out": "title: a -- b\r\r\n",
3089
3264
  "note": "modes.md §3.8.4: a U+000D immediately before a U+000A is a terminator, and only that one; the U+000D before it is lone. The same line as the previous case with a final U+000A."
@@ -3092,7 +3267,11 @@
3092
3267
  "id": "en-us-yaml-cr-then-hash-untouched",
3093
3268
  "rule": "dashes",
3094
3269
  "mode": "yaml",
3095
- "keys": ["title", "slug", "summary"],
3270
+ "keys": [
3271
+ "title",
3272
+ "slug",
3273
+ "summary"
3274
+ ],
3096
3275
  "in": "title: a\r#c -- d\n",
3097
3276
  "out": "title: a\r#c -- d\n",
3098
3277
  "note": "modes.md §3.8.4 step 9: YAML 1.2 reads `<CR>#c -- d` as a comment line, which step 2 declines when it starts a line. The LF-only model sees one line, so the decline has to be on the carriage return itself."
@@ -3101,7 +3280,11 @@
3101
3280
  "id": "en-us-yaml-double-quoted-trailing-blank-line",
3102
3281
  "rule": "dashes",
3103
3282
  "mode": "yaml",
3104
- "keys": ["title", "slug", "summary"],
3283
+ "keys": [
3284
+ "title",
3285
+ "slug",
3286
+ "summary"
3287
+ ],
3105
3288
  "in": "title: \"a -- b\"\n\n",
3106
3289
  "out": "title: \"a—b\"\n\n",
3107
3290
  "note": "modes.md §3.8.4 step 7 and §3.8.6 (spec 1.11.0): blank lines after a closed quoted scalar are not a continuation line, so a file that ends in a blank line converts exactly as the same file without it. Until 1.11.0 the run being non-empty silenced the scalar in every runtime."
@@ -3110,7 +3293,11 @@
3110
3293
  "id": "en-us-yaml-single-quoted-trailing-blank-line",
3111
3294
  "rule": "dashes",
3112
3295
  "mode": "yaml",
3113
- "keys": ["title", "slug", "summary"],
3296
+ "keys": [
3297
+ "title",
3298
+ "slug",
3299
+ "summary"
3300
+ ],
3114
3301
  "in": "title: 'a -- b'\n\n",
3115
3302
  "out": "title: 'a—b'\n\n",
3116
3303
  "note": "modes.md §3.8.6 (spec 1.11.0): the single-quoted form of the trailing blank line."
@@ -3119,7 +3306,11 @@
3119
3306
  "id": "en-us-yaml-plain-trailing-blank-line",
3120
3307
  "rule": "dashes",
3121
3308
  "mode": "yaml",
3122
- "keys": ["title", "slug", "summary"],
3309
+ "keys": [
3310
+ "title",
3311
+ "slug",
3312
+ "summary"
3313
+ ],
3123
3314
  "in": "summary: the one -- here\n\n",
3124
3315
  "out": "summary: the one—here\n\n",
3125
3316
  "note": "modes.md §3.8.6 continuation bail (spec 1.11.0): trailing blank lines are not a continuation line, so a plain scalar followed by a blank line is not a multi-line plain scalar."
@@ -3128,7 +3319,11 @@
3128
3319
  "id": "en-us-yaml-blank-line-between-mappings",
3129
3320
  "rule": "dashes",
3130
3321
  "mode": "yaml",
3131
- "keys": ["title", "slug", "summary"],
3322
+ "keys": [
3323
+ "title",
3324
+ "slug",
3325
+ "summary"
3326
+ ],
3132
3327
  "in": "title: \"a -- b\"\n\nslug: c -- d\n",
3133
3328
  "out": "title: \"a—b\"\n\nslug: c—d\n",
3134
3329
  "note": "modes.md §3.8.4 step 7 (spec 1.11.0): a blank line between two mappings belongs to the first value's run and is not a continuation line, so both values convert."
@@ -3137,7 +3332,11 @@
3137
3332
  "id": "en-us-yaml-quoted-continuation-line-declined",
3138
3333
  "rule": "dashes",
3139
3334
  "mode": "yaml",
3140
- "keys": ["title", "slug", "summary"],
3335
+ "keys": [
3336
+ "title",
3337
+ "slug",
3338
+ "summary"
3339
+ ],
3141
3340
  "in": "title: \"a -- b\"\n more -- c\n",
3142
3341
  "out": "title: \"a -- b\"\n more -- c\n",
3143
3342
  "note": "modes.md §3.8.6 (spec 1.11.0): a non-blank, more-indented line after a closed quoted scalar is a continuation line and the scalar yields no spans. Pinned so that narrowing the bail for blank lines does not widen it for this."
@@ -3146,7 +3345,11 @@
3146
3345
  "id": "en-us-yaml-plain-continuation-after-blank-declined",
3147
3346
  "rule": "dashes",
3148
3347
  "mode": "yaml",
3149
- "keys": ["title", "slug", "summary"],
3348
+ "keys": [
3349
+ "title",
3350
+ "slug",
3351
+ "summary"
3352
+ ],
3150
3353
  "in": "summary: a -- b\n\n more -- c\n",
3151
3354
  "out": "summary: a -- b\n\n more -- c\n",
3152
3355
  "note": "modes.md §3.8.6 continuation bail (spec 1.11.0): a blank line followed by a more-indented line is a genuine multi-line plain scalar, which YAML folds. The blank line does not hide the continuation line behind it."
@@ -3155,7 +3358,11 @@
3155
3358
  "id": "en-us-yaml-tab-line-is-not-blank-after-quoted",
3156
3359
  "rule": "dashes",
3157
3360
  "mode": "yaml",
3158
- "keys": ["title", "slug", "summary"],
3361
+ "keys": [
3362
+ "title",
3363
+ "slug",
3364
+ "summary"
3365
+ ],
3159
3366
  "in": "title: \"a -- b\"\n \t\n",
3160
3367
  "out": "title: \"a -- b\"\n \t\n",
3161
3368
  "note": "modes.md §3.8.4 step 1 and step 7 (spec 1.11.0): a line holding U+0009 is not blank, so it is a continuation line and the quoted scalar yields no spans. A port that tests blankness with a trim converts this."
@@ -3164,7 +3371,11 @@
3164
3371
  "id": "en-us-yaml-cr-line-is-not-blank-after-quoted",
3165
3372
  "rule": "dashes",
3166
3373
  "mode": "yaml",
3167
- "keys": ["title", "slug", "summary"],
3374
+ "keys": [
3375
+ "title",
3376
+ "slug",
3377
+ "summary"
3378
+ ],
3168
3379
  "in": "title: \"a -- b\"\n \r \n",
3169
3380
  "out": "title: \"a -- b\"\n \r \n",
3170
3381
  "note": "modes.md §3.8.4 step 1 and step 7 (spec 1.11.0): a lone U+000D makes a line non-blank, so it is a continuation line and the quoted scalar yields no spans."
@@ -3173,7 +3384,11 @@
3173
3384
  "id": "en-us-yaml-crlf-blank-line-after-quoted",
3174
3385
  "rule": "dashes",
3175
3386
  "mode": "yaml",
3176
- "keys": ["title", "slug", "summary"],
3387
+ "keys": [
3388
+ "title",
3389
+ "slug",
3390
+ "summary"
3391
+ ],
3177
3392
  "in": "title: \"a -- b\"\r\n\r\n",
3178
3393
  "out": "title: \"a—b\"\r\n\r\n",
3179
3394
  "note": "modes.md §3.8.4 (spec 1.11.0): a U+000D before U+000A is a terminator, so the second line is empty and blank, and the quoted scalar converts."
@@ -3182,7 +3397,11 @@
3182
3397
  "id": "en-us-yaml-blank-then-less-indented-key",
3183
3398
  "rule": "dashes",
3184
3399
  "mode": "yaml",
3185
- "keys": ["title", "slug", "summary"],
3400
+ "keys": [
3401
+ "title",
3402
+ "slug",
3403
+ "summary"
3404
+ ],
3186
3405
  "in": "meta:\n title: \"a -- b\"\n\nslug: c -- d\n",
3187
3406
  "out": "meta:\n title: \"a—b\"\n\nslug: c—d\n",
3188
3407
  "note": "modes.md §3.8.4 step 7 (spec 1.11.0): the blank line is followed by a less-indented line, which ends the run; both values convert."
@@ -3191,7 +3410,11 @@
3191
3410
  "id": "en-us-yaml-blank-then-column-zero-comment",
3192
3411
  "rule": "dashes",
3193
3412
  "mode": "yaml",
3194
- "keys": ["title", "slug", "summary"],
3413
+ "keys": [
3414
+ "title",
3415
+ "slug",
3416
+ "summary"
3417
+ ],
3195
3418
  "in": "title: \"a -- b\"\n\n# c\n",
3196
3419
  "out": "title: \"a—b\"\n\n# c\n",
3197
3420
  "note": "modes.md §3.8.4 step 7 (spec 1.11.0): the column-0 comment is not more indented, so it ends the run and the quoted scalar converts."
@@ -3200,7 +3423,11 @@
3200
3423
  "id": "en-us-yaml-indented-comment-after-quoted-declined",
3201
3424
  "rule": "dashes",
3202
3425
  "mode": "yaml",
3203
- "keys": ["title", "slug", "summary"],
3426
+ "keys": [
3427
+ "title",
3428
+ "slug",
3429
+ "summary"
3430
+ ],
3204
3431
  "in": "title: \"a -- b\"\n # c\n",
3205
3432
  "out": "title: \"a -- b\"\n # c\n",
3206
3433
  "note": "modes.md §3.8.6 and §7.11 (spec 1.11.0): a more-indented comment line is a continuation line to this scan, so the quoted scalar yields no spans. A valid document, missed rather than damaged."
@@ -3209,7 +3436,11 @@
3209
3436
  "id": "en-us-yaml-sequence-item-second-key-declined",
3210
3437
  "rule": "dashes",
3211
3438
  "mode": "yaml",
3212
- "keys": ["title", "slug", "summary"],
3439
+ "keys": [
3440
+ "title",
3441
+ "slug",
3442
+ "summary"
3443
+ ],
3213
3444
  "in": "- title: \"a -- b\"\n slug: c -- d\n",
3214
3445
  "out": "- title: \"a -- b\"\n slug: c -- d\n",
3215
3446
  "note": "modes.md §7.11 (spec 1.11.0): in a sequence item the second key counts as more indented than the first, so `title`'s quoted scalar sees a continuation line and yields no spans; `slug` is consumed as part of that run. Pinned as the accepted miss it is."
@@ -3219,7 +3450,10 @@
3219
3450
  "rule": "dashes",
3220
3451
  "mode": "markdown",
3221
3452
  "dialect": "commonmark",
3222
- "frontmatterKeys": ["title", "slug"],
3453
+ "frontmatterKeys": [
3454
+ "title",
3455
+ "slug"
3456
+ ],
3223
3457
  "in": "---\ntitle: \"a -- b\"\n\nslug: c -- d\n\n---\n\nBody -- here.\n",
3224
3458
  "out": "---\ntitle: \"a—b\"\n\nslug: c—d\n\n---\n\nBody—here.\n",
3225
3459
  "note": "modes.md §3.7.4 and §3.8.4 step 7 (spec 1.11.0): blank lines between frontmatter entries and before the closing delimiter are not continuation lines, so both values convert. The block reuses the yaml scan, so this is the same change seen through markdown mode."
@@ -3228,7 +3462,9 @@
3228
3462
  "id": "en-us-yaml-cr-region-block-scalar-payload",
3229
3463
  "rule": "dashes",
3230
3464
  "mode": "yaml",
3231
- "keys": ["title"],
3465
+ "keys": [
3466
+ "title"
3467
+ ],
3232
3468
  "in": "run: |\n echo a\n\r x\n title: c -- d\n",
3233
3469
  "out": "run: |\n echo a\n\r x\n title: c -- d\n",
3234
3470
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): the line `\\r x` has indent 0 under the LF-only line model and ends the unlisted `run:` block's value run, so the next line used to be scanned as a mapping line of its own and converted. A line carrying a U+000D opens a region that runs to the first non-empty line in column 0 without one, and nothing in it yields a span. polytypo/polytypo#63."
@@ -3237,7 +3473,9 @@
3237
3473
  "id": "en-us-yaml-cr-region-key-opens-inside-the-cr-line",
3238
3474
  "rule": "dashes",
3239
3475
  "mode": "yaml",
3240
- "keys": ["title"],
3476
+ "keys": [
3477
+ "title"
3478
+ ],
3241
3479
  "in": "k:\n a\rrun: |\n title: c -- d\n",
3242
3480
  "out": "k:\n a\rrun: |\n title: c -- d\n",
3243
3481
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): a key shape opens inside the line that carries the U+000D, deeper than the piece after it. A region floored at the line's own indent misses this; the floor is column 0."
@@ -3246,7 +3484,9 @@
3246
3484
  "id": "en-us-yaml-cr-region-line-inside-another-run",
3247
3485
  "rule": "dashes",
3248
3486
  "mode": "yaml",
3249
- "keys": ["title"],
3487
+ "keys": [
3488
+ "title"
3489
+ ],
3250
3490
  "in": "a:\n run: |\n echo\n x\rfoo: |\n title: c -- d\n",
3251
3491
  "out": "a:\n run: |\n echo\n x\rfoo: |\n title: c -- d\n",
3252
3492
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): the line with the U+000D is consumed by another key's value run and never visited by the scan as a line of its own; the region is computed over all lines, not only visited ones."
@@ -3255,7 +3495,9 @@
3255
3495
  "id": "en-us-yaml-cr-region-comment-line",
3256
3496
  "rule": "dashes",
3257
3497
  "mode": "yaml",
3258
- "keys": ["title"],
3498
+ "keys": [
3499
+ "title"
3500
+ ],
3259
3501
  "in": "# note\rrun: |\n echo\n title: c -- d\n",
3260
3502
  "out": "# note\rrun: |\n echo\n title: c -- d\n",
3261
3503
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): the U+000D sits on a comment line, where no key is found; the region does not depend on the line having a key shape."
@@ -3264,7 +3506,9 @@
3264
3506
  "id": "en-us-yaml-cr-region-ends-at-column-zero",
3265
3507
  "rule": "dashes",
3266
3508
  "mode": "yaml",
3267
- "keys": ["slug"],
3509
+ "keys": [
3510
+ "slug"
3511
+ ],
3268
3512
  "in": "run: |\n echo a\n\r x\nslug: c -- d\n",
3269
3513
  "out": "run: |\n echo a\n\r x\nslug: c—d\n",
3270
3514
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): control: the first non-empty line in column 0 without a U+000D ends the region, so `slug` converts."
@@ -3273,7 +3517,9 @@
3273
3517
  "id": "en-us-yaml-cr-region-nested-cost",
3274
3518
  "rule": "dashes",
3275
3519
  "mode": "yaml",
3276
- "keys": ["title"],
3520
+ "keys": [
3521
+ "title"
3522
+ ],
3277
3523
  "in": "info:\n a: x\r b: y\n title: c -- d\n",
3278
3524
  "out": "info:\n a: x\r b: y\n title: c -- d\n",
3279
3525
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): the accepted cost: in a nested document the region reaches to the next column-0 line, so a real listed key after a U+000D is declined. A miss, never damage."
@@ -3282,7 +3528,9 @@
3282
3528
  "id": "en-us-yaml-cr-region-document-marker-cost",
3283
3529
  "rule": "dashes",
3284
3530
  "mode": "yaml",
3285
- "keys": ["title"],
3531
+ "keys": [
3532
+ "title"
3533
+ ],
3286
3534
  "in": "---\rinfo:\n title: a -- b\n",
3287
3535
  "out": "---\rinfo:\n title: a -- b\n",
3288
3536
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): the accepted cost: a document marker whose line carries a U+000D opens a region too."
@@ -3291,7 +3539,9 @@
3291
3539
  "id": "en-us-yaml-cr-region-crlf-is-a-terminator",
3292
3540
  "rule": "dashes",
3293
3541
  "mode": "yaml",
3294
- "keys": ["title"],
3542
+ "keys": [
3543
+ "title"
3544
+ ],
3295
3545
  "in": "info:\r\n title: a -- b\r\n",
3296
3546
  "out": "info:\r\n title: a—b\r\n",
3297
3547
  "note": "modes.md §3.8.4's carriage-return region (spec 1.11.0): control: a U+000D before U+000A is a terminator and belongs to no line, so it opens no region."
@@ -3301,7 +3551,9 @@
3301
3551
  "rule": "dashes",
3302
3552
  "mode": "markdown",
3303
3553
  "dialect": "commonmark",
3304
- "frontmatterKeys": ["title"],
3554
+ "frontmatterKeys": [
3555
+ "title"
3556
+ ],
3305
3557
  "in": "---\nrun: |\n echo a\n\r x\n title: c -- d\n---\n\nBody \"q\" here.\n",
3306
3558
  "out": "---\nrun: |\n echo a\n\r x\n title: c -- d\n---\n\nBody “q” here.\n",
3307
3559
  "note": "modes.md §3.7.4 and §3.8.4's carriage-return region (spec 1.11.0): the frontmatter block reuses the yaml scan, so the unlisted block's payload is declined there too and only the body converts."
@@ -3310,7 +3562,9 @@
3310
3562
  "id": "en-us-yaml-leak-seq-literal-block",
3311
3563
  "rule": "dashes",
3312
3564
  "mode": "yaml",
3313
- "keys": ["title"],
3565
+ "keys": [
3566
+ "title"
3567
+ ],
3314
3568
  "in": "- |\n title: c -- d\n",
3315
3569
  "out": "- |\n title: c -- d\n",
3316
3570
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a literal block scalar opened on a sequence entry; YAML reads `title: c -- d` as its content. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3319,7 +3573,9 @@
3319
3573
  "id": "en-us-yaml-leak-seq-folded-block",
3320
3574
  "rule": "dashes",
3321
3575
  "mode": "yaml",
3322
- "keys": ["title"],
3576
+ "keys": [
3577
+ "title"
3578
+ ],
3323
3579
  "in": "- >\n title: c -- d\n",
3324
3580
  "out": "- >\n title: c -- d\n",
3325
3581
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): the folded form of the same. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3328,7 +3584,9 @@
3328
3584
  "id": "en-us-yaml-leak-own-line-block-header",
3329
3585
  "rule": "dashes",
3330
3586
  "mode": "yaml",
3331
- "keys": ["title"],
3587
+ "keys": [
3588
+ "title"
3589
+ ],
3332
3590
  "in": "run:\n |\n title: c -- d\n",
3333
3591
  "out": "run:\n |\n title: c -- d\n",
3334
3592
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a block scalar header on a line of its own under an empty-valued key. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3337,7 +3595,9 @@
3337
3595
  "id": "en-us-yaml-leak-seq-double-quoted",
3338
3596
  "rule": "dashes",
3339
3597
  "mode": "yaml",
3340
- "keys": ["title"],
3598
+ "keys": [
3599
+ "title"
3600
+ ],
3341
3601
  "in": "- \"x\n title: c -- d\"\n",
3342
3602
  "out": "- \"x\n title: c -- d\"\n",
3343
3603
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a double-quoted scalar that continues onto the next line. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3346,7 +3606,9 @@
3346
3606
  "id": "en-us-yaml-leak-seq-single-quoted",
3347
3607
  "rule": "dashes",
3348
3608
  "mode": "yaml",
3349
- "keys": ["title"],
3609
+ "keys": [
3610
+ "title"
3611
+ ],
3350
3612
  "in": "- 'x\n title: c -- d'\n",
3351
3613
  "out": "- 'x\n title: c -- d'\n",
3352
3614
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): the single-quoted form; the closing quote used to be turned into U+2019. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3355,7 +3617,9 @@
3355
3617
  "id": "en-us-yaml-leak-quoted-key-block",
3356
3618
  "rule": "dashes",
3357
3619
  "mode": "yaml",
3358
- "keys": ["title"],
3620
+ "keys": [
3621
+ "title"
3622
+ ],
3359
3623
  "in": "\"a\": |\n title: c -- d\n",
3360
3624
  "out": "\"a\": |\n title: c -- d\n",
3361
3625
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a quoted key whose value is a block scalar. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3364,7 +3628,9 @@
3364
3628
  "id": "en-us-yaml-leak-special-char-key-block",
3365
3629
  "rule": "dashes",
3366
3630
  "mode": "yaml",
3367
- "keys": ["title"],
3631
+ "keys": [
3632
+ "title"
3633
+ ],
3368
3634
  "in": "a!b: |\n title: c -- d\n",
3369
3635
  "out": "a!b: |\n title: c -- d\n",
3370
3636
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a key holding a character step 5 declines, whose value is a block scalar. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3373,7 +3639,9 @@
3373
3639
  "id": "en-us-yaml-leak-special-char-key-quoted",
3374
3640
  "rule": "dashes",
3375
3641
  "mode": "yaml",
3376
- "keys": ["title"],
3642
+ "keys": [
3643
+ "title"
3644
+ ],
3377
3645
  "in": "a!b: \"x\n title: c -- d\"\n",
3378
3646
  "out": "a!b: \"x\n title: c -- d\"\n",
3379
3647
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): the same key with a quoted value that continues. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3382,7 +3650,9 @@
3382
3650
  "id": "en-us-yaml-leak-seq-flow-sequence",
3383
3651
  "rule": "dashes",
3384
3652
  "mode": "yaml",
3385
- "keys": ["title"],
3653
+ "keys": [
3654
+ "title"
3655
+ ],
3386
3656
  "in": "- [a,\n title: c -- d]\n",
3387
3657
  "out": "- [a,\n title: c -- d]\n",
3388
3658
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a flow sequence opened on a sequence entry. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3391,7 +3661,9 @@
3391
3661
  "id": "en-us-yaml-leak-seq-flow-mapping",
3392
3662
  "rule": "dashes",
3393
3663
  "mode": "yaml",
3394
- "keys": ["title"],
3664
+ "keys": [
3665
+ "title"
3666
+ ],
3395
3667
  "in": "- {a: 1,\n title: c -- d}\n",
3396
3668
  "out": "- {a: 1,\n title: c -- d}\n",
3397
3669
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a flow mapping opened on a sequence entry. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3400,7 +3672,9 @@
3400
3672
  "id": "en-us-yaml-leak-seq-anchored-block",
3401
3673
  "rule": "dashes",
3402
3674
  "mode": "yaml",
3403
- "keys": ["title"],
3675
+ "keys": [
3676
+ "title"
3677
+ ],
3404
3678
  "in": "- &x |\n title: c -- d\n",
3405
3679
  "out": "- &x |\n title: c -- d\n",
3406
3680
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): an anchored block scalar. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3409,7 +3683,9 @@
3409
3683
  "id": "en-us-yaml-leak-seq-tagged-block",
3410
3684
  "rule": "dashes",
3411
3685
  "mode": "yaml",
3412
- "keys": ["title"],
3686
+ "keys": [
3687
+ "title"
3688
+ ],
3413
3689
  "in": "- !!str |\n title: c -- d\n",
3414
3690
  "out": "- !!str |\n title: c -- d\n",
3415
3691
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a tagged block scalar. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3418,7 +3694,9 @@
3418
3694
  "id": "en-us-yaml-leak-own-line-anchored-block",
3419
3695
  "rule": "dashes",
3420
3696
  "mode": "yaml",
3421
- "keys": ["title"],
3697
+ "keys": [
3698
+ "title"
3699
+ ],
3422
3700
  "in": "run:\n &x |\n title: c -- d\n",
3423
3701
  "out": "run:\n &x |\n title: c -- d\n",
3424
3702
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): an anchored block scalar on a line of its own. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3427,7 +3705,9 @@
3427
3705
  "id": "en-us-yaml-leak-nested-seq-block",
3428
3706
  "rule": "dashes",
3429
3707
  "mode": "yaml",
3430
- "keys": ["title"],
3708
+ "keys": [
3709
+ "title"
3710
+ ],
3431
3711
  "in": "run:\n - |\n title: c -- d\n",
3432
3712
  "out": "run:\n - |\n title: c -- d\n",
3433
3713
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a block scalar in a sequence entry nested under a key. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3436,7 +3716,9 @@
3436
3716
  "id": "en-us-yaml-leak-explicit-key-block",
3437
3717
  "rule": "dashes",
3438
3718
  "mode": "yaml",
3439
- "keys": ["title"],
3719
+ "keys": [
3720
+ "title"
3721
+ ],
3440
3722
  "in": "? |\n title: c -- d\n: v\n",
3441
3723
  "out": "? |\n title: c -- d\n: v\n",
3442
3724
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a block scalar as an explicit key. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3445,7 +3727,9 @@
3445
3727
  "id": "en-us-yaml-leak-explicit-value-block",
3446
3728
  "rule": "dashes",
3447
3729
  "mode": "yaml",
3448
- "keys": ["title"],
3730
+ "keys": [
3731
+ "title"
3732
+ ],
3449
3733
  "in": "? a\n: |\n title: c -- d\n",
3450
3734
  "out": "? a\n: |\n title: c -- d\n",
3451
3735
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a block scalar as the value of an explicit key. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3454,7 +3738,9 @@
3454
3738
  "id": "en-us-yaml-leak-escaped-quote-not-a-key",
3455
3739
  "rule": "dashes",
3456
3740
  "mode": "yaml",
3457
- "keys": ["title"],
3741
+ "keys": [
3742
+ "title"
3743
+ ],
3458
3744
  "in": "- \"a\\\": x\n title: c -- d\"\n",
3459
3745
  "out": "- \"a\\\": x\n title: c -- d\"\n",
3460
3746
  "note": "modes.md §3.8.4 step 5 (spec 1.11.0, polytypo#64): a U+005C and the code point after it never close a double quote, so the quote opened after `- ` has no close on the line, the line is a node line and absorbs the line under it. Until 1.11.0 `title` converted."
@@ -3463,7 +3749,9 @@
3463
3749
  "id": "en-us-yaml-leak-escaped-quote-key-block",
3464
3750
  "rule": "dashes",
3465
3751
  "mode": "yaml",
3466
- "keys": ["title"],
3752
+ "keys": [
3753
+ "title"
3754
+ ],
3467
3755
  "in": "\"a\\\"b\": |\n title: c -- d\n",
3468
3756
  "out": "\"a\\\"b\": |\n title: c -- d\n",
3469
3757
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a quoted key holding an escape, whose value is a block scalar. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3472,7 +3760,9 @@
3472
3760
  "id": "en-us-yaml-leak-doubled-quote-not-a-key",
3473
3761
  "rule": "dashes",
3474
3762
  "mode": "yaml",
3475
- "keys": ["title"],
3763
+ "keys": [
3764
+ "title"
3765
+ ],
3476
3766
  "in": "- 'a'': x\n title: c -- d'\n",
3477
3767
  "out": "- 'a'': x\n title: c -- d'\n",
3478
3768
  "note": "modes.md §3.8.4 step 5 (spec 1.11.0, polytypo#64): `''` is one unit inside a single-quoted scalar, so the quote after `a'` does not close it, the line is a node line and absorbs the line under it. Until 1.11.0 `title` converted and the closing quote became U+2019."
@@ -3481,7 +3771,9 @@
3481
3771
  "id": "en-us-yaml-leak-own-line-flow",
3482
3772
  "rule": "dashes",
3483
3773
  "mode": "yaml",
3484
- "keys": ["title"],
3774
+ "keys": [
3775
+ "title"
3776
+ ],
3485
3777
  "in": "run:\n [a,\n title: c -- d]\n",
3486
3778
  "out": "run:\n [a,\n title: c -- d]\n",
3487
3779
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a flow sequence on a line of its own, whose continuation sits at the opening line's indent. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3490,7 +3782,9 @@
3490
3782
  "id": "en-us-yaml-leak-own-line-quote",
3491
3783
  "rule": "dashes",
3492
3784
  "mode": "yaml",
3493
- "keys": ["title"],
3785
+ "keys": [
3786
+ "title"
3787
+ ],
3494
3788
  "in": "run:\n \"x\n title: c -- d\"\n",
3495
3789
  "out": "run:\n \"x\n title: c -- d\"\n",
3496
3790
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a quote opened on a line of its own, continued at the same indent. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3499,7 +3793,9 @@
3499
3793
  "id": "en-us-yaml-leak-own-line-quote-deeper",
3500
3794
  "rule": "dashes",
3501
3795
  "mode": "yaml",
3502
- "keys": ["title"],
3796
+ "keys": [
3797
+ "title"
3798
+ ],
3503
3799
  "in": "run:\n \"x\n title: c -- d\"\n",
3504
3800
  "out": "run:\n \"x\n title: c -- d\"\n",
3505
3801
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a quote opened deeper than its continuation. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3508,7 +3804,9 @@
3508
3804
  "id": "en-us-yaml-leak-own-line-block-header-same-indent",
3509
3805
  "rule": "dashes",
3510
3806
  "mode": "yaml",
3511
- "keys": ["title"],
3807
+ "keys": [
3808
+ "title"
3809
+ ],
3512
3810
  "in": "run:\n |\n title: c -- d\n",
3513
3811
  "out": "run:\n |\n title: c -- d\n",
3514
3812
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a block scalar header whose content sits at the header's own indent. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3517,7 +3815,9 @@
3517
3815
  "id": "en-us-yaml-leak-root-quote",
3518
3816
  "rule": "dashes",
3519
3817
  "mode": "yaml",
3520
- "keys": ["title"],
3818
+ "keys": [
3819
+ "title"
3820
+ ],
3521
3821
  "in": "\"x\ntitle: c -- d\"\n",
3522
3822
  "out": "\"x\ntitle: c -- d\"\n",
3523
3823
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): a quoted scalar at the root of the document. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3526,7 +3826,9 @@
3526
3826
  "id": "en-us-yaml-leak-tab-line",
3527
3827
  "rule": "dashes",
3528
3828
  "mode": "yaml",
3529
- "keys": ["title"],
3829
+ "keys": [
3830
+ "title"
3831
+ ],
3530
3832
  "in": "a: \"x\ty\n title: c -- d\"\n",
3531
3833
  "out": "a: \"x\ty\n title: c -- d\"\n",
3532
3834
  "note": "modes.md §3.8.4 step 1 (spec 1.11.0, polytypo#64): a line with a tab yields no spans, but steps 2 to 7 still decide what it absorbs, and the quoted scalar it opens owns the line under it. Until 1.11.0 that line was scanned as a mapping line and `title` converted."
@@ -3535,7 +3837,9 @@
3535
3837
  "id": "en-us-yaml-leak-document-marker-block",
3536
3838
  "rule": "dashes",
3537
3839
  "mode": "yaml",
3538
- "keys": ["title"],
3840
+ "keys": [
3841
+ "title"
3842
+ ],
3539
3843
  "in": "--- |\n title: c -- d\n",
3540
3844
  "out": "--- |\n title: c -- d\n",
3541
3845
  "note": "modes.md §3.8.4 step 3 (spec 1.11.0, polytypo#64): a block scalar introduced on a document marker line in column 0. The marker absorbs the document, so `title` is not read as a key. Until 1.11.0 it converted."
@@ -3544,7 +3848,9 @@
3544
3848
  "id": "en-us-yaml-leak-document-marker-block-column-zero",
3545
3849
  "rule": "dashes",
3546
3850
  "mode": "yaml",
3547
- "keys": ["title"],
3851
+ "keys": [
3852
+ "title"
3853
+ ],
3548
3854
  "in": "--- |\ntitle: c -- d\n",
3549
3855
  "out": "--- |\ntitle: c -- d\n",
3550
3856
  "note": "modes.md §3.8.4 steps 3 to 7 (spec 1.11.0, polytypo#64): the same with content in column 0. A line that opens a node and is not a listed key's value absorbs the lines under it, so `title` is not scanned as a key. Until 1.11.0 it was, and converted."
@@ -3553,7 +3859,9 @@
3553
3859
  "id": "en-us-yaml-ok-empty-item-mapping",
3554
3860
  "rule": "dashes",
3555
3861
  "mode": "yaml",
3556
- "keys": ["title"],
3862
+ "keys": [
3863
+ "title"
3864
+ ],
3557
3865
  "in": "-\n title: c -- d\n",
3558
3866
  "out": "-\n title: c—d\n",
3559
3867
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a sequence marker with nothing after it opens a nested mapping, whose lines are scanned."
@@ -3562,7 +3870,9 @@
3562
3870
  "id": "en-us-yaml-ok-nested-empty-items",
3563
3871
  "rule": "dashes",
3564
3872
  "mode": "yaml",
3565
- "keys": ["title"],
3873
+ "keys": [
3874
+ "title"
3875
+ ],
3566
3876
  "in": "- -\n title: c -- d\n",
3567
3877
  "out": "- -\n title: c—d\n",
3568
3878
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: nested empty sequence markers."
@@ -3571,7 +3881,9 @@
3571
3881
  "id": "en-us-yaml-ok-quoted-key-sibling",
3572
3882
  "rule": "dashes",
3573
3883
  "mode": "yaml",
3574
- "keys": ["title"],
3884
+ "keys": [
3885
+ "title"
3886
+ ],
3575
3887
  "in": "- \"a\": 1\n title: c -- d\n",
3576
3888
  "out": "- \"a\": 1\n title: c—d\n",
3577
3889
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a quoted key closes on its line and is followed by a colon, so `title` is a sibling key and converts."
@@ -3580,7 +3892,9 @@
3580
3892
  "id": "en-us-yaml-ok-single-quoted-key-sibling",
3581
3893
  "rule": "dashes",
3582
3894
  "mode": "yaml",
3583
- "keys": ["title"],
3895
+ "keys": [
3896
+ "title"
3897
+ ],
3584
3898
  "in": "- 'a''b': 1\n title: c -- d\n",
3585
3899
  "out": "- 'a''b': 1\n title: c—d\n",
3586
3900
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: the single-quoted form with `''` in the key."
@@ -3589,7 +3903,9 @@
3589
3903
  "id": "en-us-yaml-ok-quoted-key-nested",
3590
3904
  "rule": "dashes",
3591
3905
  "mode": "yaml",
3592
- "keys": ["title"],
3906
+ "keys": [
3907
+ "title"
3908
+ ],
3593
3909
  "in": "\"k\":\n title: c -- d\n",
3594
3910
  "out": "\"k\":\n title: c—d\n",
3595
3911
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a quoted key with an empty value opens a nested mapping."
@@ -3598,7 +3914,9 @@
3598
3914
  "id": "en-us-yaml-ok-quoted-item-then-item",
3599
3915
  "rule": "dashes",
3600
3916
  "mode": "yaml",
3601
- "keys": ["title"],
3917
+ "keys": [
3918
+ "title"
3919
+ ],
3602
3920
  "in": "- \"x\"\n- title: c -- d\n",
3603
3921
  "out": "- \"x\"\n- title: c—d\n",
3604
3922
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a closed quoted scalar followed by a sibling entry."
@@ -3607,7 +3925,9 @@
3607
3925
  "id": "en-us-yaml-ok-block-item-then-item",
3608
3926
  "rule": "dashes",
3609
3927
  "mode": "yaml",
3610
- "keys": ["title"],
3928
+ "keys": [
3929
+ "title"
3930
+ ],
3611
3931
  "in": "- |\n a\n- title: c -- d\n",
3612
3932
  "out": "- |\n a\n- title: c—d\n",
3613
3933
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a block scalar ends at the next entry at its own indent."
@@ -3616,7 +3936,9 @@
3616
3936
  "id": "en-us-yaml-ok-quoted-item-blank-then-key",
3617
3937
  "rule": "dashes",
3618
3938
  "mode": "yaml",
3619
- "keys": ["title"],
3939
+ "keys": [
3940
+ "title"
3941
+ ],
3620
3942
  "in": "- \"x\"\n\ntitle: c -- d\n",
3621
3943
  "out": "- \"x\"\n\ntitle: c—d\n",
3622
3944
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a blank line and a column-0 key after a closed quoted scalar."
@@ -3625,7 +3947,9 @@
3625
3947
  "id": "en-us-yaml-ok-special-char-key-sibling",
3626
3948
  "rule": "dashes",
3627
3949
  "mode": "yaml",
3628
- "keys": ["title"],
3950
+ "keys": [
3951
+ "title"
3952
+ ],
3629
3953
  "in": "- a!b: 1\n title: c -- d\n",
3630
3954
  "out": "- a!b: 1\n title: c—d\n",
3631
3955
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a declined key with a plain value absorbs nothing."
@@ -3634,7 +3958,9 @@
3634
3958
  "id": "en-us-yaml-ok-quoted-key-comment",
3635
3959
  "rule": "dashes",
3636
3960
  "mode": "yaml",
3637
- "keys": ["title"],
3961
+ "keys": [
3962
+ "title"
3963
+ ],
3638
3964
  "in": "\"a\": # note\n title: c -- d\n",
3639
3965
  "out": "\"a\": # note\n title: c—d\n",
3640
3966
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a quoted key with only a comment after the colon absorbs nothing."
@@ -3643,7 +3969,9 @@
3643
3969
  "id": "en-us-yaml-ok-quoted-key-quoted-value",
3644
3970
  "rule": "dashes",
3645
3971
  "mode": "yaml",
3646
- "keys": ["title"],
3972
+ "keys": [
3973
+ "title"
3974
+ ],
3647
3975
  "in": "- \"a\": \"b\"\n title: c -- d\n",
3648
3976
  "out": "- \"a\": \"b\"\n title: c—d\n",
3649
3977
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a quoted key whose quoted value closes cleanly absorbs nothing."
@@ -3652,7 +3980,9 @@
3652
3980
  "id": "en-us-yaml-ok-comment-line-in-nest",
3653
3981
  "rule": "dashes",
3654
3982
  "mode": "yaml",
3655
- "keys": ["title"],
3983
+ "keys": [
3984
+ "title"
3985
+ ],
3656
3986
  "in": "info:\n# c\n title: c -- d\n",
3657
3987
  "out": "info:\n# c\n title: c—d\n",
3658
3988
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a comment line absorbs nothing."
@@ -3661,7 +3991,9 @@
3661
3991
  "id": "en-us-yaml-ok-comment-after-marker",
3662
3992
  "rule": "dashes",
3663
3993
  "mode": "yaml",
3664
- "keys": ["title"],
3994
+ "keys": [
3995
+ "title"
3996
+ ],
3665
3997
  "in": "- # c\n title: c -- d\n",
3666
3998
  "out": "- # c\n title: c—d\n",
3667
3999
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a sequence marker followed only by a comment opens a nested mapping."
@@ -3670,7 +4002,9 @@
3670
4002
  "id": "en-us-yaml-ok-crlf-quoted-key-nested",
3671
4003
  "rule": "dashes",
3672
4004
  "mode": "yaml",
3673
- "keys": ["title"],
4005
+ "keys": [
4006
+ "title"
4007
+ ],
3674
4008
  "in": "\"k\":\r\n title: c -- d\r\n",
3675
4009
  "out": "\"k\":\r\n title: c—d\r\n",
3676
4010
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: CRLF terminators change nothing."
@@ -3679,7 +4013,9 @@
3679
4013
  "id": "en-us-yaml-ok-openapi-path",
3680
4014
  "rule": "dashes",
3681
4015
  "mode": "yaml",
3682
- "keys": ["summary"],
4016
+ "keys": [
4017
+ "summary"
4018
+ ],
3683
4019
  "in": "paths:\n /users/{id}:\n get:\n summary: c -- d\n",
3684
4020
  "out": "paths:\n /users/{id}:\n get:\n summary: c—d\n",
3685
4021
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: an OpenAPI path key with braces has an empty value and absorbs nothing, so the operations under it are scanned."
@@ -3688,7 +4024,9 @@
3688
4024
  "id": "en-us-yaml-ok-explicit-value-mapping",
3689
4025
  "rule": "dashes",
3690
4026
  "mode": "yaml",
3691
- "keys": ["title"],
4027
+ "keys": [
4028
+ "title"
4029
+ ],
3692
4030
  "in": "? a\n: title: c -- d\n",
3693
4031
  "out": "? a\n: title: c—d\n",
3694
4032
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: a mapping as the value of an explicit key converts."
@@ -3697,7 +4035,9 @@
3697
4035
  "id": "en-us-yaml-cost-anchor-only-line",
3698
4036
  "rule": "dashes",
3699
4037
  "mode": "yaml",
3700
- "keys": ["title"],
4038
+ "keys": [
4039
+ "title"
4040
+ ],
3701
4041
  "in": "- &x\n title: c -- d\n",
3702
4042
  "out": "- &x\n title: c -- d\n",
3703
4043
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): a line holding only an anchor opens a nested node that YAML reads as a mapping, but the scan absorbs its lines."
@@ -3706,7 +4046,9 @@
3706
4046
  "id": "en-us-yaml-cost-quoted-key-block-sibling",
3707
4047
  "rule": "dashes",
3708
4048
  "mode": "yaml",
3709
- "keys": ["title"],
4049
+ "keys": [
4050
+ "title"
4051
+ ],
3710
4052
  "in": "- \"a\": |\n title: c -- d\n",
3711
4053
  "out": "- \"a\": |\n title: c -- d\n",
3712
4054
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): a declined key with a block scalar absorbs a sibling at the entry's indent that YAML reads as a key."
@@ -3715,7 +4057,9 @@
3715
4057
  "id": "en-us-yaml-cost-own-line-region-sibling",
3716
4058
  "rule": "dashes",
3717
4059
  "mode": "yaml",
3718
- "keys": ["title"],
4060
+ "keys": [
4061
+ "title"
4062
+ ],
3719
4063
  "in": "info:\n description:\n \"x\n y\"\n title: c -- d\n",
3720
4064
  "out": "info:\n description:\n \"x\n y\"\n title: c -- d\n",
3721
4065
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): the own-line region ends only at column 0, so a sibling key at a deeper indent is absorbed."
@@ -3724,7 +4068,9 @@
3724
4068
  "id": "en-us-yaml-ok-own-line-region-column-zero",
3725
4069
  "rule": "dashes",
3726
4070
  "mode": "yaml",
3727
- "keys": ["title"],
4071
+ "keys": [
4072
+ "title"
4073
+ ],
3728
4074
  "in": "info:\n description:\n \"x\n y\"\ntitle: c -- d\n",
3729
4075
  "out": "info:\n description:\n \"x\n y\"\ntitle: c—d\n",
3730
4076
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: the own-line region ends at the first line in column 0."
@@ -3734,7 +4080,9 @@
3734
4080
  "rule": "dashes",
3735
4081
  "mode": "markdown",
3736
4082
  "dialect": "commonmark",
3737
- "frontmatterKeys": ["title"],
4083
+ "frontmatterKeys": [
4084
+ "title"
4085
+ ],
3738
4086
  "in": "---\nnotes:\n |\n title: c -- d\n---\n\nBody -- here.\n",
3739
4087
  "out": "---\nnotes:\n |\n title: c -- d\n---\n\nBody—here.\n",
3740
4088
  "note": "modes.md §3.7.4 and §3.8.4 (spec 1.11.0, polytypo#64): the frontmatter block reuses the yaml scan, so a block scalar header on a line of its own absorbs its content there too, and the body is unaffected."
@@ -3743,7 +4091,9 @@
3743
4091
  "id": "en-us-yaml-ok-escaped-quote-key-sibling",
3744
4092
  "rule": "dashes",
3745
4093
  "mode": "yaml",
3746
- "keys": ["title"],
4094
+ "keys": [
4095
+ "title"
4096
+ ],
3747
4097
  "in": "\"a\\\"b\": 1\ntitle: c -- d\n",
3748
4098
  "out": "\"a\\\"b\": 1\ntitle: c—d\n",
3749
4099
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: step 5 skips a U+005C and the code point after it, so `\"a\\\"b\"` closes on its line and is a quoted key; `title` at column 0 is not under it and converts."
@@ -3752,7 +4102,9 @@
3752
4102
  "id": "en-us-yaml-ok-anchored-key-column-zero",
3753
4103
  "rule": "dashes",
3754
4104
  "mode": "yaml",
3755
- "keys": ["title"],
4105
+ "keys": [
4106
+ "title"
4107
+ ],
3756
4108
  "in": "&a k: v\ntitle: c -- d\n",
3757
4109
  "out": "&a k: v\ntitle: c—d\n",
3758
4110
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: an anchored key in column 0 is a node line without a region, so a sibling at column 0 converts."
@@ -3761,7 +4113,9 @@
3761
4113
  "id": "en-us-yaml-ok-indented-document-marker-text",
3762
4114
  "rule": "dashes",
3763
4115
  "mode": "yaml",
3764
- "keys": ["title"],
4116
+ "keys": [
4117
+ "title"
4118
+ ],
3765
4119
  "in": "a:\n --- x: 1\ntitle: c -- d\n",
3766
4120
  "out": "a:\n --- x: 1\ntitle: c—d\n",
3767
4121
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): control: YAML reads a document marker only in column 0, so an indented `--- x: 1` absorbs nothing and `title` converts."
@@ -3770,7 +4124,9 @@
3770
4124
  "id": "en-us-yaml-cost-explicit-key-in-entry",
3771
4125
  "rule": "dashes",
3772
4126
  "mode": "yaml",
3773
- "keys": ["title"],
4127
+ "keys": [
4128
+ "title"
4129
+ ],
3774
4130
  "in": "- ? a\n : b\n title: c -- d\n",
3775
4131
  "out": "- ? a\n : b\n title: c -- d\n",
3776
4132
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): an explicit key inside an entry is a node line that absorbs the lines under it, though YAML reads `title` as a sibling."
@@ -3779,7 +4135,9 @@
3779
4135
  "id": "en-us-yaml-cost-flow-key-column-zero",
3780
4136
  "rule": "dashes",
3781
4137
  "mode": "yaml",
3782
- "keys": ["title"],
4138
+ "keys": [
4139
+ "title"
4140
+ ],
3783
4141
  "in": "{a: 1}: v\ntitle: c -- d\n",
3784
4142
  "out": "{a: 1}: v\ntitle: c -- d\n",
3785
4143
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): a flow collection at indent 0 absorbs the rest of the document, though YAML reads `title` as a root key."
@@ -3788,7 +4146,9 @@
3788
4146
  "id": "en-us-yaml-cost-document-marker-tag",
3789
4147
  "rule": "dashes",
3790
4148
  "mode": "yaml",
3791
- "keys": ["title"],
4149
+ "keys": [
4150
+ "title"
4151
+ ],
3792
4152
  "in": "--- !t\ntitle: c -- d\n",
3793
4153
  "out": "--- !t\ntitle: c -- d\n",
3794
4154
  "note": "modes.md §3.8.4 (spec 1.11.0, polytypo#64): accepted miss (§7.11): a document marker in column 0 followed by a tag absorbs the document."
@@ -4147,7 +4507,9 @@
4147
4507
  "id": "en-us-protect-throws-yaml",
4148
4508
  "rule": "dashes",
4149
4509
  "mode": "yaml",
4150
- "keys": ["title"],
4510
+ "keys": [
4511
+ "title"
4512
+ ],
4151
4513
  "in": "title: a -- b\n",
4152
4514
  "protect": [
4153
4515
  {
@@ -4631,6 +4993,114 @@
4631
4993
  },
4632
4994
  "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
4995
  },
4996
+ {
4997
+ "id": "en-us-quote-punctuation-html-line-break-gap",
4998
+ "rule": "quote-punctuation",
4999
+ "mode": "html",
5000
+ "in": "<p>She said \"hello\".</p>\n<p>Next.</p>",
5001
+ "out": "<p>She said “hello.”</p>\n<p>Next.</p>",
5002
+ "rules": {
5003
+ "quote-punctuation": true
5004
+ },
5005
+ "note": "quote-punctuation.md §3.3, §6 row H6; modes.md §3.6: the whitespace-only text node holding the line feed is not a span, so the gap is a -2 marker at cp[i+2] and C4 holds."
5006
+ },
5007
+ {
5008
+ "id": "en-us-quote-punctuation-html-blank-lines-gap",
5009
+ "rule": "quote-punctuation",
5010
+ "mode": "html",
5011
+ "in": "<p>She said \"hello\".</p>\n\n <p>Next.</p>",
5012
+ "out": "<p>She said “hello.”</p>\n\n <p>Next.</p>",
5013
+ "rules": {
5014
+ "quote-punctuation": true
5015
+ },
5016
+ "note": "modes.md §3.6: a whitespace-only text node of line feeds and spaces is skipped whole."
5017
+ },
5018
+ {
5019
+ "id": "en-us-quote-punctuation-html-crlf-gap",
5020
+ "rule": "quote-punctuation",
5021
+ "mode": "html",
5022
+ "in": "<p>She said \"hello\".</p>\r\n<p>Next.</p>",
5023
+ "out": "<p>She said “hello.”</p>\r\n<p>Next.</p>",
5024
+ "rules": {
5025
+ "quote-punctuation": true
5026
+ },
5027
+ "note": "modes.md §3.6: a run of CR and LF is whitespace-only with a line break, so it is not a span."
5028
+ },
5029
+ {
5030
+ "id": "en-us-quote-punctuation-html-form-feed-gap",
5031
+ "rule": "quote-punctuation",
5032
+ "mode": "html",
5033
+ "in": "<p>She said \"hello\".</p>\f<p>Next.</p>",
5034
+ "out": "<p>She said “hello.”</p>\f<p>Next.</p>",
5035
+ "rules": {
5036
+ "quote-punctuation": true
5037
+ },
5038
+ "note": "modes.md §3.6: U+000C is a line terminator in §3.2's sense, so a run of it between the blocks is not a span."
5039
+ },
5040
+ {
5041
+ "id": "en-us-quote-punctuation-html-reference-in-gap-space",
5042
+ "rule": "quote-punctuation",
5043
+ "mode": "html",
5044
+ "in": "<p>She said \"hello\".</p>\n&#32;\n<p>Next.</p>",
5045
+ "out": "<p>She said “hello”.</p>\n&#32;\n<p>Next.</p>",
5046
+ "rules": {
5047
+ "quote-punctuation": true
5048
+ },
5049
+ "note": "modes.md §3.6: a character reference is never whitespace for the test, so the run stays spans and the markers are -1."
5050
+ },
5051
+ {
5052
+ "id": "en-us-quote-punctuation-html-reference-in-gap-amp",
5053
+ "rule": "quote-punctuation",
5054
+ "mode": "html",
5055
+ "in": "<p>She said \"hello\".</p>\n&amp;\n<p>Next.</p>",
5056
+ "out": "<p>She said “hello”.</p>\n&amp;\n<p>Next.</p>",
5057
+ "rules": {
5058
+ "quote-punctuation": true
5059
+ },
5060
+ "note": "modes.md §3.6: as for &#32;, the reference keeps the run processable."
5061
+ },
5062
+ {
5063
+ "id": "en-us-quote-punctuation-html-trailing-line-break",
5064
+ "rule": "quote-punctuation",
5065
+ "mode": "html",
5066
+ "in": "<p>She said \"hello\".</p>\n",
5067
+ "out": "<p>She said “hello.”</p>\n",
5068
+ "rules": {
5069
+ "quote-punctuation": true
5070
+ },
5071
+ "note": "modes.md §3.6, §3.5 step 2: the trailing line feed is not a span and leaves no marker, so cp[i+2] is NONE and the stop moves."
5072
+ },
5073
+ {
5074
+ "id": "en-us-quote-punctuation-markdown-html-block-line-break-gap",
5075
+ "rule": "quote-punctuation",
5076
+ "mode": "markdown",
5077
+ "dialect": "commonmark",
5078
+ "in": "<div>\n<p>She said \"hello\".</p>\n<p>Next.</p>\n</div>\n",
5079
+ "out": "<div>\n<p>She said “hello.”</p>\n<p>Next.</p>\n</div>\n",
5080
+ "rules": {
5081
+ "quote-punctuation": true
5082
+ },
5083
+ "note": "modes.md §3.6, §3.7.3: a markdown HTML block uses the html rule, so the line feed between the paragraphs is a -2 marker."
5084
+ },
5085
+ {
5086
+ "id": "en-us-quote-punctuation-html-space-only-node",
5087
+ "rule": "quote-punctuation",
5088
+ "mode": "html",
5089
+ "in": "<p>She said \"hello\".</p> <p>Next.</p>",
5090
+ "out": "<p>She said “hello”.</p> <p>Next.</p>",
5091
+ "rules": {
5092
+ "quote-punctuation": true
5093
+ },
5094
+ "note": "modes.md §3.6: a whitespace-only text node with no line break is still a span, so the markers around it are -1 and C4 fails."
5095
+ },
5096
+ {
5097
+ "id": "en-us-dashes-html-spaced-hyphen-on-own-line",
5098
+ "rule": "dashes",
5099
+ "mode": "html",
5100
+ "in": "<p>a</p>\n<p> - </p>\n<p>b</p>",
5101
+ "out": "<p>a</p>\n<p> - </p>\n<p>b</p>",
5102
+ "note": "modes.md §3.6, accepted cost: the line feeds around the paragraph are -2 markers, a BREAK at cp[L] and cp[R], so dashes declines the token as it does in text mode."
5103
+ },
4634
5104
  {
4635
5105
  "id": "en-us-quote-punctuation-markdown-commonmark-one-span",
4636
5106
  "rule": "quote-punctuation",
@@ -4749,6 +5219,68 @@
4749
5219
  "quote-punctuation": true
4750
5220
  },
4751
5221
  "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."
5222
+ },
5223
+ {
5224
+ "id": "en-us-nbsp-closed-nbsp-deleted",
5225
+ "rule": "nbsp",
5226
+ "mode": "text",
5227
+ "in": "Value 5 % here",
5228
+ "out": "Value 5% here",
5229
+ "note": "spec 1.22.0, nbsp.md §3.7: a typed U+00A0 before a closedUnits entry is deleted as well as a U+0020."
5230
+ },
5231
+ {
5232
+ "id": "en-us-nbsp-closed-guard-modulo",
5233
+ "rule": "nbsp",
5234
+ "mode": "text",
5235
+ "in": "Compute 10 % 3 and 10 % of it",
5236
+ "out": "Compute 10 % 3 and 10% of it",
5237
+ "note": "nbsp.md §3.7 step 5.4: a space followed by a digit after the sign reads as a modulo operation, so the space is kept; `10 % of it` is prose and is closed up."
5238
+ },
5239
+ {
5240
+ "id": "en-us-nbsp-closed-guard-letter-before",
5241
+ "rule": "nbsp",
5242
+ "mode": "text",
5243
+ "in": "Use A4 % and 5 %s",
5244
+ "out": "Use A4 % and 5 %s",
5245
+ "note": "The digit run is preceded by a letter, and `%s` continues with a letter: neither is a percentage."
5246
+ },
5247
+ {
5248
+ "id": "en-us-nbsp-closed-spaced-unit-inserted",
5249
+ "rule": "nbsp",
5250
+ "mode": "text",
5251
+ "in": "Weigh 5kg of 20mL",
5252
+ "out": "Weigh 5 kg of 20 mL",
5253
+ "note": "spec 1.22.0: `kg` and `mL` are in spacedUnits for en-US (NIST §7.2, Chicago)."
5254
+ },
5255
+ {
5256
+ "id": "en-us-nbsp-single-letter-unit-untouched",
5257
+ "rule": "nbsp",
5258
+ "mode": "text",
5259
+ "in": "It was 5m long in the 1970s for £2m",
5260
+ "out": "It was 5m long in the 1970s for £2m",
5261
+ "note": "Single-letter symbols are in beforeUnits only, so nothing is inserted into `5m`, `1970s` or `£2m`."
5262
+ },
5263
+ {
5264
+ "id": "en-us-nbsp-closed-guard-range-dash",
5265
+ "rule": "nbsp",
5266
+ "mode": "text",
5267
+ "in": "Grew 15 % - 20 % in a year",
5268
+ "out": "Grew 15 %—20 % in a year",
5269
+ "note": "nbsp.md §3.7 step 5.3: a closed-up symbol beside a dash decides whether `ranges` and `dashes` read a range, so N5 leaves the spacing as typed; closing the space afterwards would give the next pass a different verdict.",
5270
+ "rules": {
5271
+ "ranges": true
5272
+ }
5273
+ },
5274
+ {
5275
+ "id": "en-us-nbsp-spaced-guard-multiplication",
5276
+ "rule": "nbsp",
5277
+ "mode": "text",
5278
+ "in": "Packs of 2 x 3kg",
5279
+ "out": "Packs of 2 x 3kg",
5280
+ "note": "nbsp.md §3.7 step 5.5: the number is the right operand of a multiplication chain, which `symbols` declines to convert while a letter follows it; inserting U+00A0 would end the chain with a non-letter and the next pass would convert it.",
5281
+ "rules": {
5282
+ "ranges": true
5283
+ }
4752
5284
  }
4753
5285
  ]
4754
5286
  }