Hallo Meta, we zijn terug. Laten we het hebben over Markdown-it en BBcode

Disclaimer: I know that trying to shove BBCode back into Discourse is unconventional but its one of the few things stopping us from completely moving to Discourse and Iโ€™ve seen some really large sites (not many) use custom bbcode to a degree. Any help would be appreciated.

Hey All,

After taking a year off from our testing, the bulk import tests have resumed. We can do 30 million messages (this includes PMs), users, avatars and such in under a few hours. Attachments still make it take a week but nothing is perfect.

One of the last things we worked on last time was our bbcode suite which is located here: Tutorial - RpNation - BBcode Guide | RpNation (that link is our live site on xenforo and all those codes were made by us for our community).

We mostly got them working on Discourse here: GitHub - RpNation/discourse-rpn-bbcode

But we had issues with inline bbcodes inside of block codes:

[block][inline]text[/inline]
text
[/block]

To get around this we have an inelegant branch Refactor/TextPostProcss that runs a regex replacement after the bbcode parse.

I wanted to know if anyone had any ideas on how improve what we are doing within the confines of Markdown-it and discourse. We were thinking of possibly just using an entirely new bbcode parser at some point as an option as well.

For those of you curious, hereโ€™s the kind of stuff that some of our users have made with bbcodes on xenforo: Resource - ๐šŒ๐šŠ๐š—๐š๐šข ๐šœ๐š”๐š’๐šŽ๐šœ: ๐š๐š‘๐šŽ ๐šœ๐š ๐šŽ๐šŽ๐š ๐š๐šŠ๐šŒ๐š๐š˜๐š›๐šข! | RpNation

It mostly works on Discourse now after our new branch but we havenโ€™t setup a Discourse demo for bbcode yet. (Going to be focusing on the bulk importer and styling first before we return our attention to bbcode as a whole again).

Credit to @Alteras for leading the way on our bbcode project last year. @Ghan as well, though heโ€™s leading the efforts primarily on the bulk importer, Iโ€™m just a styling monkey and the guy who owns the site.

Canโ€™t say I understand all you said, but maybe this information could interest you?

Unfortunately not, but we already have some leads!

I wonder if moving from bbcode to html custom elements would make it easier. Would this be feasible?

That is something weโ€™ve definitely thought about and desired in the past, I was not aware that we could extend and whitelist the existing suite of allowed html. We do have a workaround for the issue already but itโ€™s a regex that runs clientside to fix any remaining tag issues.

Any documentation or examples you could point us at?