polytypo 1.23.0 → 1.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/polytypo/data/VERSION +1 -1
  3. data/lib/polytypo/data/fixtures/bg.json +1 -1
  4. data/lib/polytypo/data/fixtures/cs.json +1 -1
  5. data/lib/polytypo/data/fixtures/de-CH.json +1 -1
  6. data/lib/polytypo/data/fixtures/de-DE.json +1 -1
  7. data/lib/polytypo/data/fixtures/el.json +1 -1
  8. data/lib/polytypo/data/fixtures/en-GB.json +1 -1
  9. data/lib/polytypo/data/fixtures/en-US.json +105 -1
  10. data/lib/polytypo/data/fixtures/es.json +1 -1
  11. data/lib/polytypo/data/fixtures/fi.json +1 -1
  12. data/lib/polytypo/data/fixtures/fr-CA.json +1 -1
  13. data/lib/polytypo/data/fixtures/fr.json +1 -1
  14. data/lib/polytypo/data/fixtures/hr.json +1 -1
  15. data/lib/polytypo/data/fixtures/hu.json +1 -1
  16. data/lib/polytypo/data/fixtures/it.json +1 -1
  17. data/lib/polytypo/data/fixtures/locale-resolution.json +1 -1
  18. data/lib/polytypo/data/fixtures/lt.json +1 -1
  19. data/lib/polytypo/data/fixtures/nl.json +1 -1
  20. data/lib/polytypo/data/fixtures/pl.json +1 -1
  21. data/lib/polytypo/data/fixtures/pt-BR.json +1 -1
  22. data/lib/polytypo/data/fixtures/pt-PT.json +1 -1
  23. data/lib/polytypo/data/fixtures/ro.json +1 -1
  24. data/lib/polytypo/data/fixtures/ru.json +1 -1
  25. data/lib/polytypo/data/fixtures/sk.json +1 -1
  26. data/lib/polytypo/data/fixtures/sl.json +1 -1
  27. data/lib/polytypo/data/fixtures/sr.json +1 -1
  28. data/lib/polytypo/data/fixtures/sv.json +1 -1
  29. data/lib/polytypo/data/fixtures/tr.json +1 -1
  30. data/lib/polytypo/data/fixtures/uk.json +1 -1
  31. data/lib/polytypo/data/locales/registry.json +1 -1
  32. data/lib/polytypo/data/rules/modes.md +14 -1
  33. data/lib/polytypo/data/rules/order.json +1 -1
  34. data/lib/polytypo/version.rb +1 -1
  35. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf32a1fd59f440c4a84d20c8bfc7b060dedbe31ef49645157c7c6a9444de5ee2
4
- data.tar.gz: b5dbda1251e0ba0126e3c7c5434d499222043ffac43b54ceb3de59e522f3b9e8
3
+ metadata.gz: 8f74fea845cc17b2d5a9a07e0193e5647ff6ee25cc4f0c0d221596ebca73990c
4
+ data.tar.gz: 8a2b56d4f013163991580c5998716be7859e927552ff893484079dc946491c8b
5
5
  SHA512:
