Accept hyphen and plus sign in emoji detection
authorAnthony Fok <foka@debian.org>
Tue, 29 Jan 2019 12:38:36 +0000 (05:38 -0700)
committerAnthony Fok <foka@debian.org>
Tue, 29 Jan 2019 12:38:36 +0000 (05:38 -0700)
Fixes #5635

parser/pageparser/pagelexer.go

index 5ee4fbf941b089140a9fce0e4c9a69c01beda0f9..11723f279928a01a8465b3bb0c5ec87228b1ca41 100644 (file)
@@ -223,7 +223,7 @@ func lexEmoji(l *pageLexer) stateFunc {
                        break
                }
                r, _ := utf8.DecodeRune(l.input[i:])
-               if !isAlphaNumeric(r) {
+               if !(isAlphaNumericOrHyphen(r) || r == '+') {
                        break
                }
        }