diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-27 07:05:11 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-27 07:05:11 +0000 |
commit | 463a0e5c3e97d389f150f9646d6a0147ea0cf570 (patch) | |
tree | b0d50a37c4ca2226e42cd39f853b31538dbea034 /src/Text/Pandoc/Writers/HTML.hs | |
parent | 59065c103f334514e1b743fec5359d9fd4833b55 (diff) | |
download | pandoc-463a0e5c3e97d389f150f9646d6a0147ea0cf570.tar.gz |
Changes to test suite for new XHTML output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 06ebf2ca1..6a1aaf18d 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -106,15 +106,14 @@ obfuscateLink opts txt src = else text' ++ " (" ++ name ++ " at " ++ domain' ++ ")" in if writerStrictMarkdown opts - then anchor ! [href $ obfuscateString src'] $ - stringToHtml $ obfuscateString text' + then anchor ! [href $ obfuscateString src'] << obfuscateString text' else (script ! [thetype "text/javascript"] $ primHtml ("\n<!--\nh='" ++ obfuscateString domain ++ "';a='" ++ at' ++ "';n='" ++ obfuscateString name ++ "';e=n+a+h;\n" ++ "document.write('<a h'+'ref'+'=\"ma'+'ilto'+':'+e+'\">'+" ++ linkText ++ "+'<\\/'+'a'+'>');\n// -->\n")) +++ - noscript (stringToHtml $ obfuscateString altText) + noscript << obfuscateString altText _ -> anchor ! [href src] $ inlineListToHtml opts txt -- malformed email -- | Obfuscate character as entity. @@ -156,7 +155,7 @@ blockToHtml opts (Note ref lst) = li ! [identifier ("fn" ++ ref)] $ contents +++ backlink blockToHtml opts (Key _ _) = noHtml blockToHtml opts (CodeBlock str) = - pre $ thecode $ stringToHtml (str ++ "\n") -- the final \n for consistency with Markdown.pl + pre $ thecode << (str ++ "\n") -- the final \n for consistency with Markdown.pl blockToHtml opts (RawHtml str) = primHtml str blockToHtml opts (BulletList lst) = let attribs = if writerIncremental opts @@ -224,7 +223,7 @@ inlineToHtml opts (Emph lst) = inlineToHtml opts (Strong lst) = strong $ inlineListToHtml opts lst inlineToHtml opts (Code str) = - thecode $ stringToHtml $ str + thecode << str inlineToHtml opts (Quoted SingleQuote lst) = primHtmlChar "lsquo" +++ inlineListToHtml opts lst +++ primHtmlChar "rsquo" inlineToHtml opts (Quoted DoubleQuote lst) = @@ -249,12 +248,12 @@ inlineToHtml opts (Link txt (Ref ref)) = ']' -- this is what markdown does, for better or worse inlineToHtml opts (Image alttext (Src source tit)) = - let alternate = renderHtml $ inlineListToHtml opts alttext in + let alternate = renderHtmlFragment $ inlineListToHtml opts alttext in image ! ([src source, title tit] ++ if null alttext then [] else [alt alternate]) -- note: null title is included, as in Markdown.pl inlineToHtml opts (Image alternate (Ref ref)) = '!' +++ inlineToHtml opts (Link alternate (Ref ref)) inlineToHtml opts (NoteRef ref) = - anchor ! [href ("#fn" ++ ref), theclass "footnoteRef", identifier ("fnref" ++ ref)] $ - sup (stringToHtml ref) + anchor ! [href ("#fn" ++ ref), theclass "footnoteRef", identifier ("fnref" ++ ref)] << + sup << ref |