When parsing tags this code entirely relies on a parse result:
let params = this.parseParams(token.slice(1, -1));
let tagName = params[0][0].toLowerCase();
However parseParam will return an empty array for empty tags or tags that start with on, because of this
if (name) {
const n = name.trim();
// ignore on* events attribute
if (n.length && n.toLowerCase().indexOf('on') !== 0) {
params.push([n, value]);
}
}
Now "[ ]" is used for example by github for an empty checkbox, [on...] could be all kind of things, both are valid and shouldn't cause the parser to throw an exception.
When parsing tags this code entirely relies on a parse result:
However parseParam will return an empty array for empty tags or tags that start with on, because of this
Now "[ ]" is used for example by github for an empty checkbox, [on...] could be all kind of things, both are valid and shouldn't cause the parser to throw an exception.