From 675637eaa60009f870511fda45cd63ea9b6dae5a Mon Sep 17 00:00:00 2001 From: johnsoncodehk Date: Sun, 29 May 2022 03:18:40 +0800 Subject: [PATCH] fix: `hgroup` missing on `isHTMLTag` close #1340 --- packages/vue-code-gen/src/generators/template.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/vue-code-gen/src/generators/template.ts b/packages/vue-code-gen/src/generators/template.ts index d5c7c0a38..4182e5d71 100644 --- a/packages/vue-code-gen/src/generators/template.ts +++ b/packages/vue-code-gen/src/generators/template.ts @@ -44,8 +44,14 @@ export const transformContext: CompilerDOM.TransformContext = { expressionPlugins: ['typescript'], }; +function _isHTMLTag(tag: string) { + return isHTMLTag(tag) + // fix https://github.com/johnsoncodehk/volar/issues/1340 + || tag === 'hgroup'; +} + export function isIntrinsicElement(runtimeMode: 'runtime-dom' | 'runtime-uni-app' = 'runtime-dom', tag: string) { - return runtimeMode === 'runtime-dom' ? (isHTMLTag(tag) || isSVGTag(tag)) : ['block', 'component', 'template', 'slot'].includes(tag); + return runtimeMode === 'runtime-dom' ? (_isHTMLTag(tag) || isSVGTag(tag)) : ['block', 'component', 'template', 'slot'].includes(tag); } export function generate(