From fbdcfa8066f98d896c2a746aa4fc6d5869f7e8d2 Mon Sep 17 00:00:00 2001 From: Christopher Trudeau Date: Mon, 21 Jun 2021 16:25:58 -0400 Subject: Changes from code review: - renamed nodecon to nodejsrepl - removed bad mimetypes --- pygments/lexers/javascript.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pygments/lexers/javascript.py') diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 1ea1f553..501ccfe9 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -1540,9 +1540,9 @@ class JuttleLexer(RegexLexer): class NodeConsoleLexer(Lexer): """ - For parsing JavaScript within an interactive Node.js shell, such as: + For parsing within an interactive Node.js REPL, such as: - .. sourcecode:: nodejs + .. sourcecode:: nodejsrepl > let a = 3 undefined @@ -1554,11 +1554,12 @@ class NodeConsoleLexer(Lexer): '4' > b == a false + + .. versionadded: 2.10 """ - name = 'JavaScript Node.js console session' - aliases = ['nodejs', 'nodecon'] - mimetypes = ['application/javascript', 'application/x-javascript', - 'text/x-javascript', 'text/javascript'] + name = 'Node.js REPL console session' + aliases = ['nodejsrepl', ] + mimetypes = ['text/x-nodejsrepl', ] def get_tokens_unprocessed(self, text): jslexer = JavascriptLexer(**self.options) -- cgit v1.2.1