@@ -24,7 +24,7 @@ const { locStart, locEnd } = require("./loc.js");
2424 * @typedef {import('angular-html-parser/lib/compiler/src/ml_parser/parser').ParseTreeResult } ParserTreeResult
2525 * @typedef {Omit<import('angular-html-parser').ParseOptions, 'canSelfClose'> & {
2626 * name?: 'html' | 'angular' | 'vue' | 'lwc';
27- * recognizeSelfClosing ?: boolean;
27+ * canSelfClose ?: boolean;
2828 * normalizeTagName?: boolean;
2929 * normalizeAttributeName?: boolean;
3030 * }} ParserOptions
@@ -42,7 +42,7 @@ const { locStart, locEnd } = require("./loc.js");
4242function ngHtmlParser (
4343 input ,
4444 {
45- recognizeSelfClosing ,
45+ canSelfClose ,
4646 normalizeTagName,
4747 normalizeAttributeName,
4848 allowHtmComponentClosingTags,
@@ -64,7 +64,7 @@ function ngHtmlParser(
6464 } = require ( "angular-html-parser/lib/compiler/src/ml_parser/html_tags" ) ;
6565
6666 let { rootNodes, errors } = parser . parse ( input , {
67- canSelfClose : recognizeSelfClosing ,
67+ canSelfClose,
6868 allowHtmComponentClosingTags,
6969 isTagNameCaseSensitive,
7070 getTagContentType,
@@ -97,7 +97,7 @@ function ngHtmlParser(
9797 let secondParseResult ;
9898 const doSecondParse = ( ) =>
9999 parser . parse ( input , {
100- canSelfClose : recognizeSelfClosing ,
100+ canSelfClose,
101101 allowHtmComponentClosingTags,
102102 isTagNameCaseSensitive,
103103 } ) ;
@@ -135,13 +135,13 @@ function ngHtmlParser(
135135 }
136136 } else {
137137 // If not Vue SFC, treat as html
138- recognizeSelfClosing = true ;
138+ canSelfClose = true ;
139139 normalizeTagName = true ;
140140 normalizeAttributeName = true ;
141141 allowHtmComponentClosingTags = true ;
142142 isTagNameCaseSensitive = false ;
143143 const htmlParseResult = parser . parse ( input , {
144- canSelfClose : recognizeSelfClosing ,
144+ canSelfClose,
145145 allowHtmComponentClosingTags,
146146 isTagNameCaseSensitive,
147147 } ) ;
@@ -373,7 +373,7 @@ function _parse(text, options, parserOptions, shouldParseFrontMatter = true) {
373373 */
374374function createParser ( {
375375 name,
376- recognizeSelfClosing = false ,
376+ canSelfClose = false ,
377377 normalizeTagName = false ,
378378 normalizeAttributeName = false ,
379379 allowHtmComponentClosingTags = false ,
@@ -386,7 +386,7 @@ function createParser({
386386 text ,
387387 { parser : name , ...options } ,
388388 {
389- recognizeSelfClosing ,
389+ canSelfClose ,
390390 normalizeTagName,
391391 normalizeAttributeName,
392392 allowHtmComponentClosingTags,
@@ -405,15 +405,15 @@ module.exports = {
405405 parsers : {
406406 html : createParser ( {
407407 name : "html" ,
408- recognizeSelfClosing : true ,
408+ canSelfClose : true ,
409409 normalizeTagName : true ,
410410 normalizeAttributeName : true ,
411411 allowHtmComponentClosingTags : true ,
412412 } ) ,
413- angular : createParser ( { name : "angular" } ) ,
413+ angular : createParser ( { name : "angular" , canSelfClose : true } ) ,
414414 vue : createParser ( {
415415 name : "vue" ,
416- recognizeSelfClosing : true ,
416+ canSelfClose : true ,
417417 isTagNameCaseSensitive : true ,
418418 getTagContentType : ( tagName , prefix , hasParent , attrs ) => {
419419 if (
0 commit comments