6
- metadata.gz: 6b4fbc155ef5232f02f6dae3e2a487d0ef538e51840f7d5d344f08734810553e66c9dcfba93838926e65c95e73a9c7d0aaf43342152bbc82c8423c479c9e84ac
7
- data.tar.gz: d8149021c09b493ed7cd2e77275e893898e1be9502856797a2e01d8c89eedae0b370681cb4e4e8e30dcc5333330bd666777bd1e6a730d881f209f7d53c632566
6
+ metadata.gz: bbbfceca0a5597e9e874c90a3585da7477e14f7fe88d77eb47835e1e949e91c5b643de074ba81925266dd9387a7aea20f04acc83e370ecfc0eb2c9dc0d0a2000
7
+ data.tar.gz: 1563e1be46c7cf334d7f07913763c42689214c7d72d3cd9e31971c93523282ffbdff8effdc3fba7c77252c94e1a442ad8a46c4a1aff93938abf51ad5ff83ce45
@@ -1 +1 @@
1
- 1.23.0
1
+ 1.23.1
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "bg",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "cs",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "de-CH",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "de-DE",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "el",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "en-GB",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "en-US",
4
4
  "cases": [
5
5
  {
@@ -5281,6 +5281,110 @@
5281
5281
  "rules": {
5282
5282
  "ranges": true
5283
5283
  }
5284
+ },
5285
+ {
5286
+ "id": "en-us-apostrophe-html-stray-end-tag-gap",
5287
+ "rule": "apostrophe",
5288
+ "mode": "html",
5289
+ "in": "<p>dogs'</span> bones</p>",
5290
+ "out": "<p>dogs’</span> bones</p>",
5291
+ "note": "modes.md §3.6: an end tag with no open element is markup; the run around it is two spans with a −1 between, so the apostrophe is word-final."
5292
+ },
5293
+ {
5294
+ "id": "en-us-apostrophe-html-stray-end-tag-no-parent",
5295
+ "rule": "apostrophe",
5296
+ "mode": "html",
5297
+ "in": "dogs'</span> bones",
5298
+ "out": "dogs’</span> bones",
5299
+ "note": "modes.md §3.6: the same at the document level, where the parser has no element at all."
5300
+ },
5301
+ {
5302
+ "id": "en-us-apostrophe-html-stray-end-tag-newline-in-tag",
5303
+ "rule": "apostrophe",
5304
+ "mode": "html",
5305
+ "in": "<p>dogs'</span\n> bones</p>",
5306
+ "out": "<p>dogs’</span\n> bones</p>",
5307
+ "note": "modes.md §3.6, §3.2: the apostrophe is word-final before either marker, so this pins only that the tag's own bytes are not edited; the marker is pinned by the dashes cases below."
5308
+ },
5309
+ {
5310
+ "id": "en-us-apostrophe-html-stray-body-start-tag",
5311
+ "rule": "apostrophe",
5312
+ "mode": "html",
5313
+ "in": "<p>dogs'<body class=\"a\"> bones</p>",
5314
+ "out": "<p>dogs’<body class=\"a\"> bones</p>",
5315
+ "note": "modes.md §3.6: a start tag the parser ignores (a second body) is markup too, and its attribute is untouched."
5316
+ },
5317
+ {
5318
+ "id": "en-us-apostrophe-html-empty-end-tag",
5319
+ "rule": "apostrophe",
5320
+ "mode": "html",
5321
+ "in": "<p>dogs'</> bones</p>",
5322
+ "out": "<p>dogs’</> bones</p>",
5323
+ "note": "modes.md §3.6: `</>` is dropped by the tokenizer but is still a tag in the source."
5324
+ },
5325
+ {
5326
+ "id": "en-us-quotes-html-stray-end-tag-single-pair",
5327
+ "rule": "quotes",
5328
+ "mode": "html",
5329
+ "in": "<p>say 'hi</span> there' ok</p>",
5330
+ "out": "<p>say “hi</span> there” ok</p>",
5331
+ "note": "modes.md §3.6: a pair opens and closes across an ignored tag, the boundary being a −1."
5332
+ },
5333
+ {
5334
+ "id": "en-us-quotes-html-stray-end-tag-attribute-quotes-untouched",
5335
+ "rule": "quotes",
5336
+ "mode": "html",
5337
+ "in": "<p>say \"a</span title=\"x y\"> b\" ok</p>",
5338
+ "out": "<p>say “a</span title=\"x y\"> b” ok</p>",
5339
+ "note": "modes.md §3.6: the quotes inside the ignored tag's attribute are source, never text."
5340
+ },
5341
+ {
5342
+ "id": "en-us-dashes-html-stray-end-tag-gap",
5343
+ "rule": "dashes",
5344
+ "mode": "html",
5345
+ "in": "<p>a - </span>b</p>",
5346
+ "out": "<p>a—</span>b</p>",
5347
+ "note": "modes.md §3.6, §3.2: the ignored end tag is a −1 gap, so the spaced hyphen is a dash."
5348
+ },
5349
+ {
5350
+ "id": "en-us-dashes-html-stray-end-tag-line-feed-in-tag",
5351
+ "rule": "dashes",
5352
+ "mode": "html",
5353
+ "in": "<p>a - </span\n>b</p>",
5354
+ "out": "<p>a - </span\n>b</p>",
5355
+ "note": "modes.md §3.2: the gap holds a line terminator inside the tag, so the marker is −2 and the spaced hyphen stays, exactly as beside a well-formed tag with a line feed in it."
5356
+ },
5357
+ {
5358
+ "id": "en-us-dashes-html-stray-end-tag-quoted-gt",
5359
+ "rule": "dashes",
5360
+ "mode": "html",
5361
+ "in": "<p>a - </span title=\"a>b\">c</p>",
5362
+ "out": "<p>a—</span title=\"a>b\">c</p>",
5363
+ "note": "modes.md §3.6: a `>` inside a quoted attribute value does not end the ignored tag."
5364
+ },
5365
+ {
5366
+ "id": "en-us-apostrophe-html-stray-html-start-tag",
5367
+ "rule": "apostrophe",
5368
+ "mode": "html",
5369
+ "in": "<p>dogs'<html lang=\"x\"> bones</p>",
5370
+ "out": "<p>dogs’<html lang=\"x\"> bones</p>",
5371
+ "note": "modes.md §3.6: a second html start tag is ignored by the parser and still markup."
5372
+ },
5373
+ {
5374
+ "id": "en-us-quotes-html-less-than-is-text",
5375
+ "rule": "quotes",
5376
+ "mode": "html",
5377
+ "in": "<p>say 'a < b' ok</p>",
5378
+ "out": "<p>say “a < b” ok</p>",
5379
+ "note": "modes.md §3.6: a `<` that begins no tag is text and the pair spans it."
5380
+ },
5381
+ {
5382
+ "id": "en-us-quotes-html-bogus-comment-gap",
5383
+ "rule": "quotes",
5384
+ "mode": "html",
5385
+ "in": "<p>say 'hi</ x> there' ok</p>",
5386
+ "out": "<p>say “hi</ x> there” ok</p>",
5387
+ "note": "modes.md §3.6: `</ x>` is a bogus comment, already markup, and the pair spans it."
5284
5388
  }
5285
5389
  ]
