projects
/
wix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
055780f
)
improve html escapification in \pre blocks
author
adam
<adam@megacz.com>
Thu, 10 Apr 2008 16:34:52 +0000
(09:34 -0700)
committer
adam
<adam@megacz.com>
Thu, 10 Apr 2008 16:34:52 +0000
(09:34 -0700)
darcs-hash:
20080410163452
-5007d-
3d3b87b400c14f2c0cac862b168a268ab68aab85
.gz
src/Html.lhs
patch
|
blob
|
history
diff --git
a/src/Html.lhs
b/src/Html.lhs
index
295f131
..
6fb939a
100644
(file)
--- a/
src/Html.lhs
+++ b/
src/Html.lhs
@@
-291,18
+291,18
@@
instance ToHtml Text where
instance ToHtml String where
toHtml s = concatMap htmlEscapeChar s
instance ToHtml String where
toHtml s = concatMap htmlEscapeChar s
- where
- htmlEscapeChar '<' = "<"
- htmlEscapeChar '>' = ">"
- htmlEscapeChar '&' = "&"
- htmlEscapeChar '\'' = "'"
- htmlEscapeChar '\"' = """
- htmlEscapeChar c = [c]
+
+htmlEscapeChar '<' = "<"
+htmlEscapeChar '>' = ">"
+htmlEscapeChar '&' = "&"
+htmlEscapeChar '\'' = "'"
+htmlEscapeChar '\"' = """
+htmlEscapeChar c = [c]
pre x = "\n<div class=pre>"++ (pre' x) ++ "\n</div>\n"
where
pre' (' ':b) = " "++(pre' b)
pre' ('\n':b) = "<br/>\n"++(pre' b)
pre x = "\n<div class=pre>"++ (pre' x) ++ "\n</div>\n"
where
pre' (' ':b) = " "++(pre' b)
pre' ('\n':b) = "<br/>\n"++(pre' b)
- pre' (a:b) = a:(pre' b)
+ pre' (a:b) = (htmlEscapeChar a)++(pre' b)
pre' [] = []
\end{code}
pre' [] = []
\end{code}