Support all rules in ansi.Colorize(); allow custom colors

This commit is contained in:
2025-06-15 15:42:22 -04:00
parent fb66728b59
commit 7e2b926431
3 changed files with 67 additions and 20 deletions
+1 -1
View File
@@ -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)")