mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
Markdown writer: Don't print title attribute if title is empty.
(This differs from the behavior of Markdown.pl, and agrees with PHP Markdown. But John Gruber has indicated that he prefers this behavior.) Adjusted test suite accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1026 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
@@ -407,7 +407,10 @@ inlineToHtml opts inline =
|
||||
(Image txt (source,tit)) -> do
|
||||
alternate <- inlineListToHtml opts txt
|
||||
let alternate' = renderHtmlFragment alternate
|
||||
let attributes = [src source, title tit] ++
|
||||
let attributes = [src source] ++
|
||||
(if null tit
|
||||
then []
|
||||
else [title tit]) ++
|
||||
if null txt
|
||||
then []
|
||||
else [alt alternate']
|
||||
|
||||
+1
-1
@@ -1033,7 +1033,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
|
||||
><img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune"
|
||||
/></p
|
||||
><p
|
||||
>Here is a movie <img src="movie.jpg" title="" alt="movie"
|
||||
>Here is a movie <img src="movie.jpg" alt="movie"
|
||||
/> icon.</p
|
||||
><hr
|
||||
/><h1 id="footnotes"
|
||||
|
||||
Reference in New Issue
Block a user