From edf15b0affe6e7fb0cb76d68db21e4e5953a7d86 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Tue, 10 Oct 2017 03:39:58 +0700 Subject: [PATCH] Fix order output of chroma cli tool Changes output for the chroma cli tool for styles and formatters so that the output on --list is always in the same order. --- cmd/chroma/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/chroma/main.go b/cmd/chroma/main.go index 3222636..8181285 100644 --- a/cmd/chroma/main.go +++ b/cmd/chroma/main.go @@ -198,12 +198,12 @@ func listAll() { } fmt.Println() fmt.Printf("styles:") - for name := range styles.Registry { + for _, name := range styles.Names() { fmt.Printf(" %s", name) } fmt.Println() fmt.Printf("formatters:") - for name := range formatters.Registry { + for _, name := range formatters.Names() { fmt.Printf(" %s", name) } fmt.Println()