@@ -353,23 +353,19 @@ showDependencies :: [Dependency] -> Html
353
353
showDependencies deps = commaList (map showDependency deps)
354
354
355
355
showDependency :: Dependency -> Html
356
- showDependency (Dependency (unPackageName -> pname) vs) = showPkg +++ vsHtml
356
+ showDependency (Dependency (unPackageName -> pname) vs) = nonbreakingSpan << ( showPkg +++ vsHtml)
357
357
where vsHtml = if vs == anyVersion then noHtml
358
- else nonbreakingHtml (" (" ++ display vs ++ " )" )
358
+ else toHtml (" (" ++ display vs ++ " )" )
359
359
-- mb_vers links to latest version in range. This is a bit computationally
360
360
-- expensive, not cache-friendly, and perhaps unexpected in some cases
361
361
{- mb_vers = maybeLast $ filter (`withinRange` vs) $ map packageVersion $
362
362
PackageIndex.lookupPackageName vmap (PackageName pname)-}
363
363
-- nonetheless, we should ensure that the package exists /before/
364
364
-- passing along the PackageRender, which is not the case here
365
- showPkg = anchor ! [href . packageURL $ PackageIdentifier (mkPackageName pname) nullVersion] << nonbreakingHtml pname
366
-
367
- nonbreakingHtml :: String -> Html
368
- nonbreakingHtml = primHtml . concatMap htmlizeChar2 . stringToHtmlString
369
- where
370
- htmlizeChar2 ' ' = " "
371
- htmlizeChar2 ' -' = " ‑"
372
- htmlizeChar2 c = [c]
365
+ showPkg = anchor ! [href . packageURL $ PackageIdentifier (mkPackageName pname) nullVersion] << pname
366
+
367
+ nonbreakingSpan :: Html -> Html
368
+ nonbreakingSpan str = thespan ! [thestyle " white-space: nowrap" ] << str
373
369
374
370
renderDetailedDependencies :: PackageRender -> Html
375
371
renderDetailedDependencies pkgRender =
0 commit comments