浏览代码

public: makes CodeMirror mode by filename lookups case-insensitive (#5857)

* updated the highlight.js plugin

* added some explicit mappings for syntax highlighting

* public: makes CodeMirror mode by filename extension lookup case-insensitive
Johannes 5 年之前
父节点
当前提交
7a0fbd0eb1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      public/js/gogs.js

+ 1 - 1
public/js/gogs.js

@@ -719,7 +719,7 @@ function initEditor() {
         var val = $editFilename.val(), m, mode, spec, extension, extWithDot, previewLink, dataUrl, apiCall;
         extension = extWithDot = "";
         if (m = /.+\.([^.]+)$/.exec(val)) {
-            extension = m[1];
+            extension = m[1].toLowerCase();
             extWithDot = "." + extension;
         }