5286
5390
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "es",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "fi",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "fr-CA",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "fr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "hr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "hu",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "it",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "cases": [
4
4
  {
5
5
  "id": "exact-en-us",
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "lt",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "nl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "pl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "pt-BR",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "pt-PT",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "ro",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "ru",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "sk",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "sl",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "sr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "sv",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "tr",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "locale": "uk",
4
4
  "cases": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "$comment": "Locale resolution input. Algorithm is specified in spec/rules/locale-resolution.md and is identical in every runtime — never delegate it to a platform locale-negotiation library. \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
4
4
  "locales": [
5
5
  "en-US",
@@ -19,7 +19,7 @@ step 9 with §3.8.5's content-line condition, added in 1.10.0, §3.8.4's carriag
19
19
  continuation line with the bails of §3.8.6 that use it, added in 1.11.0, and §3.8.4's node lines,
20
20
  declined keys, node markers and own-line region, with the changes to steps 1, 3, 4, 5, 6, 7 and 8
21
21
  that go with them, added in 1.11.0, and §3.9 with the amendments it carries to §3.1, §3.5 step 2,
22
- §4, §5, §7 item 7 and §8, added in 1.13.0, and §3.4's delimiter-neighbour rule with §3.7.3's autolink-literal tail, terminator guard and reference labels, and the amendments they carry to §3.4's deletion paragraph, §5 items 2 and 3, its fifth-part note and testing obligation, and §6, added in 1.17.2, and §3.4's escape-and-reference rule with the amendments it carries to §3.6, §3.7.3, §5 item 2's fifth-part note, §5 item 3 and the testing obligation, added in 1.17.4, and §3.4's bracket-shape rule, added in 1.17.5, and §3.6's whitespace-only text node rule, added in 1.23.0).
22
+ §4, §5, §7 item 7 and §8, added in 1.13.0, and §3.4's delimiter-neighbour rule with §3.7.3's autolink-literal tail, terminator guard and reference labels, and the amendments they carry to §3.4's deletion paragraph, §5 items 2 and 3, its fifth-part note and testing obligation, and §6, added in 1.17.2, and §3.4's escape-and-reference rule with the amendments it carries to §3.6, §3.7.3, §5 item 2's fifth-part note, §5 item 3 and the testing obligation, added in 1.17.4, and §3.4's bracket-shape rule, added in 1.17.5, and §3.6's whitespace-only text node rule, added in 1.23.0, and §3.6's ignored-tag rule, added in 1.23.1).
23
23
 
24
24
  ---
25
25
 
@@ -558,6 +558,19 @@ Skipped, exhaustively and exactly:
558
558
  `<p>b</p>`) is now left alone, exactly as `text` mode leaves it between two line feeds,
559
559
  where before 1.23.0 it became a dash.
560
560
 
561
+ - **every tag is markup, including one the parser ignores** (since 1.23.1): a start or end tag
562
+ that opens or closes nothing (`</span>` with no open `span`, a second `<body>` or `<html>`, `</>`)
563
+ is still a tag in the source, so its code points lie outside every span, whatever the parser did
564
+ with it. A parser that merges the text on either side of an ignored tag into one text node
565
+ (`parse5` does) does not change that: the runtime splits the run around the tag, and the gap
566
+ between the two spans carries the tag's raw source, so §3.2 chooses the marker from it: −1, or
567
+ −2 when that gap holds a line terminator, whether inside the tag itself (`</span` followed by a
568
+ line feed and `>`) or in a whitespace-only run beside it (above). A tag extends as the WHATWG
569
+ tokenizer delimits it, so `>` inside a quoted attribute value does not end it. `dogs'</span> bones` is the span `dogs'`,
570
+ a −1, and the span ` bones`, so the apostrophe is word-final before a boundary and becomes
571
+ U+2019, as it does before a well-formed `</i>`. A `<` that begins no tag (`a < b`, `</ x>` read
572
+ as a comment) is unchanged: text stays text, and a bogus comment is already a comment.
573
+
561
574
  **Element names compare case-insensitively**, per HTML: `<CODE>`, `<Code>` and `<code>` are all
562
575
  skipped. (In MDX, JSX names compare case-sensitively — §3.7.3.)
563
576
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "spec": "1.23.0",
2
+ "spec": "1.23.1",
3
3
  "$comment": "Single source of truth for pipeline order. Rules run in ascending `order`. Disabling a rule removes it from the sequence and never reorders the rest. Rule ids are public API (see docs/ARCHITECTURE.md section 5). \"spec\" here must track spec/VERSION exactly — it is not itself the global version source; scripts/validate-spec.mjs enforces the match.",
4
4
  "rules": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Polytypo
4
- VERSION = "1.23.0"
4
+ VERSION = "1.23.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytypo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.0
4
+ version: 1.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iurii Rogulia