projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
713f577
)
helpers: Use iterate operator by int in Emojify
author
bogem
<albertnigma@gmail.com>
Mon, 21 Nov 2016 21:57:38 +0000
(22:57 +0100)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Wed, 23 Nov 2016 08:13:00 +0000
(09:13 +0100)
Fix golint warning: helpers/emoji.go:56:4: should replace start += 1
with start++
See #2014
helpers/emoji.go
patch
|
blob
|
history
diff --git
a/helpers/emoji.go
b/helpers/emoji.go
index f945286500a7c28ade796611c62db1eb3603c34b..31cd29deb44c6ad1057b93b75f7899b3fcf6ba2a 100644
(file)
--- 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 {