Commit e587329
authored
fix(lint): treat an HTML comment as a text boundary outside inline elements (#1140)
* fix(lint): treat an HTML comment as a text boundary outside inline elements
An HTML comment left closedInline untouched, so clean() hit neither arm of
its whitespace rule and the following text lost its leading space. 'on
<!-- TODO --> a' fused to 'ona' and raised a false spelling alert.
Set closedInline on a comment only when no inline element is open. Inside
an open inline element the opening tag is still the boundary, so its
padding (#1052) is preserved.
Fixes #882
* test(lint): pin the inline-element case for #882
The fixture already covered a comment inside an open <em>, but the case
still asserted no output, so the regression it guards against would not
have failed the suite.
---------
Co-authored-by: VXNCXNX <VXNCXNX@users.noreply.github.com>1 parent 4691bd3 commit e587329
4 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments