File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -121,3 +121,34 @@ pub fn no_error_1() {}
121
121
/// backslashed \<<a href="">
122
122
//~^ ERROR unclosed HTML tag `a`
123
123
pub fn p ( ) { }
124
+
125
+ /// <svg width="512" height="512" viewBox="0 0 512" fill="none" xmlns="http://www.w3.org/2000/svg">
126
+ /// <rect
127
+ /// width="256"
128
+ /// height="256"
129
+ /// fill="#5064C8"
130
+ /// stroke="black"
131
+ /// />
132
+ /// </svg>
133
+ pub fn no_error_2 ( ) { }
134
+
135
+ /// <div>
136
+ /// <img
137
+ /// src="https://example.com/ferris.png"
138
+ /// width="512"
139
+ /// height="512"
140
+ /// />
141
+ /// </div>
142
+ pub fn no_error_3 ( ) { }
143
+
144
+ /// unfinished ALLOWED_UNCLOSED
145
+ ///
146
+ /// <br>
147
+ /// <img
148
+ //~^ ERROR unclosed HTML tag `img`
149
+ pub fn q ( ) { }
150
+
151
+ /// nested unfinished ALLOWED_UNCLOSED
152
+ /// <p><img</p>
153
+ //~^ ERROR unclosed HTML tag `img`
154
+ pub fn r ( ) { }
Original file line number Diff line number Diff line change @@ -100,5 +100,17 @@ error: unclosed HTML tag `a`
100
100
LL | /// backslashed \<<a href="">
101
101
| ^^
102
102
103
- error: aborting due to 16 previous errors
103
+ error: unclosed HTML tag `img`
104
+ --> $DIR/invalid-html-tags.rs:147:5
105
+ |
106
+ LL | /// <img
107
+ | ^^^
108
+
109
+ error: unclosed HTML tag `img`
110
+ --> $DIR/invalid-html-tags.rs:152:8
111
+ |
112
+ LL | /// <p><img</p>
113
+ | ^^^^
114
+
115
+ error: aborting due to 18 previous errors
104
116
You can’t perform that action at this time.
0 commit comments