From: edison Date: Wed, 29 Nov 2023 04:26:10 +0000 (+0800) Subject: chore: fix typo (#9689) X-Git-Tag: v3.4.0-alpha.4~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=509c192ff4b2a8ea36c755aa5015297732474ecb;p=thirdparty%2Fvuejs%2Fcore.git chore: fix typo (#9689) --- diff --git a/packages/compiler-core/src/options.ts b/packages/compiler-core/src/options.ts index b0e3835e6a..e0c4099e40 100644 --- a/packages/compiler-core/src/options.ts +++ b/packages/compiler-core/src/options.ts @@ -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 /** diff --git a/packages/compiler-core/src/parser.ts b/packages/compiler-core/src/parser.ts index 46d9c6f094..f4399d7c67 100644 --- a/packages/compiler-core/src/parser.ts +++ b/packages/compiler-core/src/parser.ts @@ -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) } diff --git a/packages/compiler-core/src/tokenizer.ts b/packages/compiler-core/src/tokenizer.ts index 861107ef8b..c20ebcf948 100644 --- a/packages/compiler-core/src/tokenizer.ts +++ b/packages/compiler-core/src/tokenizer.ts @@ -76,7 +76,7 @@ export enum CharCodes { Dot = 0x2e, // "." Colon = 0x3a, // ":" At = 0x40, // "@" - LeftSqaure = 91, // "[" + LeftSquare = 91, // "[" RightSquare = 93 // "]" } @@ -242,7 +242,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 @@ -637,7 +637,7 @@ export default class Tokenizer { } else if (c === CharCodes.Lt && this.peek() === CharCodes.Slash) { // special handling for