Fix Emojfy for certain text patterns

Fixes #2198
This commit is contained in:
Bjørn Erik Pedersen
2016-06-11 20:40:56 +02:00
parent 683888ebc8
commit 2564f46a68
2 changed files with 11 additions and 6 deletions

View File

@@ -44,7 +44,15 @@ func TestEmojiCustom(t *testing.T) {
{" The motto: no smiles! ", []byte(" The motto: no smiles! ")},
{":hugo_is_the_best_static_gen:", []byte(":hugo_is_the_best_static_gen:")},
{"은행 :smile: 은행", []byte("은행 😄 은행")},
// #2198
{"See: A :beer:!", []byte("See: A 🍺!")},
{`Aaaaaaaaaa: aaaaaaaaaa aaaaaaaaaa aaaaaaaaaa.
:beer:`, []byte(`Aaaaaaaaaa: aaaaaaaaaa aaaaaaaaaa aaaaaaaaaa.
🍺`)},
} {
result := Emojify([]byte(this.input))
if !reflect.DeepEqual(result, this.expect) {