Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __init__
def filter

Public Attributes


Detailed Description

Highlight special code tags in comments and docstrings.

Options accepted:

`codetags` : list of strings
   A list of strings that are flagged as code tags.  The default is to
   highlight ``XXX``, ``TODO``, ``BUG`` and ``NOTE``.

Definition at line 73 of file

Constructor & Destructor Documentation

Definition at line 84 of file

00085     def __init__(self, **options):
00086         Filter.__init__(self, **options)
00087         tags = get_list_opt(options, 'codetags',
00088                             ['XXX', 'TODO', 'BUG', 'NOTE'])
00089         self.tag_re = re.compile(r'\b(%s)\b' % '|'.join([
00090             re.escape(tag) for tag in tags if tag
00091         ]))

Member Function Documentation

def (   self,

Definition at line 92 of file

00093     def filter(self, lexer, stream):
00094         regex = self.tag_re
00095         for ttype, value in stream:
00096             if ttype in String.Doc or \
00097                ttype in Comment and \
00098                ttype not in Comment.Preproc:
00099                 for sttype, svalue in _replace_special(ttype, value, regex,
00100                                                        Comment.Special):
00101                     yield sttype, svalue
00102             else:
00103                 yield ttype, value

Here is the call graph for this function:

Member Data Documentation

Definition at line 88 of file

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