Commit b0a833e
committed
fix: skipped tags falsely reported as uncovered when not at start of line
When a tag ({% endif %}, {% endfor %}, {% else %}, etc.) is not at the
start of a line, the preceding TEXT token ends with a whitespace-only
fragment with no newline terminator. That partial line is not executable
content but was incorrectly added to source_lines.
Extends the endblock fix to apply universally — built-in and user-defined
end tags are all covered by the same condition.1 parent b9bc324 commit b0a833e
3 files changed
Lines changed: 53 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
| 352 | + | |
| 353 | + | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
28 | 53 | | |
29 | 54 | | |
30 | 55 | | |
| |||
84 | 109 | | |
85 | 110 | | |
86 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
87 | 123 | | |
88 | 124 | | |
89 | 125 | | |
| |||
135 | 171 | | |
136 | 172 | | |
137 | 173 | | |
138 | | - | |
| 174 | + | |
139 | 175 | | |
140 | 176 | | |
141 | 177 | | |
| |||
154 | 190 | | |
155 | 191 | | |
156 | 192 | | |
157 | | - | |
| 193 | + | |
158 | 194 | | |
159 | 195 | | |
160 | 196 | | |
| |||
170 | 206 | | |
171 | 207 | | |
172 | 208 | | |
173 | | - | |
| 209 | + | |
174 | 210 | | |
175 | 211 | | |
176 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
241 | 252 | | |
242 | 253 | | |
243 | 254 | | |
| |||
0 commit comments