Skip to content

Commit 6f046c8

Browse files
committed
lowercase and reassign 'name' var
1 parent 0da0c81 commit 6f046c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ function postHTMLParser(html, options) {
4343
var directives = [].concat(defaultDirectives, options.directives || []);
4444
var last = bufArray.last();
4545

46-
var tagName;
4746
for (var i = 0; i < directives.length; i++) {
4847
var directive = directives[i];
4948
var directiveText = directive.start + data + directive.end;
5049

51-
tagName = name.toLowerCase();
52-
if (isDirective(directive, tagName)) {
50+
name = name.toLowerCase();
51+
if (isDirective(directive, name)) {
5352
if (!last) {
5453
results.push(directiveText);
5554
return;

0 commit comments

Comments
 (0)