BBC Question regarding <br />

Started by kittysoman2013, April 23, 2020, 02:01:32 AM

Previous topic - Next topic

kittysoman2013

I've been making my BBC code and am wondering how to do the following:
I have a spoiler that spans the whole line, just like a quote would, and then opens down when clicked on, however, when I type it in the post window, the following occurs:
After a [/quote] tag, it doesn't matter if you continue writing on or if you hit enter, since it will automatically start in the next line
However after my [/spoiler] tag, if i continue writing normally, the text appears normal, yet if i hit enter, there will be one <br /> tag too much.

How do I make the spoiler tag to behave like the quote tag does, by ignoring the <br /> if the user hits enter or if he doesnt?
Thank you for help.

Arantor

Is your spoiler tag defined as a block level tag in the parser? block_level tags should trim trailing brs after them.

Advertisement: