summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-09 20:39:16 -0400
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-06-09 19:39:16 -0500
commit6d613fb28ef5d884bbea1e2a4d8c3e21fc398ecc (patch)
treed0d3652df4df2ee8049874dddb8e2e966b5470ae
parent4a3f40460bd5d6e540a72b53056f51cc61738de7 (diff)
downloadgitea-6d613fb28ef5d884bbea1e2a4d8c3e21fc398ecc.tar.gz
gitea-6d613fb28ef5d884bbea1e2a4d8c3e21fc398ecc.zip
No highlighting for .txt files (#1922)
-rw-r--r--modules/highlight/highlight.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go
index c3b504dfb4..fc9a4ad103 100644
--- a/modules/highlight/highlight.go
+++ b/modules/highlight/highlight.go
@@ -63,7 +63,9 @@ var (
}
// Extensions that are not same as highlight classes.
- highlightMapping = map[string]string{}
+ highlightMapping = map[string]string{
+ ".txt": "nohighlight",
+ }
)
// NewContext loads highlight map