File tree 4 files changed +3
-86
lines changed
4 files changed +3
-86
lines changed Original file line number Diff line number Diff line change @@ -6956,75 +6956,6 @@ Object {
6956
6956
}
6957
6957
`;
6958
6958
6959
- exports[`compiler: parse Errors UNKNOWN_NAMED_CHARACTER_REFERENCE <template>&unknown;</template> 1`] = `
6960
- Object {
6961
- " cached" : 0 ,
6962
- " children" : Array [
6963
- Object {
6964
- " children" : Array [
6965
- Object {
6966
- " content" : " &unknown;" ,
6967
- " loc" : Object {
6968
- " end" : Object {
6969
- " column" : 20 ,
6970
- " line" : 1 ,
6971
- " offset" : 19 ,
6972
- },
6973
- " source" : " &unknown;" ,
6974
- " start" : Object {
6975
- " column" : 11 ,
6976
- " line" : 1 ,
6977
- " offset" : 10 ,
6978
- },
6979
- },
6980
- " type" : 2 ,
6981
- },
6982
- ],
6983
- " codegenNode" : undefined ,
6984
- " isSelfClosing" : false ,
6985
- " loc" : Object {
6986
- " end" : Object {
6987
- " column" : 31 ,
6988
- " line" : 1 ,
6989
- " offset" : 30 ,
6990
- },
6991
- " source" : " <template>&unknown;</template>" ,
6992
- " start" : Object {
6993
- " column" : 1 ,
6994
- " line" : 1 ,
6995
- " offset" : 0 ,
6996
- },
6997
- },
6998
- " ns" : 0 ,
6999
- " props" : Array [],
7000
- " tag" : " template" ,
7001
- " tagType" : 3 ,
7002
- " type" : 1 ,
7003
- },
7004
- ],
7005
- " codegenNode" : undefined ,
7006
- " components" : Array [],
7007
- " directives" : Array [],
7008
- " helpers" : Array [],
7009
- " hoists" : Array [],
7010
- " imports" : Array [],
7011
- " loc" : Object {
7012
- " end" : Object {
7013
- " column" : 31 ,
7014
- " line" : 1 ,
7015
- " offset" : 30 ,
7016
- },
7017
- " source" : " <template>&unknown;</template>" ,
7018
- " start" : Object {
7019
- " column" : 1 ,
7020
- " line" : 1 ,
7021
- " offset" : 0 ,
7022
- },
7023
- },
7024
- " type" : 0 ,
7025
- }
7026
- `;
7027
-
7028
6959
exports[`compiler: parse Errors X_INVALID_END_TAG <svg><![CDATA[</div>]]></svg> 1`] = `
7029
6960
Object {
7030
6961
" cached" : 0 ,
Original file line number Diff line number Diff line change @@ -2594,17 +2594,6 @@ foo
2594
2594
]
2595
2595
}
2596
2596
] ,
2597
- UNKNOWN_NAMED_CHARACTER_REFERENCE : [
2598
- {
2599
- code : '<template>&unknown;</template>' ,
2600
- errors : [
2601
- {
2602
- type : ErrorCodes . UNKNOWN_NAMED_CHARACTER_REFERENCE ,
2603
- loc : { offset : 10 , line : 1 , column : 11 }
2604
- }
2605
- ]
2606
- }
2607
- ] ,
2608
2597
X_INVALID_END_TAG : [
2609
2598
{
2610
2599
code : '<template></div></template>' ,
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ export const enum ErrorCodes {
57
57
UNEXPECTED_NULL_CHARACTER ,
58
58
UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME ,
59
59
UNEXPECTED_SOLIDUS_IN_TAG ,
60
- UNKNOWN_NAMED_CHARACTER_REFERENCE ,
61
60
62
61
// Vue-specific parse errors
63
62
X_INVALID_END_TAG ,
@@ -141,7 +140,6 @@ export const errorMessages: { [code: number]: string } = {
141
140
[ ErrorCodes . UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME ] :
142
141
"'<?' is allowed only in XML context." ,
143
142
[ ErrorCodes . UNEXPECTED_SOLIDUS_IN_TAG ] : "Illegal '/' in tags." ,
144
- [ ErrorCodes . UNKNOWN_NAMED_CHARACTER_REFERENCE ] : 'Unknown entity name.' ,
145
143
146
144
// Vue-specific parse errors
147
145
[ ErrorCodes . X_INVALID_END_TAG ] : 'Invalid end tag.' ,
Original file line number Diff line number Diff line change @@ -820,8 +820,8 @@ function parseTextData(
820
820
821
821
if ( head [ 0 ] === '&' ) {
822
822
// Named character reference.
823
- let name = '' ,
824
- value : string | undefined = undefined
823
+ let name = ''
824
+ let value : string | undefined = undefined
825
825
if ( / [ 0 - 9 a - z ] / i. test ( rawText [ 1 ] ) ) {
826
826
for (
827
827
let length = context . options . maxCRNameLength ;
@@ -836,7 +836,7 @@ function parseTextData(
836
836
if (
837
837
mode === TextModes . ATTRIBUTE_VALUE &&
838
838
! semi &&
839
- / [ = a - z 0 - 9 ] / i. test ( rawText [ 1 + name . length ] || '' )
839
+ / [ = a - z 0 - 9 ] / i. test ( rawText [ name . length + 1 ] || '' )
840
840
) {
841
841
decodedText += '&' + name
842
842
advance ( 1 + name . length )
@@ -851,7 +851,6 @@ function parseTextData(
851
851
}
852
852
}
853
853
} else {
854
- emitError ( context , ErrorCodes . UNKNOWN_NAMED_CHARACTER_REFERENCE )
855
854
decodedText += '&' + name
856
855
advance ( 1 + name . length )
857
856
}
You can’t perform that action at this time.
0 commit comments