Skip to content

Commit

Permalink
Parser: Revert to PEG parser by default
Browse files Browse the repository at this point in the history
Fixes several small issues created with the TinyMCE parser.

Focuses efforts on building a declarative formal grammar to handle our
parsing needs.
  • Loading branch information
dmsnell committed May 30, 2017
1 parent 62552a9 commit 664ef45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion blocks/api/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@ export function parseWithGrammar( content ) {
}, [] );
}

export default parseWithTinyMCE;
export default parseWithGrammar;
6 changes: 1 addition & 5 deletions blocks/api/post.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WP_Block_End
} }

WP_Block_Type
= $(ASCII_Letter WP_Block_Type_Char*)
= $(ASCII_Letter (ASCII_AlphaNumeric / "/" ASCII_AlphaNumeric)*)

HTML_Attribute_List
= as:(_+ a:HTML_Attribute_Item { return a })*
Expand Down Expand Up @@ -74,10 +74,6 @@ HTML_Attribute_Quoted
HTML_Attribute_Name
= $([a-zA-Z0-9:.]+)

WP_Block_Type_Char
= ASCII_AlphaNumeric
/ [\/]

ASCII_AlphaNumeric
= ASCII_Letter
/ ASCII_Digit
Expand Down

0 comments on commit 664ef45

Please sign in to comment.