Skip to content

Commit

Permalink
fix: hgroup missing on isHTMLTag
Browse files Browse the repository at this point in the history
close #1340
  • Loading branch information
johnsoncodehk committed May 28, 2022
1 parent 841562c commit 675637e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vue-code-gen/src/generators/template.ts
Expand Up @@ -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(
Expand Down

0 comments on commit 675637e

Please sign in to comment.