Tetrakern / fictioneer

A web fiction theme for WordPress.
https://fictioneer-theme.com
GNU General Public License v3.0
104 stars 16 forks source link

Spoiler BBCode not always working properly #2

Closed Tetrakern closed 1 year ago

Tetrakern commented 1 year ago

The [spoiler] BBCode does not work properly when wrapping multiple lines and/or other BBCodes. The issue is somewhat softened through a bit of CSS trickery (displaying direct paragraph children inline) but it would be better to have a proper regular expression to match all cases. Or several in sequence, for that matter.

So far my nearly non-existent regex skills have failed me. Unsurprisingly.

Tetrakern commented 1 year ago

This has been mostly resolved in #d6c6256. It's possible there are still edge cases but if someone is hell-bent on blowing up the formatting, whatever. This doesn't hurt anyone.