diff --git a/Makefile b/Makefile index 943a310..01f3b46 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,11 @@ test: pistol @echo mimetype + sh: @echo ------------------- @./pistol --config tests/config tests/mimetype-with-sh + @tput sgr0 + @echo ------------------- + @echo application/json \(issue '#'34\): + @echo ------------------- + @./pistol --config tests/config tests/34.json deps: go get github.com/c4milo/github-release diff --git a/internal_writers/map.go b/internal_writers/map.go index aa2a270..fa9c43e 100644 --- a/internal_writers/map.go +++ b/internal_writers/map.go @@ -7,6 +7,8 @@ import ( var internalWritersRegexMap = map[string] func(string, string) (func(w io.Writer) error, error) { "text/*": NewChromaWriter, + // https://github.com/doronbehar/pistol/issues/34 + "application/json": NewChromaWriter, "application/zip": NewArchiveLister, "application/x-rar-compressed": NewArchiveLister, "application/x-tar": NewArchiveLister, diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..f45d8f1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} diff --git a/tests/34.json b/tests/34.json new file mode 100644 index 0000000..5c14884 --- /dev/null +++ b/tests/34.json @@ -0,0 +1,3 @@ +{ + "text": "A JSON file should be printed with JSON chroma syntax highlighting" +}