Skip to content

Commit 999eef5

Browse files
author
xst
committed
【fix】修复compile时,单标签闭合结点解析错误
1 parent 3ffc40f commit 999eef5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

《template 模板是怎样通过 Compile 编译的》.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,10 @@ function parseHTML () {
179179
currentParent.children.push(element);
180180
}
181181

182-
stack.push(element);
183-
currentParent = element;
182+
if(!startTagMatch.unarySlash) {
183+
stack.push(element);
184+
currentParent = element;
185+
}
184186
continue;
185187
}
186188
} else {

0 commit comments

Comments
 (0)