mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 18:39:55 -04:00
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>
This commit is contained in:
parent
7201042946
commit
483cf19d5d
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user