mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
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:
parent
e3f82db006
commit
1a0093ec0a
1 changed files with 71 additions and 68 deletions
|
@ -24,7 +24,8 @@ 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'),
|
||||||
|
('Specific Code', (
|
||||||
('abap', 'ABAP'),
|
('abap', 'ABAP'),
|
||||||
('apacheconf', 'ApacheConf'),
|
('apacheconf', 'ApacheConf'),
|
||||||
('applescript', 'AppleScript'),
|
('applescript', 'AppleScript'),
|
||||||
|
@ -62,6 +63,7 @@ LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', (
|
||||||
('monkey', 'Monkey'),
|
('monkey', 'Monkey'),
|
||||||
('mysql', 'MySQL'),
|
('mysql', 'MySQL'),
|
||||||
('numpy', 'NumPy'),
|
('numpy', 'NumPy'),
|
||||||
|
('objc', 'Obj-C'),
|
||||||
('ocaml', 'OCaml'),
|
('ocaml', 'OCaml'),
|
||||||
('perl', 'Perl'),
|
('perl', 'Perl'),
|
||||||
('php', 'PHP'),
|
('php', 'PHP'),
|
||||||
|
@ -92,6 +94,7 @@ LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', (
|
||||||
('xquery', 'XQuery'),
|
('xquery', 'XQuery'),
|
||||||
('xslt', 'XSLT'),
|
('xslt', 'XSLT'),
|
||||||
('yaml', 'YAML'),
|
('yaml', 'YAML'),
|
||||||
|
))
|
||||||
))
|
))
|
||||||
|
|
||||||
LEXER_KEYS = dict(LEXER_LIST).keys()
|
LEXER_KEYS = dict(LEXER_LIST).keys()
|
||||||
|
|
Loading…
Reference in a new issue