Description
Hi, there’s a bug with details-plugin: when selecting a big chunk of text separated in paragraphs, clicking the Hide Details -button causes the [details...]
to be prefixed to each separate paragraph, not just the beginning (and end) of the selection.
The same bug applies to spoiler-plugin.
Location of bug
As far as I know, the problem is here (no idea how to fix):
So likely the culprit is applySurround
and how it functions…
Reproduction
- Write several lines of text (separate with linebreak)
- Choose all the lines.
- Click Hide Details.
- PROFIT
Result
Summary
Lines with text
Summary
Lines with text
Summary
Lines with text
Summary
Lines with text
Summary
Lines with text
[details=Summary]Lines with text[/details]
[details=Summary]Lines with text[/details]
[details=Summary]Lines with text[/details]
[details=Summary]Lines with text[/details]
[details=Summary]Lines with text[/details]
Should result in:
[details=Summary]Lines with text
Lines with text
Lines with text
Lines with text
Lines with text[/details]
[details=Summary]Lines with text
Lines with text
Lines with text
Lines with text
Lines with text[/details]