summaryrefslogtreecommitdiffstats
path: root/common/herrors
diff options
context:
space:
mode:
authorIskander (Alex) Sharipov <quasilyte@gmail.com>2019-02-02 10:19:12 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-02-02 09:55:31 +0100
commit483cf19d5de05e8a83fd1be6934baa169c7fd7c8 (patch)
tree2e648b483946af379c0bfeb9e611016743c289ad /common/herrors
parent7201042946dde78d5ea4fea9cb006fb4dded55c1 (diff)
common/herrors: Fix args order in strings.TrimPrefix
Old code always returned "." or "" (if filepath.Ext(filename) returned "."). Now it properly trims the prefix. Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
Diffstat (limited to 'common/herrors')
-rw-r--r--common/herrors/error_locator.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/herrors/error_locator.go b/common/herrors/error_locator.go
index 3a72f4790..15de6d318 100644
--- a/common/herrors/error_locator.go
+++ b/common/herrors/error_locator.go
@@ -173,7 +173,7 @@ func chromaLexerFromType(fileType string) string {
}
func extNoDelimiter(filename string) string {
- return strings.TrimPrefix(".", filepath.Ext(filename))
+ return strings.TrimPrefix(filepath.Ext(filename), ".")
}
func chromaLexerFromFilename(filename string) string {