projects
/
wix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6df648a
)
use urlify more in Html.lhs
author
adam
<adam@megacz.com>
Wed, 28 Jan 2009 22:05:25 +0000
(14:05 -0800)
committer
adam
<adam@megacz.com>
Wed, 28 Jan 2009 22:05:25 +0000
(14:05 -0800)
darcs-hash:
20090128220525
-5007d-
540d2b934f027352c0ed4e5477ef70ed96acc509
.gz
src/Html.lhs
patch
|
blob
|
history
diff --git
a/src/Html.lhs
b/src/Html.lhs
index
5784cb5
..
a3ff54f
100644
(file)
--- a/
src/Html.lhs
+++ b/
src/Html.lhs
@@
-183,8
+183,9
@@
instance ToHtml Paragraph where
toHtml (P t) = stag "p" $ toHtml t
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
where
+ urlify = toHtml
icon = if ".pdf" `isSuffixOf` ref then "<img "++img++" src='"++pdfIconBase64++"'> "
else if "mailto:" `isPrefixOf` ref then "<img "++img++" src='"++emailIconBase64++"'> "
else ""
icon = if ".pdf" `isSuffixOf` ref then "<img "++img++" src='"++pdfIconBase64++"'> "
else if "mailto:" `isPrefixOf` ref then "<img "++img++" src='"++emailIconBase64++"'> "
else ""