From f2c2494b66e3577c43e910ea19152d7d4d1c2f49 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 7 Jan 2007 01:06:34 +0000 Subject: Modified HTML output for Image elements, to conform to Markdown.pl: + title attribute comes after alt attribute + title is included even if null git-svn-id: https://pandoc.googlecode.com/svn/trunk@445 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/HTML.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 4c869ac21..e119a5c87 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -230,9 +230,9 @@ inlineToHtml opts (Link txt (Ref ref)) = inlineToHtml opts (Image alt (Src source tit)) = let title = stringToSGML tit alternate = render $ inlineListToHtml opts alt in - selfClosingTag "img" $ [("src", source)] ++ - (if null tit then [] else [("title", title)]) ++ - (if null alternate then [] else [("alt", alternate)]) + selfClosingTag "img" $ [("src", source)] ++ + (if null alternate then [] else [("alt", alternate)]) ++ + [("title", title)] -- note: null title is included, as in Markdown.pl inlineToHtml opts (Image alternate (Ref ref)) = text "![" <> (inlineListToHtml opts alternate) <> text "][" <> (inlineListToHtml opts ref) <> char ']' -- cgit v1.2.3