about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-13 16:01:26 +0200
committerGitHub <noreply@github.com>2019-09-13 16:01:26 +0200
commit0762258aec68f1d422a0ecdc29d637c5807f943a (patch)
tree6c084bae4eb476959b3f5a4ffff375471eb0a358 /spec
parent59da5ccb8e9e06e0c91ebd548e899786c632f1de (diff)
Fix hashtags being split by ZWNJ character (#11821)
Fix #11761
Diffstat (limited to 'spec')
-rw-r--r--spec/models/tag_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb
index 2bb30fb57..df876593c 100644
--- a/spec/models/tag_spec.rb
+++ b/spec/models/tag_spec.rb
@@ -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