punctilio 1.2.3 → 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.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -45,25 +45,27 @@ My [`benchmark.mjs`](./benchmark.mjs) measures how well libraries handle a [wide
45
45
 
46
46
  | Feature | Example | `punctilio` | `smartypants` | `tipograph` | `smartquotes` | `typograf` |
47
47
  |--------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
48
- | Smart quotes | "hello" → "hello" | ✓ | ✓ | ✓ | ✓ | ✓ |
49
- | Leading apostrophe | 'Twas → 'Twas | ✓ | ✗ | ✗ | | ✗ |
48
+ | Smart quotes | "hello" → hello | ✓ | ✓ | ✓ | ✓ | ✓ |
49
+ | Leading apostrophe | 'Twas → Twas | ✓ | ✗ | ✗ | ~ | ✗ |
50
50
  | Em dash | -- → — | ✓ | ✓ | ✗ | ✗ | ✓ |
51
51
  | En dash (ranges) | 1-5 → 1–5 | ✓ | ✗ | ✓ | ✗ | ✗ |
52
52
  | Minus sign | -5 → −5 | ✓ | ✗ | ✓ | ✗ | ✗ |
53
53
  | Ellipsis | ... → … | ✓ | ✓ | ✓ | ✗ | ✓ |
54
- | Multiplication | 5x5 → 5×5 | ✓ | ✗ | ✗ | ✗ | |
55
- | Math symbols | != → ≠ | ✓ | ✗ | | ✗ | |
54
+ | Multiplication | 5x5 → 5×5 | ✓ | ✗ | ✗ | ✗ | ~ |
55
+ | Math symbols | != → ≠ | ✓ | ✗ | ~ | ✗ | ~ |
56
56
  | Legal symbols | (c) → © | ✓ | ✗ | © only | ✗ | ✓ |
57
- | Arrows | -> → → | ✓ | ✗ | | ✗ | |
57
+ | Arrows | -> → → | ✓ | ✗ | ~ | ✗ | ~ |
58
58
  | Prime marks | 5'10" → 5′10″ | ✓ | ✗ | ✓ | ✓ | ✗ |
59
59
  | Degrees | 20 C → 20 °C | ✓ | ✗ | ✗ | ✗ | ✓ |
60
60
  | Fractions | 1/2 → ½ | ✓ | ✗ | ✗ | ✗ | ✓ |
61
61
  | Superscripts | 2nd → 2ⁿᵈ | ✓ | ✗ | ✗ | ✗ | ✗ |
62
62
  | Localization | American/British | ✓ | ✗ | ✗ | ✗ | ✗ |
63
63
  | Ligatures | ?? → ⁇ | ✓ | ✗ | ✓ | ✗ | ✗ |
64
- | Non-English quotes | „Hallo" (German) | ✗ | ✗ | ✓ | ✗ | |
64
+ | Non-English quotes | „Hallo (German) | ✗ | ✗ | ✓ | ✗ | ~ |
65
65
  | Non-breaking spaces | Chapter 1 | ✗ | ✗ | ✗ | ✗ | ✓ |
66
66
 
67
+ ~ = partial success (handles main example but misses edge cases)
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
 
69
71
  ### Known limitations of `punctilio`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "punctilio",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Smart typography transformations: curly quotes, em-dashes, en-dashes, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",