mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-06 00:47:15 -04:00
Support all rules in ansi.Colorize(); allow custom colors
This commit is contained in:
@@ -128,7 +128,7 @@ echo "Hello, World!"`,
|
||||
for _, example := range helloWorldExamples {
|
||||
fmt.Printf("Language: %s\n\n", example.language)
|
||||
|
||||
colorized, err := ansi.Colorize(example.code, example.language)
|
||||
colorized, err := ansi.Colorize(example.code, example.language, 171)
|
||||
if err != nil {
|
||||
log.Printf("Error colorizing %s: %v\n", example.language, err)
|
||||
fmt.Println("(Unable to highlight this code)")
|
||||
|
||||
Reference in New Issue
Block a user