@@ -1082,14 +1082,14 @@ export function base_parse(data: string, options = { lowerCaseTagName: false, co
10821082 }
10831083 }
10841084
1085- // Prevent nested A tags by terminating the last A and starting a new one : see issue #144
1085+ // Prevent nested A tags by terminating the last A and starting a new one : see issue #144
10861086 if ( match [ 2 ] === 'a' ) {
1087- if ( noNestedTagIndex !== undefined ) {
1088- stack . splice ( noNestedTagIndex ) ;
1089- currentParent = arr_back ( stack ) ;
1090- }
1091- noNestedTagIndex = stack . length ;
1092- }
1087+ if ( noNestedTagIndex !== undefined ) {
1088+ stack . splice ( noNestedTagIndex ) ;
1089+ currentParent = arr_back ( stack ) ;
1090+ }
1091+ noNestedTagIndex = stack . length ;
1092+ }
10931093
10941094 const tagEndPos = kMarkupPattern . lastIndex ;
10951095 const tagStartPos = tagEndPos - match [ 0 ] . length ;
@@ -1128,7 +1128,7 @@ export function base_parse(data: string, options = { lowerCaseTagName: false, co
11281128 // Handle closing tags or self-closed elements (ie </tag> or <br>)
11291129 if ( match [ 1 ] || match [ 4 ] || kSelfClosingElements [ match [ 2 ] ] ) {
11301130 while ( true ) {
1131- if ( match [ 2 ] === 'a' ) noNestedTagIndex = undefined ;
1131+ if ( match [ 2 ] === 'a' ) noNestedTagIndex = undefined ;
11321132 if ( currentParent . rawTagName === match [ 2 ] ) {
11331133 // Update range end for closed tag
11341134 ( < [ number , number ] > currentParent . range ) [ 1 ] = createRange ( - 1 , Math . max ( lastTextPos , tagEndPos ) ) [ 1 ] ;
0 commit comments