mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Added JS/React Lexer. Fixes #124
This commit is contained in:
parent
e669357f2d
commit
39e45c8344
2 changed files with 4 additions and 1 deletions
|
@ -136,6 +136,7 @@ class dpasteAppConfig(AppConfig):
|
||||||
...
|
...
|
||||||
"""
|
"""
|
||||||
from dpaste.highlight import PlainCodeHighlighter
|
from dpaste.highlight import PlainCodeHighlighter
|
||||||
|
from jsx.lexer import JsxLexer
|
||||||
|
|
||||||
return [
|
return [
|
||||||
(self.PLAIN_CODE_SYMBOL, 'Plain Code', PlainCodeHighlighter),
|
(self.PLAIN_CODE_SYMBOL, 'Plain Code', PlainCodeHighlighter),
|
||||||
|
@ -355,6 +356,7 @@ class dpasteAppConfig(AppConfig):
|
||||||
# ('js+smarty', 'JavaScript+Smarty'),
|
# ('js+smarty', 'JavaScript+Smarty'),
|
||||||
# ('jsgf', 'JSGF'),
|
# ('jsgf', 'JSGF'),
|
||||||
('json', 'JSON'),
|
('json', 'JSON'),
|
||||||
|
('jsx', 'JSX/React'),
|
||||||
# ('json-object', 'JSONBareObject'),
|
# ('json-object', 'JSONBareObject'),
|
||||||
# ('jsonld', 'JSON-LD'),
|
# ('jsonld', 'JSON-LD'),
|
||||||
# ('jsp', 'Java Server Page'),
|
# ('jsp', 'Java Server Page'),
|
||||||
|
|
|
@ -36,7 +36,8 @@ install_requires =
|
||||||
django-staticinline>=1.0
|
django-staticinline>=1.0
|
||||||
django-csp>=3.3
|
django-csp>=3.3
|
||||||
|
|
||||||
# Additional Text Lexer
|
# Additional Lexer
|
||||||
|
jsx-lexer==0.0.7
|
||||||
misaka>=2.1.0
|
misaka>=2.1.0
|
||||||
docutils
|
docutils
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue