diff options
author | Johannes <jh@maschinensehen.de> | 2019-11-09 00:23:08 +0100 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2019-11-08 15:23:08 -0800 |
commit | 7a0fbd0eb14f865753c5918fe73ecc4d24cfe503 (patch) | |
tree | cd9b9fa25e81e0983f7b9d035b35d1a06a4b0fcf | |
parent | 53d30ccde92f7891cf8691d18f109e28ea81d15c (diff) |
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
-rw-r--r-- | public/js/gogs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js index c57dca4f..e40c6206 100644 --- a/public/js/gogs.js +++ b/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; } |