@wordpress/block-serialization-spec-parser 2.0.2 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 2.0.2 (2018-12-12)
2
+
1
3
  ## 2.0.1 (2018-11-30)
2
4
 
3
5
  ## 2.0.0 (2018-11-12)
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Block Serialization Spec Parser
2
2
 
3
- This library contains the grammar file (`grammar.pegjs`) for WordPress posts which is a block serialization [_specification_](../../docs/grammar.md) which is used to generate the actual _parser_ which is also bundled in this package.
3
+ This library contains the grammar file (`grammar.pegjs`) for WordPress posts which is a block serialization [_specification_](/docs/contributors/grammar.md) which is used to generate the actual _parser_ which is also bundled in this package.
4
4
 
5
5
  PEG parser generators are available in many languages, though different libraries may require some translation of this grammar into their syntax. For more information see:
6
6
 
package/grammar.pegjs CHANGED
@@ -328,4 +328,4 @@ Block_Attributes
328
328
  }
329
329
 
330
330
  __
331
- = [ \t\r\n]+
331
+ = [ \t\f\r\n]+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-serialization-spec-parser",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Block serialization specification parser for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -18,14 +18,10 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/WordPress/gutenberg/issues"
20
20
  },
21
- "devDependencies": {
22
- "pegjs": "0.10.0"
23
- },
24
21
  "publishConfig": {
25
22
  "access": "public"
26
23
  },
27
24
  "scripts": {
28
25
  "build": "pegjs --format umd -o ./parser.js ./grammar.pegjs"
29
- },
30
- "gitHead": "e7e72e1a211f8426cb136c86d2948f497a03e1e4"
26
+ }
31
27
  }
package/parser.js CHANGED
@@ -255,8 +255,8 @@
255
255
  /** <?php return json_decode( $attrs, true ); ?> **/
256
256
  return maybeJSON( attrs );
257
257
  },
258
- peg$c32 = /^[ \t\r\n]/,
259
- peg$c33 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false),
258
+ peg$c32 = /^[ \t\f\r\n]/,
259
+ peg$c33 = peg$classExpectation([" ", "\t", "\f", "\r", "\n"], false, false),
260
260
 
261
261
  peg$currPos = 0,
262
262
  peg$savedPos = 0,
@@ -1,6 +1,14 @@
1
1
  <?php
2
+ /**
3
+ * PHP Test Helper
4
+ *
5
+ * Facilitates running PHP parser against same tests as the JS parser implementation.
6
+ *
7
+ * @package gutenberg
8
+ */
2
9
 
3
- require_once __DIR__ . '/../../../lib/parser.php';
10
+ // Include the generated parser.
11
+ require_once dirname( __FILE__ ) . '/../../../lib/parser.php';
4
12
 
5
13
  $parser = new Gutenberg_PEG_Parser();
6
14