Commit 954e3b3
committed
Fix(strip_html): handle multiline comments
The `strip_html` filter was not correctly handling multiline HTML
comments. This was due to the regex using the `m` flag instead of the `s`
flag. The `m` flag only makes `^` and `$` match the start and end of
lines, while the `s` flag makes `.` match any character, including
newlines.
This commit changes the regex flags from `m` to `s` for both
`@html_blocks` and `@html_tags` to correctly handle multiline content.
A doctest has been added to cover the failing case.1 parent d1937e9 commit 954e3b3
File tree
3 files changed
+9
-2
lines changed- lib/solid
- test/solid/integration/scenarios/filter
3 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
| 1140 | + | |
| 1141 | + | |
1140 | 1142 | | |
1141 | | - | |
1142 | | - | |
| 1143 | + | |
| 1144 | + | |
1143 | 1145 | | |
1144 | 1146 | | |
1145 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
0 commit comments