Bladeren bron

Fix mangling of ##tag matches (#2194) (#2247)

This commit fixes hashtag_html so it correctly handles matches with multiple hash-signs.

Bug located by @over9001, initial fix suggested by @nightpool.
master
Mingye Wang 7 jaren geleden
committed by Eugen
bovenliggende
commit
5c9aa2b732
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. +1
    -1
      app/lib/formatter.rb

+ 1
- 1
app/lib/formatter.rb Bestand weergeven

@@ -109,7 +109,7 @@ class Formatter
end

def hashtag_html(match)
prefix, affix = match.split('#')
prefix, _, affix = match.rpartition('#')
"#{prefix}<a href=\"#{tag_url(affix.downcase)}\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
end



Laden…
Annuleren
Opslaan