punctilio 1.2.2 → 1.2.4
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.
- package/README.md +20 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,26 +43,28 @@ My [`benchmark.mjs`](./benchmark.mjs) measures how well libraries handle a [wide
|
|
|
43
43
|
| `smartypants` | 49/109 (45%) |
|
|
44
44
|
| `retext-smartypants` | 47/109 (43%) |
|
|
45
45
|
|
|
46
|
-
| Feature | Example | `
|
|
46
|
+
| Feature | Example | `punctilio` | `smartypants` | `tipograph` | `smartquotes` | `typograf` |
|
|
47
47
|
|--------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|
|
48
48
|
| Smart quotes | "hello" → “hello” | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
49
|
-
| Leading apostrophe | 'Twas → ’Twas |
|
|
50
|
-
| Em dash | -- → — | ✓ |
|
|
51
|
-
| En dash (ranges) | 1-5 → 1–5 | ✗ | ✓ | ✗ | ✗ |
|
|
52
|
-
| Minus sign | -5 → −5 | ✗ | ✓ | ✗ | ✗ |
|
|
53
|
-
| Ellipsis | ... → … | ✓ | ✓ |
|
|
54
|
-
| Multiplication | 5x5 → 5×5 |
|
|
55
|
-
| Math symbols | != → ≠ |
|
|
56
|
-
| Legal symbols | (c) → © | ✗ | © only | ✗ | ✓ |
|
|
57
|
-
| Arrows | -> → → |
|
|
58
|
-
| Prime marks | 5'10" → 5′10″ | ✗ | ✓ | ✓ | ✗ |
|
|
59
|
-
| Degrees | 20 C → 20 °C |
|
|
60
|
-
| Fractions | 1/2 → ½ |
|
|
61
|
-
| Superscripts |
|
|
62
|
-
| Localization | American/British |
|
|
63
|
-
| Ligatures | ?? → ⁇ | ✗ | ✓ | ✗ | ✗ |
|
|
64
|
-
| Non-English quotes | „Hallo” (German) | ✗ |
|
|
65
|
-
| Non-breaking spaces | Chapter 1 | ✗ | ✗ | ✗ |
|
|
49
|
+
| Leading apostrophe | 'Twas → ’Twas | ✓ | ✗ | ✗ | ~ | ✗ |
|
|
50
|
+
| Em dash | -- → — | ✓ | ✓ | ✗ | ✗ | ✓ |
|
|
51
|
+
| En dash (ranges) | 1-5 → 1–5 | ✓ | ✗ | ✓ | ✗ | ✗ |
|
|
52
|
+
| Minus sign | -5 → −5 | ✓ | ✗ | ✓ | ✗ | ✗ |
|
|
53
|
+
| Ellipsis | ... → … | ✓ | ✓ | ✓ | ✗ | ✓ |
|
|
54
|
+
| Multiplication | 5x5 → 5×5 | ✓ | ✗ | ✗ | ✗ | ~ |
|
|
55
|
+
| Math symbols | != → ≠ | ✓ | ✗ | ~ | ✗ | ~ |
|
|
56
|
+
| Legal symbols | (c) → © | ✓ | ✗ | © only | ✗ | ✓ |
|
|
57
|
+
| Arrows | -> → → | ✓ | ✗ | ~ | ✗ | ~ |
|
|
58
|
+
| Prime marks | 5'10" → 5′10″ | ✓ | ✗ | ✓ | ✓ | ✗ |
|
|
59
|
+
| Degrees | 20 C → 20 °C | ✓ | ✗ | ✗ | ✗ | ✓ |
|
|
60
|
+
| Fractions | 1/2 → ½ | ✓ | ✗ | ✗ | ✗ | ✓ |
|
|
61
|
+
| Superscripts | 2nd → 2ⁿᵈ | ✓ | ✗ | ✗ | ✗ | ✗ |
|
|
62
|
+
| Localization | American/British | ✓ | ✗ | ✗ | ✗ | ✗ |
|
|
63
|
+
| Ligatures | ?? → ⁇ | ✓ | ✗ | ✓ | ✗ | ✗ |
|
|
64
|
+
| Non-English quotes | „Hallo” (German) | ✗ | ✗ | ✓ | ✗ | ~ |
|
|
65
|
+
| Non-breaking spaces | Chapter 1 | ✗ | ✗ | ✗ | ✗ | ✓ |
|
|
66
|
+
|
|
67
|
+
~ = partial success (handles main example but misses edge cases)
|
|
66
68
|
|
|
67
69
|
`typograf` uniquely inserts non-breaking spaces to prevent bad line breaks (e.g. before numbers, after colons). I might add this to `punctilio` in the future. `punctilio`’s other missing feature is non-English quote support—feel free to make a pull request!
|
|
68
70
|
|