Our forum has a lot of [code][/code] in its topics, imported from our old phpbb3 forum. One of our user reported a couple of bugs with [code][/code]. For example, this:
A single line of code without newline looks as a grey thick line:
[code]TString option = GetOption();[/code]
Gives:
A single line of code without newline looks as a grey thick line:
TString option = GetOption();
And in this other example, the -- ----------------------------------------------------------- line gives another issue:
[code]hatiden@ubuntu:~$ gedit ~/.bashrc
hatiden@ubuntu:~$ cd /home/hatiden/garfield/
It means you are going to need to apply some sort of processor on the old imported code if you want multiline bbcode to be converted from:
some text [code]
test
[/code] test
to:
some text
[code]
test
[/code]
test
It is quite a fiddly transform and I did not want it included in core.
If I were to attack this on an old imported corpus I would apply a transform to the postsraw column that inserts the missing newlines and then run a full rebake.
Oh, OK, I see. Well, I think our main issue now is the single line one (as in my first post)
I wasn’t even aware of the one you describe, so I suppose there should not be many…
If there are not many, I would recommend installing the Discourse Data Explorer Plugin. Then you can find them and fix by hand. You just need to figure out the magic regex.