chore: fix typo (#9689)
This commit is contained in:
parent
fff7b864f4
commit
509c192ff4
|
@ -36,8 +36,8 @@ export interface ParserOptions
|
||||||
*/
|
*/
|
||||||
parseMode?: 'base' | 'html' | 'sfc'
|
parseMode?: 'base' | 'html' | 'sfc'
|
||||||
/**
|
/**
|
||||||
* Specify the root namepsace to use when parsing a tempalte.
|
* Specify the root namespace to use when parsing a template.
|
||||||
* Defaults to `Namepsaces.HTML` (0).
|
* Defaults to `Namespaces.HTML` (0).
|
||||||
*/
|
*/
|
||||||
ns?: Namespaces
|
ns?: Namespaces
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -606,7 +606,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// whitepsace management
|
// whitespace management
|
||||||
if (!tokenizer.inRCDATA) {
|
if (!tokenizer.inRCDATA) {
|
||||||
el.children = condenseWhitespace(el.children, el.tag)
|
el.children = condenseWhitespace(el.children, el.tag)
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ export enum CharCodes {
|
||||||
Dot = 0x2e, // "."
|
Dot = 0x2e, // "."
|
||||||
Colon = 0x3a, // ":"
|
Colon = 0x3a, // ":"
|
||||||
At = 0x40, // "@"
|
At = 0x40, // "@"
|
||||||
LeftSqaure = 91, // "["
|
LeftSquare = 91, // "["
|
||||||
RightSquare = 93 // "]"
|
RightSquare = 93 // "]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ export default class Tokenizer {
|
||||||
public inRCDATA = false
|
public inRCDATA = false
|
||||||
/** For disabling RCDATA tags handling */
|
/** For disabling RCDATA tags handling */
|
||||||
public inXML = false
|
public inXML = false
|
||||||
/** Reocrd newline positions for fast line / column calculation */
|
/** Record newline positions for fast line / column calculation */
|
||||||
private newlines: number[] = []
|
private newlines: number[] = []
|
||||||
|
|
||||||
private readonly entityDecoder?: EntityDecoder
|
private readonly entityDecoder?: EntityDecoder
|
||||||
|
@ -637,7 +637,7 @@ export default class Tokenizer {
|
||||||
} else if (c === CharCodes.Lt && this.peek() === CharCodes.Slash) {
|
} else if (c === CharCodes.Lt && this.peek() === CharCodes.Slash) {
|
||||||
// special handling for </ appearing in open tag state
|
// special handling for </ appearing in open tag state
|
||||||
// this is different from standard HTML parsing but makes practical sense
|
// 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.cbs.onopentagend(this.index)
|
||||||
this.state = State.BeforeTagName
|
this.state = State.BeforeTagName
|
||||||
this.sectionStart = this.index
|
this.sectionStart = this.index
|
||||||
|
@ -714,7 +714,7 @@ export default class Tokenizer {
|
||||||
if (c === CharCodes.Eq || isEndOfTagSection(c)) {
|
if (c === CharCodes.Eq || isEndOfTagSection(c)) {
|
||||||
this.cbs.ondirarg(this.sectionStart, this.index)
|
this.cbs.ondirarg(this.sectionStart, this.index)
|
||||||
this.handleAttrNameEnd(c)
|
this.handleAttrNameEnd(c)
|
||||||
} else if (c === CharCodes.LeftSqaure) {
|
} else if (c === CharCodes.LeftSquare) {
|
||||||
this.state = State.InDirDynamicArg
|
this.state = State.InDirDynamicArg
|
||||||
} else if (c === CharCodes.Dot) {
|
} else if (c === CharCodes.Dot) {
|
||||||
this.cbs.ondirarg(this.sectionStart, this.index)
|
this.cbs.ondirarg(this.sectionStart, this.index)
|
||||||
|
|
Loading…
Reference in New Issue