[PATCH] Add Rust and LLVM into a list of highlight options

#1

Observed Behavior:

Rust and LLVM are missing from a list of highlightable languages in /paste.

Expected Behavior:

There should be more languages there.

Phabricator Version:

master.

Reproduction Steps:

go to /paste and attempt to paste some Rust or LLVM code.

Patch:

Since there appears to be no better place to attach a diff, posting it here, it should work, but I haven’t tested it. Feel free to consider the patch as coming from public domain.

From f3d08886f966dddf92d61fddfdd6b4476966d73d Mon Sep 17 00:00:00 2001
Date: Sat, 6 Apr 2019 00:19:01 +0300
Subject: [PATCH] Add Rust and LLVM as highlight options

---
 .../option/PhabricatorSyntaxHighlightingConfigOptions.php     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
index 27596f7f0..08c276702 100644
--- a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
+++ b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php
@@ -90,6 +90,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions
           'java' => 'Java',
           'js' => 'Javascript',
           'json' => 'JSON',
+          'llvm' => 'LLVM',
           'make' => 'Makefile',
           'mysql' => 'MySQL',
           'nginx' => 'Nginx Configuration',
@@ -102,9 +103,10 @@ final class PhabricatorSyntaxHighlightingConfigOptions
           'python' => 'Python',
           'rainbow' => 'Rainbow',
           'remarkup' => 'Remarkup',
-          'rst' => 'reStructuredText',
           'robotframework' => 'RobotFramework',
+          'rst' => 'reStructuredText',
           'ruby' => 'Ruby',
+          'rust' => 'Rust',
           'sql' => 'SQL',
           'tex' => 'LaTeX',
           'text' => 'Plain Text',
-- 
2.19.2
0 Likes

#2

See pygments.dropdown-choices in Config.

0 Likes

closed #3
0 Likes