From ae3e7e2ad91693a30a2b047260904207cd160826 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 20 Mar 2020 14:41:10 +0200 Subject: Fix bug in number of spaces in rainbows --- ui/rainbow.go | 1 + 1 file changed, 1 insertion(+) (limited to 'ui') 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, "%s", r.ColorID, graphemes.Str()) } -- cgit v1.2.3