Commit 615f9e1
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 615f9e1
3 files changed
Lines changed: 50 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 | + | |
28 | 51 | | |
29 | 52 | | |
30 | 53 | | |
| |||
84 | 107 | | |
85 | 108 | | |
86 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
87 | 121 | | |
88 | 122 | | |
89 | 123 | | |
| |||
135 | 169 | | |
136 | 170 | | |
137 | 171 | | |
138 | | - | |
| 172 | + | |
139 | 173 | | |
140 | 174 | | |
141 | 175 | | |
| |||
154 | 188 | | |
155 | 189 | | |
156 | 190 | | |
157 | | - | |
| 191 | + | |
158 | 192 | | |
159 | 193 | | |
160 | 194 | | |
| |||
170 | 204 | | |
171 | 205 | | |
172 | 206 | | |
173 | | - | |
| 207 | + | |
174 | 208 | | |
175 | 209 | | |
176 | 210 | | |
| |||
| 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 | + | |
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
| |||
0 commit comments