We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since termIndexes is a []int and some "raw" byte indexes are accessed (e.g. str[t 1] == byte(prefix)), multibyte prefixes won't work. This:
termIndexes
[]int
str[t 1] == byte(prefix)
mention.GetTags('🔥', "I'm on 🔥fire!")
Should match fire, but doesn't match anything.
fire
Failing test case:
diff --git i/mention_test.go w/mention_test.go index 423ed9b..904af66 100644 --- i/mention_test.go w/mention_test.go @@ -139,6 139,9 @@ func (s *MentionSuite) TestGetTags(c *C) { // use default terminators c.Assert(GetTags('@', "hello @test"), DeepEquals, []Tag{{'@', "test", 6}}) // Test multibyte start characters. c.Assert(GetTags('🔥', "I'm on 🔥fire!"), DeepEquals, []Tag{{'🔥', "fire", 6}}) } func BenchmarkGetTags(b *testing.B) {
The text was updated successfully, but these errors were encountered:
I'm a bit busy , if you don't mind you can help with implementation. I will check this out when I get a chance.
Sorry, something went wrong.
No branches or pull requests
Since
termIndexes
is a[]int
and some "raw" byte indexes are accessed (e.g.str[t 1] == byte(prefix)
), multibyte prefixes won't work. This:Should match
fire
, but doesn't match anything.Failing test case:
The text was updated successfully, but these errors were encountered: