Back to index

moin  1.9.0~rc2
Static Public Attributes
MoinMoin.support.pygments.lexers.text.BBCodeLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.text.BBCodeLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.text.BBCodeLexer:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

string name = 'BBCode'
list aliases = ['bbcode']
list mimetypes = ['text/x-bbcode']
dictionary tokens

Detailed Description

A lexer that highlights BBCode(-like) syntax.

*New in Pygments 0.6.*

Definition at line 347 of file text.py.


Member Data Documentation

Definition at line 355 of file text.py.

Definition at line 356 of file text.py.

Definition at line 354 of file text.py.

Initial value:
{
        'root': [
            (r'[^[]+', Text),
            # tag/end tag begin
            (r'\[/?\w+', Keyword, 'tag'),
            # stray bracket
            (r'\[', Text),
        ],
        'tag': [
            (r'\s+', Text),
            # attribute with value
            (r'(\w+)(=)("?[^\s"\]]+"?)',             bygroups(Name.Attribute, Operator, String)),            # tag argument (a la [color=green])            (r'(=)("?[^\s"\]]+"?)',
             bygroups(Operator, String)),
            # tag end
            (r'\]', Keyword, '#pop'),
        ],
    }

Definition at line 358 of file text.py.


The documentation for this class was generated from the following file: