fix(sfc): treat custom block content as raw text
This commit is contained in:
@@ -10,7 +10,11 @@ export interface ParserOptions {
|
||||
isCustomElement?: (tag: string) => boolean
|
||||
isBuiltInComponent?: (tag: string) => symbol | void
|
||||
getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
|
||||
getTextMode?: (tag: string, ns: Namespace) => TextModes
|
||||
getTextMode?: (
|
||||
tag: string,
|
||||
ns: Namespace,
|
||||
parent: ElementNode | undefined
|
||||
) => TextModes
|
||||
delimiters?: [string, string] // ['{{', '}}']
|
||||
|
||||
// Map to HTML entities. E.g., `{ "amp;": "&" }`
|
||||
|
||||
@@ -365,7 +365,7 @@ function parseElement(
|
||||
|
||||
// Children.
|
||||
ancestors.push(element)
|
||||
const mode = context.options.getTextMode(element.tag, element.ns)
|
||||
const mode = context.options.getTextMode(element.tag, element.ns, parent)
|
||||
const children = parseChildren(context, mode, ancestors)
|
||||
ancestors.pop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user