I would like to use this extension on my own wiki, but I'd prefer to put the spoiler warning inline. Unfortunately, I am not a Javascript programmer. I tried changing the return part of spoilerMagicTag to
return $parser->insertStripItem( $output, $parser->mStripState );
as suggested in
Manual:Parser functions#Controlling the parsing of output
but this did not work and all of the output was still in separate paragraphs, including two lines that I was separating with a <br /> tag at first.
How do I keep the parser from adding <p></p> containers around every line of output? :(.
Thanks for any hints