Skip to content

Commit 509c192

Browse files
authored
chore: fix typo (#9689)
1 parent fff7b86 commit 509c192

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/compiler-core/src/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export interface ParserOptions
3636
*/
3737
parseMode?: 'base' | 'html' | 'sfc'
3838
/**
39-
* Specify the root namepsace to use when parsing a tempalte.
40-
* Defaults to `Namepsaces.HTML` (0).
39+
* Specify the root namespace to use when parsing a template.
40+
* Defaults to `Namespaces.HTML` (0).
4141
*/
4242
ns?: Namespaces
4343
/**

packages/compiler-core/src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
606606
}
607607
}
608608

609-
// whitepsace management
609+
// whitespace management
610610
if (!tokenizer.inRCDATA) {
611611
el.children = condenseWhitespace(el.children, el.tag)
612612
}

packages/compiler-core/src/tokenizer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export enum CharCodes {
7676
Dot = 0x2e, // "."
7777
Colon = 0x3a, // ":"
7878
At = 0x40, // "@"
79-
LeftSqaure = 91, // "["
79+
LeftSquare = 91, // "["
8080
RightSquare = 93 // "]"
8181
}
8282

@@ -242,7 +242,7 @@ export default class Tokenizer {
242242
public inRCDATA = false
243243
/** For disabling RCDATA tags handling */
244244
public inXML = false
245-
/** Reocrd newline positions for fast line / column calculation */
245+
/** Record newline positions for fast line / column calculation */
246246
private newlines: number[] = []
247247

248248
private readonly entityDecoder?: EntityDecoder
@@ -637,7 +637,7 @@ export default class Tokenizer {
637637
} else if (c === CharCodes.Lt && this.peek() === CharCodes.Slash) {
638638
// special handling for </ appearing in open tag state
639639
// this is different from standard HTML parsing but makes practical sense
640-
// especially for parsing intermedaite input state in IDEs.
640+
// especially for parsing intermediate input state in IDEs.
641641
this.cbs.onopentagend(this.index)
642642
this.state = State.BeforeTagName
643643
this.sectionStart = this.index
@@ -714,7 +714,7 @@ export default class Tokenizer {
714714
if (c === CharCodes.Eq || isEndOfTagSection(c)) {
715715
this.cbs.ondirarg(this.sectionStart, this.index)
716716
this.handleAttrNameEnd(c)
717-
} else if (c === CharCodes.LeftSqaure) {
717+
} else if (c === CharCodes.LeftSquare) {
718718
this.state = State.InDirDynamicArg
719719
} else if (c === CharCodes.Dot) {
720720
this.cbs.ondirarg(this.sectionStart, this.index)

0 commit comments

Comments
 (0)