diff --git a/src/common/parser-options.ts b/src/common/parser-options.ts index 48613210..fd88e645 100644 --- a/src/common/parser-options.ts +++ b/src/common/parser-options.ts @@ -47,23 +47,22 @@ export function isSFCFile(parserOptions: ParserOptions) { } /** - * Gets the script parser name from the given SFC document fragment. + * Gets the script parser name from the given parser lang. */ export function getScriptParser( parser: boolean | string | Record | undefined, - doc: VDocumentFragment | null, - block: "script" | "template", + getParserLang: () => string | null | Iterable, ): string | undefined { if (parser && typeof parser === "object") { - if (block === "template") { - const parserForTemplate = parser["