v0.4.0 - New BBCode Parser

punkweb
Administrator
Joined:
Posts:
12
New BBCode Parser

After some consideration, I've decided to switch the BBCode parser used by PunkwebBB from django-precise-bbcode to dcwatson/bbcode.

PunkwebBB uses different parsers for different purposes.  For example, the shoutbox renderer uses a limited parser to not allow tags that wouldn't be suitable for a shoutbox, while threads use the main parser that has access to all of the tags.  The main reason for the switch in parsers is that dcwatson/bbcode allows me to create these different parsers with a greater control over how they behave.

Another upside to this change is that dcwatson/bbcode is just a Python package, whereas django-precise-bbcode is a Django application.  This distinction is important, because dcwatson/bbcode requires no additional steps during installation, whereas django-precise-bbcode adds it's own Django models, and must be added to INSTALLED_APPS to work.

This shouldn't affect any existing forums, all of the tags have been rewritten to work in the new parser, and migrations should go smoothly.

Experimental BBCode/Markdown Parser

Forums can now use a mix of both BBCode and Markdown at the same time, similar to how Discourse works, by setting the following option in your project's settings module:

PUNKWEB_BB = {
    "PARSER": "mix",
}

It should be noted that this feature is experimental and has some issues that still need to be worked out.  I would not recommend using this parser in production, but it may eventually become the default parser.
Thanks for checking out PunkwebBB!
#1
j
Member
Joined:
Posts:
3
gosteiii
#2
t
Member
Joined:
Posts:
1
Lorem ipsum dolor sit amet ...