Skip to content

Commit 4bc2807

Browse files
committed
build RegEx from RegEx.source
1 parent 01f8cad commit 4bc2807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function postHTMLParser(html, options) {
2727

2828
function isDirective(directive, tag) {
2929
if (directive.name instanceof RegExp) {
30-
var regex = RegExp(directive.name, 'i');
30+
var regex = RegExp(directive.name.source, 'i');
3131

3232
return regex.test(tag);
3333
}

0 commit comments

Comments
 (0)