Skip to content

Commit 2928d89

Browse files
committed
Fix #273
1 parent 06df1a2 commit 2928d89

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

folium/element.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,20 +306,21 @@ def _repr_html_(self, **kwargs):
306306
307307
Parameters
308308
----------
309+
309310
"""
310311
html = self.render(**kwargs)
311312
html = "data:text/html;base64," + base64.b64encode(html.encode('utf8')).decode('utf8') # noqa
312313

313314
if self.height is None:
314-
iframe = ("""
315+
iframe = """
315316
<div style="width:{width};">
316317
<div style="position:relative;width:100%;height:0;padding-bottom:{ratio};">
317318
<iframe src="{html}" style="position:absolute;width:100%;height:100%;left:0;top:0;">
318319
</iframe>
319-
</div></div>""") # noqa
320-
iframe.format(html=html,
321-
width=self.width,
322-
ratio=self.ratio)
320+
</div></div>""".format # noqa
321+
iframe = iframe(html=html,
322+
width=self.width,
323+
ratio=self.ratio)
323324
else:
324325
iframe = ('<iframe src="{html}" width="{width}" '
325326
'height="{height}"></iframe>').format

0 commit comments

Comments
 (0)