diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 5212480f..e2888e32 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -87,10 +87,15 @@ export function baseParse( function createParserContext( content: string, - options: ParserOptions + rawOptions: ParserOptions ): ParserContext { + const options = extend({}, defaultParserOptions) + for (const key in rawOptions) { + // @ts-ignore + options[key] = rawOptions[key] || defaultParserOptions[key] + } return { - options: extend({}, defaultParserOptions, options), + options, column: 1, line: 1, offset: 0, diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index bb1e8efd..9efb657e 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -607,7 +607,8 @@ function finishComponentSetup( startMeasure(instance, `compile`) } Component.render = compile(Component.template, { - isCustomElement: instance.appContext.config.isCustomElement || NO + isCustomElement: instance.appContext.config.isCustomElement + // delimiters: Component.delimiters }) if (__DEV__) { endMeasure(instance, `compile`) diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index 65138e62..948ceafc 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -321,6 +321,9 @@ interface LegacyOptions< renderTracked?: DebuggerHook renderTriggered?: DebuggerHook errorCaptured?: ErrorCapturedHook + + // runtime compile only + delimiters?: [string, string] } export type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M'