当前面的组件是自关闭时,语法高亮是不正确的。 (见下面的截图。)
您可以将以下代码复制到*.svelte
文件中以查看:
<SelfClosingComponent/>
<div>stuff</div> <!-- highlight problem with opening tag -->
<div>stuff</div> <!-- no highlight problem -->
<SelfClosingComponent/>
<meta/> <!-- highlight problem -->
<SelfClosingComponent/>
<div/> <!-- highlight problem, but also not valid html, so...??? -->
<SelfClosingComponent/>
<!-- <Intro/> --> <!-- highlight problem -->
<!-- <Intro/> --> <!-- returns to normal after problem -->
<SelfClosingComponent></SelfClosingComponent>
<div>stuff</div> <!-- no highlight problem when component has ending tag -->
预期行为
在自关闭组件(例如<SelfClosingComponent/>
Highlight 应恢复正常行为。
截屏
系统(请填写以下信息):