]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix typo (#9689)
authoredison <daiwei521@126.com>
Wed, 29 Nov 2023 04:26:10 +0000 (12:26 +0800)
committerGitHub <noreply@github.com>
Wed, 29 Nov 2023 04:26:10 +0000 (12:26 +0800)
packages/compiler-core/src/options.ts
packages/compiler-core/src/parser.ts
packages/compiler-core/src/tokenizer.ts

index b0e3835e6a5280d2d7f3c0d55904d126d846b473..e0c4099e40ea7fc20e5a5c8d3577cfe5c60c27a6 100644 (file)
@@ -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
   /**
index 46d9c6f094f69ae7a584c6ede7e0f38ad24a8d3a..f4399d7c67f116e9101f299fb87e62e4772dc2d2 100644 (file)
@@ -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)
   }
index 861107ef8ba1fa9f431f5d8f72c327a6def601f6..c20ebcf9486528f3ef03d3780eb484907e223645 100644 (file)
@@ -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 </ 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
@@ -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)