mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 16:17:21 +00:00
helpers: Use iterate operator by int in Emojify
Fix golint warning: helpers/emoji.go:56:4: should replace start += 1 with start++ See #2014
This commit is contained in:
1 parent
713f577a27
commit
700d531a2c
1 file changed
+1
-1
+1
-1
@@ -53,7 +53,7 @@ func Emojify(source []byte) []byte {
|
|||||||
nextWordDelim := bytes.Index(source[j:upper], emojiWordDelim)
|
nextWordDelim := bytes.Index(source[j:upper], emojiWordDelim)
|
||||||
|
|
||||||
if endEmoji < 0 {
|
if endEmoji < 0 {
|
||||||
start += 1
|
start++
|
||||||
} else if endEmoji == 0 || (nextWordDelim != -1 && nextWordDelim < endEmoji) {
|
} else if endEmoji == 0 || (nextWordDelim != -1 && nextWordDelim < endEmoji) {
|
||||||
start += endEmoji + 1
|
start += endEmoji + 1
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user