mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-05 16:42:27 +03:00
feat(parser): context free tag mode (#165)
* feat(parser): initial context free tag mode * fix: tests coverage * chore: update readme * chore: remove unused badge from readme
This commit is contained in:
@@ -10,9 +10,10 @@ import { createList } from './utils';
|
||||
* @param {Object} opts
|
||||
* @param {Function} opts.createTokenizer
|
||||
* @param {Array<string>} opts.onlyAllowTags
|
||||
* @param {Array<string>} opts.contextFreeTags
|
||||
* @param {Boolean} opts.enableEscapeTags
|
||||
* @param {String} opts.openTag
|
||||
* @param {String} opts.closeTag
|
||||
* @param {Boolean} opts.enableEscapeTags
|
||||
* @return {Array}
|
||||
*/
|
||||
const parse = (input, opts = {}) => {
|
||||
@@ -258,9 +259,10 @@ const parse = (input, opts = {}) => {
|
||||
|
||||
tokenizer = (opts.createTokenizer ? opts.createTokenizer : createLexer)(input, {
|
||||
onToken,
|
||||
onlyAllowTags: options.onlyAllowTags,
|
||||
openTag,
|
||||
closeTag,
|
||||
onlyAllowTags: options.onlyAllowTags,
|
||||
contextFreeTags: options.contextFreeTags,
|
||||
enableEscapeTags: options.enableEscapeTags,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user