Skip to content
Permalink
Browse files

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>
  • Loading branch information...
quasilyte authored and bep committed Feb 2, 2019
1 parent 7201042 commit 483cf19d5de05e8a83fd1be6934baa169c7fd7c8
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 {

0 comments on commit 483cf19

Please sign in to comment.
You can’t perform that action at this time.