From 0762258aec68f1d422a0ecdc29d637c5807f943a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 13 Sep 2019 16:01:26 +0200 Subject: Fix hashtags being split by ZWNJ character (#11821) Fix #11761 --- spec/models/tag_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec') 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 -- cgit