mirror of
https://git.cmoser.eu/tinytools/django-tinywiki.git
synced 2026-02-04 06:06:33 +01:00
28 lines
591 B
Python
28 lines
591 B
Python
import bbcode
|
|
from . import formatters
|
|
PARSER = bbcode.Parser(newline="\n",escape_html=True)
|
|
|
|
def _():
|
|
for i in formatters.SIMPLE_FORMATTERS:
|
|
if len(i) == 0:
|
|
continue
|
|
|
|
if len(i) == 1:
|
|
kwargs = {}
|
|
else:
|
|
kwargs = i[1]
|
|
PARSER.add_simple_formatter(*i[0],**kwargs)
|
|
|
|
for i in formatters.FORMATTERS:
|
|
if len(i) == 0:
|
|
continue
|
|
|
|
if len(i) == 1:
|
|
kwargs = {}
|
|
else:
|
|
kwargs = i[1]
|
|
|
|
PARSER.add_formatter(*i[0],**kwargs)
|
|
|
|
_()
|
|
del _ |