gernest / mention

Twitter like mentions and #hashtags parser for Go(Golang)
MIT License
107 stars 14 forks source link

Using apostrophe #18

Closed kfreiman closed 6 years ago

kfreiman commented 6 years ago

Right side after apostrophe should't be a part of hashtag. In case of @bob's cookies only @bob is tag.

arp242 commented 6 years ago

Does it not work if you add it to the terminator list?

mention.GetTags('@', v.src, '\'')

Maybe it might be useful to export a CommonEndTags or TwitterEndTags or some such>

We currently use this, which has been working well for us:

var endChars = []rune{'!', '#', '$', '%', '&', '*', '(', ')', '+', '=', '<',
    '>', '?', '/', ':', ';', '\'', '"', ',', '-', '.'}
kfreiman commented 6 years ago

@Carpetsmoker thanks, it works. I didn't see this option(