تمييز بناء الجملة غير صحيح عندما يكون المكون السابق يغلق ذاتيًا. (انظر لقطة الشاشة أدناه.)
يمكنك نسخ الكود التالي إلى ملف *.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/>
.
لقطة شاشة
النظام (يرجى استكمال المعلومات التالية):
يحتمل أن تكون ذات صلة: https://github.com/sveltejs/language-tools/issues/299
مثال أبسط
<div/>
<div></div>
يحدث ذلك فقط في حالة عدم وجود مساحة قبل جزء الإغلاق
وو هوو! شكرا dummdidumm!