aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Utils/Xhtml.hs
blob: 41839aeb27536069703f3d006dd2ddbb229d3233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Utils.Xhtml ( niceDashes
                   , uC) where

import Text.XHtml

-- Very simple atm.  Not easily extended to handle emdashes too.

niceDashes      :: String -> String
niceDashes []   = []
niceDashes (x:xs)
    | x == '-'  = "–" ++ niceDashes xs
    | otherwise = x : niceDashes xs

uC   :: Char -> Html
uC c = thespan ! [strAttr "style" "text-decoration: underline;"] << [c]