fixes #6609; 'if' expressions support multiple statements; minor breaking change

This commit is contained in:
Araq 2017-11-05 01:25:39 +01:00
commit 742f43e572
5 changed files with 91 additions and 17 deletions

View file

@ -798,7 +798,8 @@ proc renderImage(d: PDoc, n: PRstNode, result: var string) =
if arg.valid:
let htmlOut = if isObject:
"<object data=\"$1\" type=\"image/svg+xml\"$2 >" & content & "</object>"
else: "<img src=\"$1\"$2 />"
else:
"<img src=\"$1\"$2 />"
dispA(d.target, result, htmlOut, "\\includegraphics$2{$1}",
[arg, options])
if len(n) >= 3: renderRstToOut(d, n.sons[2], result)