From 39e45c83443b365c7557378f010607d1be58716e Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Mon, 24 Jun 2019 11:27:25 +0200 Subject: [PATCH] Added JS/React Lexer. Fixes #124 --- dpaste/apps.py | 2 ++ setup.cfg | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dpaste/apps.py b/dpaste/apps.py index 645ae49..cbdd113 100644 --- a/dpaste/apps.py +++ b/dpaste/apps.py @@ -136,6 +136,7 @@ class dpasteAppConfig(AppConfig): ... """ from dpaste.highlight import PlainCodeHighlighter + from jsx.lexer import JsxLexer return [ (self.PLAIN_CODE_SYMBOL, 'Plain Code', PlainCodeHighlighter), @@ -355,6 +356,7 @@ class dpasteAppConfig(AppConfig): # ('js+smarty', 'JavaScript+Smarty'), # ('jsgf', 'JSGF'), ('json', 'JSON'), + ('jsx', 'JSX/React'), # ('json-object', 'JSONBareObject'), # ('jsonld', 'JSON-LD'), # ('jsp', 'Java Server Page'), diff --git a/setup.cfg b/setup.cfg index 2cfde4f..a4593b0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,7 +36,8 @@ install_requires = django-staticinline>=1.0 django-csp>=3.3 - # Additional Text Lexer + # Additional Lexer + jsx-lexer==0.0.7 misaka>=2.1.0 docutils