make anchor tagger strip trailing punctuation from link text before matching

staging
multiple creatures 2019-07-20 23:25:40 -05:00
parent c4600411f7
commit 1cf4d5a83d
1 changed files with 2 additions and 2 deletions

View File

@ -74,8 +74,8 @@ class Sanitize
return
end
# strip trailing slashes
text.sub!(/\/+\Z/, '')
# strip trailing punctuation
text.sub!(/\p{Punct}+\Z/, '')
# href starts with link text?
return if href.start_with?(text)