fix(HtmlParser): Do not add parent element for template children
fixes #5638
This commit is contained in:
@ -304,8 +304,16 @@ export class HtmlTagDefinition {
|
||||
}
|
||||
|
||||
requireExtraParent(currentParent: string): boolean {
|
||||
return isPresent(this.requiredParents) &&
|
||||
(isBlank(currentParent) || this.requiredParents[currentParent.toLowerCase()] != true);
|
||||
if (isBlank(this.requiredParents)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isBlank(currentParent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let lcParent = currentParent.toLowerCase();
|
||||
return this.requiredParents[lcParent] != true && lcParent != 'template';
|
||||
}
|
||||
|
||||
isClosedByChild(name: string): boolean {
|
||||
|
Reference in New Issue
Block a user