mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-10-27 03:49:59 -04:00
Support all rules in ansi.Colorize(); allow custom colors
This commit is contained in:
1 parent
fb66728b59
commit
7e2b926431
3 files changed
+67
-20
No files matched your search
@@ -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