Skip to content

Commit ed704f4

Browse files
committed
chore: update
1 parent 816c57d commit ed704f4

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,39 @@ exports[`compiler: parse > Errors > UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME > <te
24672467
},
24682468
},
24692469
"ns": 0,
2470-
"props": [],
2470+
"props": [
2471+
{
2472+
"loc": {
2473+
"end": {
2474+
"column": 17,
2475+
"line": 1,
2476+
"offset": 16,
2477+
},
2478+
"source": """,
2479+
"start": {
2480+
"column": 16,
2481+
"line": 1,
2482+
"offset": 15,
2483+
},
2484+
},
2485+
"name": """,
2486+
"nameLoc": {
2487+
"end": {
2488+
"column": 17,
2489+
"line": 1,
2490+
"offset": 16,
2491+
},
2492+
"source": """,
2493+
"start": {
2494+
"column": 16,
2495+
"line": 1,
2496+
"offset": 15,
2497+
},
2498+
},
2499+
"type": 6,
2500+
"value": undefined,
2501+
},
2502+
],
24712503
"tag": "div",
24722504
"tagType": 0,
24732505
"type": 1,

packages/compiler-core/src/tokenizer.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -661,17 +661,7 @@ export default class Tokenizer {
661661
}
662662
}
663663
private handleAttrStart(c: number) {
664-
if (
665-
(__DEV__ || !__BROWSER__) &&
666-
(c === CharCodes.DoubleQuote ||
667-
c === CharCodes.SingleQuote ||
668-
c === CharCodes.Lt)
669-
) {
670-
this.cbs.onerr(
671-
ErrorCodes.UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME,
672-
this.index,
673-
)
674-
} else if (c === CharCodes.LowerV && this.peek() === CharCodes.Dash) {
664+
if (c === CharCodes.LowerV && this.peek() === CharCodes.Dash) {
675665
this.state = State.InDirName
676666
this.sectionStart = this.index
677667
} else if (
@@ -686,6 +676,7 @@ export default class Tokenizer {
686676
} else {
687677
this.state = State.InAttrName
688678
this.sectionStart = this.index
679+
this.stateInAttrName(c)
689680
}
690681
}
691682
private stateInSelfClosingTag(c: number): void {

0 commit comments

Comments
 (0)