diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html
index 0efea607..264dacb9 100755
--- a/lib/github/commands/rest2html
+++ b/lib/github/commands/rest2html
@@ -223,6 +223,11 @@ class GitHubHTMLTranslator(HTMLTranslator):
else:
atts[attribute] = value
+ # inside references, SVG images must not add a newline,
+ # the default suffix for starttag method
+ if node.parent.tagname == "reference":
+ atts["suffix"] = ""
+
# toss off `object` tag
self.body.pop()
# add on `img` with attributes