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
This commit is contained in:
parent
1bc585837c
commit
f2c2494b66
2 changed files with 5 additions and 5 deletions
|
@ -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 ']'
|
||||
|
|
|
@ -751,10 +751,10 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+e+'<\/'+'a'+'>');
|
|||
From “Voyage dans la Lune” by Georges Melies (1902):
|
||||
</p>
|
||||
<p>
|
||||
<img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune" />
|
||||
<img src="lalune.jpg" alt="lalune" title="Voyage dans la Lune" />
|
||||
</p>
|
||||
<p>
|
||||
Here is a movie <img src="movie.jpg" alt="movie" /> icon.
|
||||
Here is a movie <img src="movie.jpg" alt="movie" title="" /> icon.
|
||||
</p>
|
||||
<hr />
|
||||
<h1>Footnotes</h1>
|
||||
|
|
Loading…
Add table
Reference in a new issue