Back to index

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

List of all members.

Public Member Functions

def analyse_text

Static Public Attributes

string name = 'Debian Sourcelist'
list aliases = ['sourceslist', 'sources.list']
list filenames = ['sources.list']
list mimetype = ['application/x-debian-sourceslist']
dictionary tokens

Detailed Description

Lexer that highlights debian sources.list files.

*New in Pygments 0.7.*

Definition at line 61 of file

Member Function Documentation

Definition at line 102 of file

00103     def analyse_text(text):
00104         for line in text.split('\n'):
00105             line = line.strip()
00106             if not (line.startswith('#') or line.startswith('deb ') or
00107                     line.startswith('deb-src ') or not line):
00108                 return False
00109         return True

Member Data Documentation

list = ['sourceslist', 'sources.list'] [static]

Definition at line 69 of file

Definition at line 70 of file

list = ['application/x-debian-sourceslist'] [static]

Definition at line 71 of file

string = 'Debian Sourcelist' [static]

Definition at line 68 of file

Initial value:
        'root': [
            (r'\s+', Text),
            (r'#.*?$', Comment),
             bygroups(Keyword, Text), 'distribution')
        'distribution': [
            (r'#.*?$', Comment, '#pop'),
            (r'\$\(ARCH\)', Name.Variable),
            (r'[^\s$[]+', String),
            (r'\[', String.Other, 'escaped-distribution'),
            (r'\$', String),
            (r'\s+', Text, 'components')
        'escaped-distribution': [
            (r'\]', String.Other, '#pop'),
            (r'\$\(ARCH\)', Name.Variable),
            (r'[^\]$]+', String.Other),
            (r'\$', String.Other)
        'components': [
            (r'#.*?$', Comment, '#pop:2'),
            (r'$', Text, '#pop:2'),
            (r'\s+', Text),
            (r'\S+', Keyword.Pseudo),

Definition at line 73 of file

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