JonDum / BBCode-To-Markdown-Converter

Simple web-based BBCode to Markdown Converter
https://jondum.github.io/BBCode-To-Markdown-Converter/
Do What The F*ck You Want To Public License
32 stars 21 forks source link

bug: new paragraphs i.e. double-newlines #12

Open harry-wood opened 1 year ago

harry-wood commented 1 year ago

Many bbcodes such as [b][s][u] & [i] will allow new paragraphs i.e. double-newlines

[b]para 1

para 2[/b]

and the bold effect will apply to both paragraphs. But this is harder to do in markdown. You can't do this:

**para 1

para 2**

(And this is the current incorrect output)

Ideally it would convert to this

**para 1**

**para 2**

...but don't forget we'd need to re-apply all formatting (any open bbcodes) to both paragraphs, so that may be a bit tricky to implement.

harry-wood commented 1 year ago

If it's any consolation I've just been reporting the same problem in the ruby gem :-)

I'm suggesting a fix there with this commit but it's an ugly cheating workaround, to output this:

**para 1
<br>para 2**