bem-archive / bemhtml-compat

Compatibility layer for old BEMHTML syntax
2 stars 1 forks source link

Make using custom Jail grammars possible #6

Closed vkz closed 10 years ago

vkz commented 10 years ago

Bemhtml parser has its Jail grammar hard-coded in one of the rules. This prevents anyone who inherits from the bemhtml Parser grammar from specifying their custom Jail grammar. This tiny change should fix it. Just assign your custom jailer like so YourParserGrammarName.prototype._jail = MyCustomJailGrammar and you no longer have to copy-paste the listBemMatchAndSet rule to your grammar just for the sake of redefining the Jail.

indutny commented 10 years ago

LGTM