Disallow numeric-only hashtags (#11363)
* Add spec covering numeric-only hashtags * Fix hashtag regex
This commit is contained in:
parent
650459f93c
commit
c37c1da41e
2 changed files with 6 additions and 2 deletions
|
@ -69,6 +69,10 @@ RSpec.describe Tag, type: :model do
|
|||
it 'does not match middle dots at the end' do
|
||||
expect(subject.match('hello #one·two·three·').to_s).to eq ' #one·two·three'
|
||||
end
|
||||
|
||||
it 'does not match purely-numeric hashtags' do
|
||||
expect(subject.match('hello #0123456')).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
describe '#to_param' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue