From 483cf19d5de05e8a83fd1be6934baa169c7fd7c8 Mon Sep 17 00:00:00 2001
From: "Iskander (Alex) Sharipov" <quasilyte@gmail.com>
Date: Sat, 2 Feb 2019 10:19:12 +0300
Subject: [PATCH] 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>
---
 common/herrors/error_locator.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/herrors/error_locator.go b/common/herrors/error_locator.go
index 3a72f479..15de6d31 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 {
-- 
2.30.2