From 79086341f19242bd437b6c2b6d8bb7b17addd554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Wed, 15 Jul 2020 18:08:57 +0200 Subject: [PATCH 1/2] Remove newline inside SVG image references --- lib/github/commands/rest2html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html index 0efea607..8bc17dd2 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 (see https://git.io/JJsh3) + if node.parent.tagname == "reference": + atts["suffix"] = "" + # toss off `object` tag self.body.pop() # add on `img` with attributes From 5f5b1c3f2898c7040438d65335302cc050351e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Fri, 17 Jul 2020 04:23:13 +0200 Subject: [PATCH 2/2] Keep comment with same style --- lib/github/commands/rest2html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html index 8bc17dd2..264dacb9 100755 --- a/lib/github/commands/rest2html +++ b/lib/github/commands/rest2html @@ -223,8 +223,8 @@ class GitHubHTMLTranslator(HTMLTranslator): else: atts[attribute] = value - # Inside references, SVG images must not add a newline, - # the default suffix for starttag method (see https://git.io/JJsh3) + # inside references, SVG images must not add a newline, + # the default suffix for starttag method if node.parent.tagname == "reference": atts["suffix"] = ""