make anchor tagger strip trailing punctuation from link text before matching
parent
c4600411f7
commit
1cf4d5a83d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue