From: bogem Date: Mon, 21 Nov 2016 21:57:38 +0000 (+0100) Subject: helpers: Use iterate operator by int in Emojify X-Git-Tag: v0.18~71 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=700d531a;p=brevno-suite%2Fhugo helpers: Use iterate operator by int in Emojify Fix golint warning: helpers/emoji.go:56:4: should replace start += 1 with start++ See #2014 --- diff --git a/helpers/emoji.go b/helpers/emoji.go index f9452865..31cd29de 100644 --- a/helpers/emoji.go +++ b/helpers/emoji.go @@ -53,7 +53,7 @@ func Emojify(source []byte) []byte { nextWordDelim := bytes.Index(source[j:upper], emojiWordDelim) if endEmoji < 0 { - start += 1 + start++ } else if endEmoji == 0 || (nextWordDelim != -1 && nextWordDelim < endEmoji) { start += endEmoji + 1 } else {