Add regexp to wysihtml5 Parser Rules

310 views Asked by At

Is it possible to add regexp to wysihtml5 parser rules? For example, /< !--[\s\S]*?-->/

wysihtml5ParserRulesSimple: ->
 tags:
  strong: {}
  b:      {}
  i:      {}
  em:     {}
1

There are 1 answers

0
Oliver Pulges On

RegExp is not supported for matching tag names currently. On the other hand the RegExp in the example is for matching comment nodes and these can be enabled with this parameter in currently supported Voog branch of wysihtml.

https://github.com/Voog/wysihtml/blob/master/parser_rules/advanced_and_extended.js#L122