Language-tools: 前のコンポーネントが自己終了している場合、構文の強調表示が正しくありません

作成日 2021年01月18日  ·  3コメント  ·  ソース: sveltejs/language-tools

前のコンポーネントが自己終了している場合、構文の強調表示は正しくありません。 (下のスクリーンショットを参照してください。)

次のコードを*.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/>などの自動終了コンポーネントに続いて、ハイライトは通常の動作に戻るはずです。

スクリーンショット
image

システム(以下の情報を入力してください):

  • OS:MacOS Catalina v10.15.3
  • IDE:VSCodev1.52.1コミットea3859d4ba2f3e577a159bc91e3074c5d85c0523
  • プラグイン/パッケージ:VSCode用のSvelte
Fixed bug

全てのコメント3件

関連する可能性がある: https

より簡単な例

<div/>
<div></div>

Code_2021-01-22_18-04-16

終了部分の前にスペースがない場合にのみ発生します
Code_2021-01-22_18-05-01

ウーフー! ありがとう@dummdidumm!

このページは役に立ちましたか?
0 / 5 - 0 評価