Select the paragraphs, click the gear, and click “Blur Spoiler.”
Actual: The editor inserts spoiler tags inline at the start/end of the selection, which used to work, but which no longer makes a multi-paragraph spoiler.
Note that it should also do the right thing if you select the spoilers in this example:
foo Rosebud is a sled
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
Darth is Anakin bar
Currently it does this:
foo [spoiler]Rosebud is a sled
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
Darth is Anakin[/spoiler] bar
I’m not 100% sure what it should do in this case. One thing it might do is convert the inline spoilers into a spoiler block like this.
foo
[spoiler]
Rosebud is a sled
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
Darth is Anakin
[/spoiler]
bar
foo
Rosebud is a sled
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
Darth is Anakin
bar
But perhaps instead it should wrap each inline section with its own [spoiler] tag and embed all of the paragraphs in a spoiler block.
foo [spoiler]Rosebud is a sled[/spoiler]
[spoiler]
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
[/spoiler]
[spoiler]Darth is Anakin[/spoiler] bar
foo Rosebud is a sled
Bruce Willis died in Act 1
It was Kevin Spacey the whole time
Darth is Anakin bar
But that introduces three spoilers; you have to click on each spoiler one at a time to reveal it.
Yeah it’s not a markdown fix, simply an adjustment to the way the toolbar operates, toolbar introduces bad markdown, it needs to be smarter about adding new lines
@pmusaraj can you take a look? The selection and buttons in the editor are very well tested so it should be fairly obvious how to create a test for this situation.
This should be fixed via these two commits (core, discourse-spoiler-alert), the toolbar button will use “block mode” if the selected string is multiline.