From 3c4724d70e4ac7bfc06b97f6fad8936f97479b6b Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 17 Nov 2021 20:37:00 +0000 Subject: 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 --- modules/indexer/code/search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/indexer/code') 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 } -- cgit v1.2.3