We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09463d1 commit 0e887afCopy full SHA for 0e887af
modules/highlight/highlight.go
@@ -19,9 +19,11 @@ var (
19
}
20
21
// File names that are representing highlight classes.
22
- highlightFileNames = map[string]bool{
23
- "dockerfile": true,
24
- "makefile": true,
+ highlightFileNames = map[string]string{
+ "dockerfile": "dockerfile",
+ "makefile": "makefile",
25
+ "gnumakefile": "makefile",
26
+ "cmakelists.txt": "cmake",
27
28
29
// Extensions that are same as highlight classes.
@@ -87,8 +89,8 @@ func FileNameToHighlightClass(fname string) string {
87
89
return "nohighlight"
88
90
91
- if highlightFileNames[fname] {
- return fname
92
+ if name, ok := highlightFileNames[fname]; ok {
93
+ return name
94
95
96
ext := path.Ext(fname)
0 commit comments