0
0
Fork 0

Fix hashtags being split by ZWNJ character (#11821)

Fix #11761
This commit is contained in:
Eugen Rochko 2019-09-13 16:01:26 +02:00 committed by GitHub
parent 59da5ccb8e
commit 0762258aec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -62,6 +62,10 @@ RSpec.describe Tag, type: :model do
expect(subject.match('hello #one·two·three').to_s).to eq ' #one·two·three'
end
it 'matches ZWNJ' do
expect(subject.match('just add #نرم‌افزار and').to_s).to eq ' #نرم‌افزار'
end
it 'does not match middle dots at the start' do
expect(subject.match('hello #·one·two·three')).to be_nil
end