Remove unused color-specific highlight groups

This commit is contained in:
2025-06-15 13:26:09 -04:00
parent 9eebc43772
commit 160b1d67ec
+4 -4
View File
@@ -33,9 +33,9 @@ func Colorize(inputCode, languageID string) (string, error) {
if group, ok := matches[lineN][colN]; ok {
var colorCode string
switch group {
case highlite.Groups["statement"], highlite.Groups["green"]:
case highlite.Groups["statement"]:
colorCode = "\033[32m" // Green
case highlite.Groups["identifier"], highlite.Groups["blue"]:
case highlite.Groups["identifier"]:
colorCode = "\033[94m" // Bright Blue
case highlite.Groups["preproc"]:
colorCode = "\033[91m" // Bright Red
@@ -46,9 +46,9 @@ func Colorize(inputCode, languageID string) (string, error) {
colorCode = "\033[36m" // Cyan
case highlite.Groups["constant.specialChar"], highlite.Groups["magenta"]:
colorCode = "\033[95m" // Bright Magenta
case highlite.Groups["type"], highlite.Groups["yellow"]:
case highlite.Groups["type"]:
colorCode = "\033[33m" // Yellow
case highlite.Groups["comment"], highlite.Groups["high.green"]:
case highlite.Groups["comment"], highlite.Groups["brightgreen"]:
colorCode = "\033[92m" // Bright Green
default:
colorCode = "\033[0m" // Reset