Added JS/React Lexer. Fixes #124

This commit is contained in:
Martin Mahner 2019-06-24 11:27:25 +02:00
parent e669357f2d
commit 39e45c8344
2 changed files with 4 additions and 1 deletions

View file

@ -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'),

View file

@ -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