Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.pygments.lexers.templates.GenshiLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.templates.GenshiLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.templates.GenshiLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def analyse_text

Static Public Attributes

string name = 'Genshi'
list aliases = ['genshi', 'kid', 'xml+genshi', 'xml+kid']
list filenames = ['*.kid']
list alias_filenames = ['*.xml']
list mimetypes = ['application/x-genshi', 'application/x-kid']

Detailed Description

A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
`kid <http://kid-templating.org/>`_ kid XML templates.

Definition at line 763 of file templates.py.


Constructor & Destructor Documentation

Definition at line 775 of file templates.py.

00775 
00776     def __init__(self, **options):
00777         super(GenshiLexer, self).__init__(XmlLexer, GenshiMarkupLexer,
00778                                           **options)


Member Function Documentation

Definition at line 779 of file templates.py.

00779 
00780     def analyse_text(text):
00781         rv = 0.0
00782         if re.search('\$\{.*?\}', text) is not None:
00783             rv += 0.2
00784         if re.search('py:(.*?)=["\']', text) is not None:
00785             rv += 0.2
00786         return rv + XmlLexer.analyse_text(text) - 0.01
00787 


Member Data Documentation

Definition at line 772 of file templates.py.

list MoinMoin.support.pygments.lexers.templates.GenshiLexer.aliases = ['genshi', 'kid', 'xml+genshi', 'xml+kid'] [static]

Definition at line 770 of file templates.py.

Definition at line 771 of file templates.py.

list MoinMoin.support.pygments.lexers.templates.GenshiLexer.mimetypes = ['application/x-genshi', 'application/x-kid'] [static]

Definition at line 773 of file templates.py.

Definition at line 769 of file templates.py.


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