From b35211af984cf9a5bb32b37f4c9e3458f28b4c26 Mon Sep 17 00:00:00 2001 From: mattpass Date: Sat, 18 Apr 2020 09:49:39 +0100 Subject: [PATCH] Tidy language partials JS --- assets/js/language-modes-partial.js | 49 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/assets/js/language-modes-partial.js b/assets/js/language-modes-partial.js index 5d520ec..4f7df4e 100644 --- a/assets/js/language-modes-partial.js +++ b/assets/js/language-modes-partial.js @@ -3,27 +3,28 @@ fileExt = fileName.split("."); fileExt = fileExt[fileExt.length-1]; var mode = - fileExt == "js" || fileExt == "json" ? "text/javascript" - : fileExt == "coffee" ? "text/x-coffeescript" - : fileExt == "ts" ? "application/typescript" - : fileExt == "rb" ? "text/x-ruby" - : fileExt == "py" ? "text/x-python" - : fileExt == "mpy" ? "text/x-python" - : fileExt == "css" ? "text/css" - : fileExt == "less" ? "text/x-less" - : fileExt == "md" ? "text/x-markdown" - : fileExt == "xml" ? "application/xml" - : fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql - : fileExt == "erl" ? "text/x-erlang" - : fileExt == "yaml" ? "text/x-yaml" - : fileExt == "java" ? "text/x-java" - : fileExt == "jl" ? "text/x-julia" - : fileExt == "c" ? "text/x-csrc" - : fileExt == "cpp" ? "text/x-c++src" - : fileExt == "ino" ? "text/x-c++src" - : fileExt == "cs" ? "text/x-csharp" - : fileExt == "go" ? "text/x-go" - : fileExt == "lua" ? "text/x-lua" - : fileExt == "pl" ? "text/x-perl" - : fileExt == "scss" ? "text/x-sass" - : "application/x-httpd-php"; + fileExt == "js" ? "text/javascript" + : fileExt == "json" ? "text/javascript" + : fileExt == "coffee" ? "text/x-coffeescript" + : fileExt == "ts" ? "application/typescript" + : fileExt == "rb" ? "text/x-ruby" + : fileExt == "py" ? "text/x-python" + : fileExt == "mpy" ? "text/x-python" + : fileExt == "css" ? "text/css" + : fileExt == "less" ? "text/x-less" + : fileExt == "md" ? "text/x-markdown" + : fileExt == "xml" ? "application/xml" + : fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql + : fileExt == "erl" ? "text/x-erlang" + : fileExt == "yaml" ? "text/x-yaml" + : fileExt == "java" ? "text/x-java" + : fileExt == "jl" ? "text/x-julia" + : fileExt == "c" ? "text/x-csrc" + : fileExt == "cpp" ? "text/x-c++src" + : fileExt == "ino" ? "text/x-c++src" + : fileExt == "cs" ? "text/x-csharp" + : fileExt == "go" ? "text/x-go" + : fileExt == "lua" ? "text/x-lua" + : fileExt == "pl" ? "text/x-perl" + : fileExt == "scss" ? "text/x-sass" + : "application/x-httpd-php";