summaryrefslogtreecommitdiff
path: root/src/core.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core.go b/src/core.go
index 62edd089..2db5b3ae 100644
--- a/src/core.go
+++ b/src/core.go
@@ -112,7 +112,9 @@ func Run(opts *Options, revision string) {
prevAnsiState := ansiState
_, _, ansiState = extractColor(token.text.ToString(), ansiState, nil)
if prevAnsiState != nil {
- token.text.Wrap(prevAnsiState.ToString(), "\x1b[m")
+ token.text.Prepend("\x1b[m" + prevAnsiState.ToString())
+ } else {
+ token.text.Prepend("\x1b[m")
}
}
}