Added a generic 'code' lexer (which actually falls back to Python) to have a better distinction to 'text'.

Refs issue #52.
This commit is contained in:
Martin Mahner 2014-03-13 15:42:07 +01:00
parent e3f82db006
commit 1a0093ec0a

View file

@ -24,74 +24,77 @@ LEXER_LIST = sorted(LEXER_LIST)
# retrieve this. # retrieve this.
LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', ( LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', (
('text', 'Text'), ('text', 'Text'),
('text', '----------'), ('code', 'Code'),
('abap', 'ABAP'), ('Specific Code', (
('apacheconf', 'ApacheConf'), ('abap', 'ABAP'),
('applescript', 'AppleScript'), ('apacheconf', 'ApacheConf'),
('as', 'ActionScript'), ('applescript', 'AppleScript'),
('bash', 'Bash'), ('as', 'ActionScript'),
('bbcode', 'BBCode'), ('bash', 'Bash'),
('c', 'C'), ('bbcode', 'BBCode'),
('clojure', 'Clojure'), ('c', 'C'),
('cobol', 'COBOL'), ('clojure', 'Clojure'),
('css', 'CSS'), ('cobol', 'COBOL'),
('cuda', 'CUDA'), ('css', 'CSS'),
('dart', 'Dart'), ('cuda', 'CUDA'),
('delphi', 'Delphi'), ('dart', 'Dart'),
('diff', 'Diff'), ('delphi', 'Delphi'),
('django', 'Django'), ('diff', 'Diff'),
('erlang', 'Erlang'), ('django', 'Django'),
('fortran', 'Fortran'), ('erlang', 'Erlang'),
('go', 'Go'), ('fortran', 'Fortran'),
('groovy', 'Groovy'), ('go', 'Go'),
('haml', 'Haml'), ('groovy', 'Groovy'),
('haskell', 'Haskell'), ('haml', 'Haml'),
('html', 'HTML'), ('haskell', 'Haskell'),
('http', 'HTTP'), ('html', 'HTML'),
('ini', 'INI'), ('http', 'HTTP'),
('irc', 'IRC'), ('ini', 'INI'),
('java', 'Java'), ('irc', 'IRC'),
('js', 'JavaScript'), ('java', 'Java'),
('json', 'JSON'), ('js', 'JavaScript'),
('lua', 'Lua'), ('json', 'JSON'),
('make', 'Makefile'), ('lua', 'Lua'),
('mako', 'Mako'), ('make', 'Makefile'),
('mason', 'Mason'), ('mako', 'Mako'),
('matlab', 'Matlab'), ('mason', 'Mason'),
('modula2', 'Modula'), ('matlab', 'Matlab'),
('monkey', 'Monkey'), ('modula2', 'Modula'),
('mysql', 'MySQL'), ('monkey', 'Monkey'),
('numpy', 'NumPy'), ('mysql', 'MySQL'),
('ocaml', 'OCaml'), ('numpy', 'NumPy'),
('perl', 'Perl'), ('objc', 'Obj-C'),
('php', 'PHP'), ('ocaml', 'OCaml'),
('postscript', 'PostScript'), ('perl', 'Perl'),
('powershell', 'PowerShell'), ('php', 'PHP'),
('prolog', 'Prolog'), ('postscript', 'PostScript'),
('properties', 'Properties'), ('powershell', 'PowerShell'),
('puppet', 'Puppet'), ('prolog', 'Prolog'),
('python', 'Python'), ('properties', 'Properties'),
('rb', 'Ruby'), ('puppet', 'Puppet'),
('rst', 'reStructuredText'), ('python', 'Python'),
('rust', 'Rust'), ('rb', 'Ruby'),
('sass', 'Sass'), ('rst', 'reStructuredText'),
('scala', 'Scala'), ('rust', 'Rust'),
('scheme', 'Scheme'), ('sass', 'Sass'),
('scilab', 'Scilab'), ('scala', 'Scala'),
('scss', 'SCSS'), ('scheme', 'Scheme'),
('smalltalk', 'Smalltalk'), ('scilab', 'Scilab'),
('smarty', 'Smarty'), ('scss', 'SCSS'),
('sql', 'SQL'), ('smalltalk', 'Smalltalk'),
('tcl', 'Tcl'), ('smarty', 'Smarty'),
('tcsh', 'Tcsh'), ('sql', 'SQL'),
('tex', 'TeX'), ('tcl', 'Tcl'),
('text', 'Text'), ('tcsh', 'Tcsh'),
('vb.net', 'VB.net'), ('tex', 'TeX'),
('vim', 'VimL'), ('text', 'Text'),
('xml', 'XML'), ('vb.net', 'VB.net'),
('xquery', 'XQuery'), ('vim', 'VimL'),
('xslt', 'XSLT'), ('xml', 'XML'),
('yaml', 'YAML'), ('xquery', 'XQuery'),
('xslt', 'XSLT'),
('yaml', 'YAML'),
))
)) ))
LEXER_KEYS = dict(LEXER_LIST).keys() LEXER_KEYS = dict(LEXER_LIST).keys()