toHtml (P t) = stag "p" $ toHtml t
-link ref body = "<a href='"++ref++"'>"++icon++body++"</a>"
+link ref body = "<a href='"++(urlify ref)++"'>"++icon++body++"</a>"
where
+ urlify = toHtml
icon = if ".pdf" `isSuffixOf` ref then "<img "++img++" src='"++pdfIconBase64++"'> "
else if "mailto:" `isPrefixOf` ref then "<img "++img++" src='"++emailIconBase64++"'> "
else ""
toHtml (GlyphText TradeMark) = "™"
toHtml (GlyphText ServiceMark) = "™"
toHtml (GlyphText Emdash) = "—"
- toHtml (GlyphText Ellipsis) = "…"
+ toHtml (GlyphText Ellipsis) = "…" -- &cdots;?
toHtml (GlyphText Cent) = "½"
toHtml (GlyphText Daggar) = "†"
toHtml (GlyphText DoubleDaggar) = "‡"
toHtml (GlyphText Sharp) = "⋘"
toHtml (GlyphText CheckMark) = "✓"
toHtml (GlyphText XMark) = "✗"
- toHtml (GlyphText LeftArrow) = "&#;" -- FIXME
+ toHtml (GlyphText LeftArrow) = "←"
+ toHtml (GlyphText RightArrow) = "→"
toHtml (GlyphText DoubleLeftArrow) = "&#;" -- FIXME
toHtml (GlyphText DoubleRightArrow) = "&#;" -- FIXME
toHtml (GlyphText DoubleLeftRightArrow) = "&#;" -- FIXME
htmlEscapeChar '\"' = """
htmlEscapeChar c = [c]
-pre x = "\n<div class=pre>"++ (pre' x) ++ "\n</div>\n"
+pre x = "\n<div class=pre style='white-space:nowrap'>"++ (pre' x) ++ "\n</div>\n"
where
pre' (' ':b) = " "++(pre' b)
pre' ('\n':b) = "<br/>\n"++(pre' b)