aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-03-20 14:41:10 +0200
committerTulir Asokan <tulir@maunium.net>2020-03-20 14:41:10 +0200
commitae3e7e2ad91693a30a2b047260904207cd160826 (patch)
treec2cd122b7a52114e34e4f218eab7af6586732281
parent87b394abecc54b136487d0086c3e62dac6a2acf2 (diff)
Fix bug in number of spaces in rainbows
-rw-r--r--ui/rainbow.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/rainbow.go b/ui/rainbow.go
index fca3cba..8a564be 100644
--- a/ui/rainbow.go
+++ b/ui/rainbow.go
@@ -70,6 +70,7 @@ func (r *RainbowRenderer) RenderNode(w io.Writer, node *blackfriday.Node, enteri
runes := graphemes.Runes()
if len(runes) == 1 && unicode.IsSpace(runes[0]) {
buf.WriteRune(runes[0])
+ continue
}
_, _ = fmt.Fprintf(&buf, "<font color=\"%s\">%s</font>", r.ColorID, graphemes.Str())
}