summaryrefslogtreecommitdiffstats
path: root/application/libraries/Pygments.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/libraries/Pygments.php')
-rw-r--r--application/libraries/Pygments.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/application/libraries/Pygments.php b/application/libraries/Pygments.php
index e96b84258..4a771c08f 100644
--- a/application/libraries/Pygments.php
+++ b/application/libraries/Pygments.php
@@ -38,6 +38,9 @@ class Pygments {
$last_desc = "";
foreach (self::get_pygments_info() as $lexer) {
+ if (empty($lexer['names'])) {
+ continue;
+ }
$desc = $lexer['fullname'];
$name = $lexer['names'][0];
if ($desc == $last_desc) {
@@ -189,16 +192,20 @@ class Pygments {
$extensionarray = array(
'awk' => 'awk',
+ 'cast' => 'asciinema',
'c' => 'c',
'coffee' => 'coffee-script',
'cpp' => 'cpp',
+ 'cr' => 'crystal',
'diff' => 'diff',
+ 'go' => 'go',
'haml' => 'haml',
'h' => 'c',
'hs' => 'haskell',
'html' => 'xml',
'java' => 'java',
'js' => 'js',
+ 'json' => 'json',
'lhs' => 'lhs',
'lua' => 'lua',
'mli' => 'ocaml',
@@ -211,10 +218,12 @@ class Pygments {
'php' => 'php',
'pl' => 'perl',
'plpgsql' => 'plpgsql',
+ 'pm' => 'perl',
'postgresql' => 'postgresql',
'pp' => 'puppet',
'py' => 'python',
'rb' => 'ruby',
+ 'rs' => 'rust',
's' => 'asm',
'sh' => 'bash',
'sql' => 'sql',