mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05: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
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ func chromaLexerFromType(fileType string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func extNoDelimiter(filename string) string {
|
func extNoDelimiter(filename string) string {
|
||||||
return strings.TrimPrefix(".", filepath.Ext(filename))
|
return strings.TrimPrefix(filepath.Ext(filename), ".")
|
||||||
}
|
}
|
||||||
|
|
||||||
func chromaLexerFromFilename(filename string) string {
|
func chromaLexerFromFilename(filename string) string {
|
||||||
|
|
Loading…
Reference in a new issue