Enforce closing HTML tags to have a ">" character

This commit is contained in:
Guillaume Gomez 2020-10-03 16:23:03 +02:00
parent ca199b16e5
commit d3b7b7e23a
3 changed files with 34 additions and 2 deletions

View file

@ -23,7 +23,7 @@ pub fn foo() {}
/// </h1>
/// </hello>
//~^ ERROR unopened HTML tag `hello`
pub fn f() {}
pub fn bar() {}
/// <div>
/// <br/> <p>
@ -67,3 +67,9 @@ pub fn d() {}
/// </div>
/// </style>
pub fn e() {}
// Closing tags need to have ">" at the end, otherwise it's not a closing tag!
/// <div></div >
/// <div></div
//~^ ERROR unclosed HTML tag `div`
pub fn f() {}

View file

@ -70,5 +70,11 @@ error: unclosed HTML tag `script`
LL | /// <script
| ^^^^^^
error: aborting due to 11 previous errors
error: unclosed HTML tag `div`
--> $DIR/invalid-html-tags.rs:73:5
|
LL | /// <div></div
| ^^^^^
error: aborting due to 12 previous errors