Skip to content

Commit d2a3784

Browse files
committed
fix: fallback bug
Fixes #1252
1 parent 0b841ee commit d2a3784

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/chroma/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ func main() {
267267
}
268268

269269
func selectStyle() (*chroma.Style, error) {
270-
if style := styles.Get(cli.Style); style != styles.Fallback {
270+
style, ok := styles.Registry[cli.Style]
271+
if ok {
271272
return style, nil
272273
}
273274
r, err := os.Open(cli.Style)
@@ -433,7 +434,7 @@ func dumpXMLLexerDefinitions(dir string) error {
433434
fmt.Fprintf(os.Stderr, "warning: %s already exists\n", filename)
434435
continue
435436
}
436-
err = os.WriteFile(filename, data, 0o600)
437+
err = os.WriteFile(filename, data, 0600)
437438
if err != nil {
438439
return err
439440
}

0 commit comments

Comments
 (0)