Skip to content

Commit

Permalink
Fix "(deprecated in favor of )" appearing in search results
Browse files Browse the repository at this point in the history
This could occur if the package is marked deprecated without any
reference to alternative packages.
  • Loading branch information
hvr committed Sep 3, 2017
1 parent 537fbbe commit 535a2ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Distribution/Server/Features/Html/HtmlUtilities.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ htmlUtilities CoreFeature{coreResource}
renderUser user = anchor ! [href $ userPageUri userResource "" user] << display user
itemNameHtml = packageNameLink (itemName item) +++
case itemDeprecated item of
Just [] -> toHtml " (deprecated)"
Just pkgs -> " (deprecated in favor of " +++ intersperse (toHtml ", ") (map packageNameLink pkgs) +++ ")"
Nothing -> toHtml ""

Expand Down

0 comments on commit 535a2ca

Please sign in to comment.