DasRed / js-bbcode-parser

24 stars 7 forks source link

Code Tags / Prevent Parser from parsing sections #20

Closed TheBrohman closed 8 months ago

TheBrohman commented 1 year ago

Hello! Great parser, it has been a lifesaver trying to make sure the forums my friends recently swapped to can allow them to just copy their previous BBCode posts etc. I have been tinkering a bit myself in an attempt to add a [code][/code] to the parser, but with no luck. Is there any possibility for you to either add support for [code] tags within the parser itself, or at the very least guide me in the correct direction on adding them to the parser? I tried implementing it by simply having the [code] parse as whatever is between the code tags, but to no avail as it still goes through everything else and parses it non the less.

DasRed commented 8 months ago

Hey,

I added a code tag to the simple parser, which compiles to a pre Tag. Can be found in the release v5.1.0.

Thx for your input