From 463a0e5c3e97d389f150f9646d6a0147ea0cf570 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 27 Feb 2007 07:05:11 +0000 Subject: Changes to test suite for new XHTML output. git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/HTML.hs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/Text/Pandoc/Writers/HTML.hs') 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\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 -- cgit v1.2.3