diff --git a/src/nbsphinx.py b/src/nbsphinx.py
index 5837da32..d644c97e 100644
--- a/src/nbsphinx.py
+++ b/src/nbsphinx.py
@@ -2323,21 +2323,15 @@ def depart_admonition_text(self, node):
def depart_gallery_html(self, node):
+ self.body.append('
\n')
for title, uri, filename, tooltip in node['entries']:
if tooltip:
tooltip = ' tooltip="{}"'.format(html.escape(tooltip))
self.body.append("""\
""".format(
uri=html.escape(uri),
@@ -2345,7 +2339,7 @@ def depart_gallery_html(self, node):
tooltip=tooltip,
filename=html.escape(filename),
))
- self.body.append('
')
+ self.body.append('
\n')
def do_nothing(self, node):