add \Box
[wix.git] / src / Html.lhs
index 74259f7..a3ff54f 100644 (file)
@@ -183,8 +183,9 @@ instance ToHtml Paragraph where
  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++"'>&nbsp;"
          else if "mailto:" `isPrefixOf` ref then "<img "++img++" src='"++emailIconBase64++"'>&nbsp;"
          else ""
@@ -274,7 +275,7 @@ instance ToHtml Text where
  toHtml (GlyphText TradeMark)     = "&#8482;"
  toHtml (GlyphText ServiceMark)   = "&#8482;"
  toHtml (GlyphText Emdash)        = "&mdash;"
- toHtml (GlyphText Ellipsis)      = "&#0133;"
+ toHtml (GlyphText Ellipsis)      = "&#0133;"  -- &cdots;?
  toHtml (GlyphText Cent)          = "&#189;"
  toHtml (GlyphText Daggar)        = "&#8224;"
  toHtml (GlyphText DoubleDaggar)  = "&#8225;"
@@ -284,7 +285,8 @@ instance ToHtml Text where
  toHtml (GlyphText Sharp)         = "&#8920;"
  toHtml (GlyphText CheckMark)     = "&#10003;"
  toHtml (GlyphText XMark)         = "&#10007;"
- toHtml (GlyphText LeftArrow)            = "&#;"  -- FIXME
+ toHtml (GlyphText LeftArrow)            = "&larr;"
+ toHtml (GlyphText RightArrow)           = "&rarr;"
  toHtml (GlyphText DoubleLeftArrow)      = "&#;"  -- FIXME
  toHtml (GlyphText DoubleRightArrow)     = "&#;"  -- FIXME
  toHtml (GlyphText DoubleLeftRightArrow) = "&#;"  -- FIXME
@@ -312,7 +314,7 @@ htmlEscapeChar '\'' = "&apos;"
 htmlEscapeChar '\"' = "&quot;"
 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)         = "&nbsp;"++(pre' b)
   pre' ('\n':b)        = "<br/>\n"++(pre' b)