@texuli/core 0.9.0 → 0.10.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.
package/README.md CHANGED
@@ -12,9 +12,9 @@ when you need Texuli's URL policy to sanitize links and media from agents
12
12
  or users. It has no runtime dependencies and imports no UI framework.
13
13
 
14
14
  > **Status: 0.x release.** Texuli is in development. The packages are
15
- > published to npm as `0.9.0`, a pre-1.0 release (1.0.0 will be the first
16
- > stable release). Under 0.x, a new minor (`0.10.0`) may contain breaking
17
- > changes, so pin the exact version or use `^0.9.0`, which accepts only 0.9.x.
15
+ > published to npm as `0.10.0`, a pre-1.0 release (1.0.0 will be the first
16
+ > stable release). Under 0.x, a new minor (`0.11.0`) may contain breaking
17
+ > changes, so pin the exact version or use `^0.10.0`, which accepts only 0.10.x.
18
18
 
19
19
  ## Install
20
20
 
@@ -29,7 +29,8 @@ const BULLET = /^( {0,3})([-*+])[ \t]+(.*)$/s;
29
29
  const ORDERED = /^( {0,3})(\d{1,9})[.)][ \t]+(.*)$/s;
30
30
  const TASK = /^\[([ xX])\][ \t]+/;
31
31
  const IMAGE_ONLY = /^!\[((?:[^\]\\\n]|\\.)*)\]\(\s*<?([^\s()<>]+)>?\s*\)$/;
32
- const ESCAPABLE = /[\\`*_{}[\]()#+\-.!~<>|]/;
32
+ /** CommonMark 2.4: a backslash before any ASCII punctuation character is an escape. */
33
+ const ESCAPABLE = /[!-/:-@[-`{-~]/;
33
34
  const isBlank = (line) => line.trim() === '';
34
35
  const isSpace = (char) => char === ' ' || char === '\t';
35
36
  /** A fence opening line: its marker and the optional language. */
@@ -290,7 +291,7 @@ class Reader {
290
291
  }
291
292
  }
292
293
  const isEmptyText = (block) => (block.type === 'paragraph' || block.type === 'heading') && block.content.length === 0;
293
- const unescapeMarkdown = (text) => text.replace(/\\([\\`*_{}[\]()#+\-.!~<>|])/g, '$1');
294
+ const unescapeMarkdown = (text) => text.replace(/\\([!-/:-@[-`{-~])/g, '$1');
294
295
  /**
295
296
  * Closers and bracket pairs of one inline source, computed once so that each
296
297
  * lookup is constant time: hostile delimiter runs stay linear. The answers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texuli/core",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Texels: framework-free behavior and policy that every Texuli component is built from.",
5
5
  "keywords": [
6
6
  "svelte",