Skip to content

Commit

Permalink
fix: bad path normalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Nov 12, 2023
1 parent 09953ff commit 96a12e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/chroma/main.go
Expand Up @@ -371,7 +371,11 @@ func selexer(path, contents string) (lexer chroma.Lexer, err error) {
if err != nil {
return nil, err
}
path, err := filepath.Rel(cwd, cli.Lexer)
absPath, err := filepath.Abs(cli.Lexer)
if err != nil {
return nil, err
}
path, err := filepath.Rel(cwd, absPath)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 96a12e3

Please sign in to comment.