Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typo #9689

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/compiler-core/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export interface ParserOptions
*/
parseMode?: 'base' | 'html' | 'sfc'
/**
* Specify the root namepsace to use when parsing a tempalte.
* Defaults to `Namepsaces.HTML` (0).
* Specify the root namespace to use when parsing a template.
* Defaults to `Namespaces.HTML` (0).
*/
ns?: Namespaces
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-core/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
}
}

// whitepsace management
// whitespace management
if (!tokenizer.inRCDATA) {
el.children = condenseWhitespace(el.children, el.tag)
}
Expand Down
8 changes: 4 additions & 4 deletions packages/compiler-core/src/tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const enum CharCodes {
Dot = 0x2e, // "."
Colon = 0x3a, // ":"
At = 0x40, // "@"
LeftSqaure = 91, // "["
LeftSquare = 91, // "["
RightSquare = 93 // "]"
}

Expand Down Expand Up @@ -243,7 +243,7 @@ export default class Tokenizer {
public inRCDATA = false
/** For disabling RCDATA tags handling */
public inXML = false
/** Reocrd newline positions for fast line / column calculation */
/** Record newline positions for fast line / column calculation */
private newlines: number[] = []

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