class BBCodeFormatter(Formatter):
Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.
This formatter has no support for background colors and borders, as there are no common BBcode tags for that.
Some board systems (e.g. phpBB) don't support colors in their [code] tag, so you can't use the highlighting together with that tag. Text in a [code] tag usually is shown with a monospace font (which this formatter can do with the monofont option) and no spaces (which you need for indentation) are removed.
Additional options accepted:
style
codetag
monofont
Method | __init__ |
Undocumented |
Method | _make_styles |
Undocumented |
Method | format_unencoded |
Undocumented |
Class Variable | aliases |
Undocumented |
Class Variable | filenames |
Undocumented |
Class Variable | name |
Undocumented |
Instance Variable | _code |
Undocumented |
Instance Variable | _mono |
Undocumented |
Instance Variable | styles |
Undocumented |
Inherited from Formatter
:
Method | format |
Format tokensource, an iterable of (tokentype, tokenstring) tuples and write it into outfile. |
Method | get_style_defs |
Return the style definitions for the current style as a string. |
Class Variable | unicodeoutput |
Undocumented |
Instance Variable | encoding |
Undocumented |
Instance Variable | full |
Undocumented |
Instance Variable | options |
Undocumented |
Instance Variable | style |
Undocumented |
Instance Variable | title |
Undocumented |