mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
Merge pull request #51 from danneu/slug-patch
Strip leading and trailing slug punctuation.
This commit is contained in:
@ -27,6 +27,13 @@ describe Slug do
|
||||
Slug.for("a....b.....c").should == "a-b-c"
|
||||
end
|
||||
|
||||
it 'strips trailing punctuation' do
|
||||
Slug.for("hello...").should == "hello"
|
||||
end
|
||||
|
||||
it 'strips leading punctuation' do
|
||||
Slug.for("...hello").should == "hello"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user