Skip to content

Commit

Permalink
Add italics support for indexed colour terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Lee authored and alecthomas committed Sep 1, 2019
1 parent f2e0513 commit 2f5349a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions formatters/tty_indexed.go
Expand Up @@ -174,6 +174,9 @@ func entryToEscapeSequence(table *ttyTable, entry chroma.StyleEntry) string {
if entry.Underline == chroma.Yes {
out += "\033[4m"
}
if entry.Italic == chroma.Yes {
out += "\033[3m"
}
if entry.Colour.IsSet() {
out += table.foreground[findClosest(table, entry.Colour)]
}
Expand Down

0 comments on commit 2f5349a

Please sign in to comment.