summaryrefslogtreecommitdiffstats
path: root/modules/indexer
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-17 20:37:00 +0000
committerGitHub <noreply@github.com>2021-11-17 20:37:00 +0000
commit3c4724d70e4ac7bfc06b97f6fad8936f97479b6b (patch)
tree754286def789b823e020d3ccfafae148d0017b62 /modules/indexer
parent81a4fc752833101dd7d6b4f612bccc4b29c98dff (diff)
downloadgitea-3c4724d70e4ac7bfc06b97f6fad8936f97479b6b.tar.gz
gitea-3c4724d70e4ac7bfc06b97f6fad8936f97479b6b.zip
Add .gitattribute assisted language detection to blame, diff and render (#17590)
Use check attribute code to check the assigned language of a file and send that in to chroma as a hint for the language of the file. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/indexer')
-rw-r--r--modules/indexer/code/search.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/indexer/code/search.go b/modules/indexer/code/search.go
index 51b7c9427d..bb8dcf16b3 100644
--- a/modules/indexer/code/search.go
+++ b/modules/indexer/code/search.go
@@ -101,7 +101,7 @@ func searchResult(result *SearchResult, startIndex, endIndex int) (*Result, erro
Language: result.Language,
Color: result.Color,
LineNumbers: lineNumbers,
- FormattedLines: highlight.Code(result.Filename, formattedLinesBuffer.String()),
+ FormattedLines: highlight.Code(result.Filename, "", formattedLinesBuffer.String()),
}, nil
}