Hide Details applies separately to each paragraph

For reference, this is the markdown that selecting multiple lines and clicking hide details generates.

[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]