Don't warn if the tag is nested inside a <script> or inside a <style>

This commit is contained in:
Guillaume Gomez 2020-09-27 16:15:26 +02:00
parent b2321bb8da
commit 30cabfd215
2 changed files with 26 additions and 1 deletions

View file

@ -39,3 +39,25 @@ pub fn b() {}
/// <h3>
//~^ ERROR unclosed HTML tag `h3`
pub fn c() {}
// Unclosed tags shouldn't warn if they are nested inside a <script> elem.
/// <script>
/// <h3><div>
/// </script>
/// <script>
/// <div>
/// <p>
/// </div>
/// </script>
pub fn d() {}
// Unclosed tags shouldn't warn if they are nested inside a <style> elem.
/// <style>
/// <h3><div>
/// </style>
/// <style>
/// <div>
/// <p>
/// </div>
/// </style>
pub fn e() {}