Skip to content

Commit 91e269f

Browse files
fix tests
1 parent 682424f commit 91e269f

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

Diff for: packages/python/plotly/plotly/io/_html.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,18 @@ def to_html(
340340
)
341341

342342
plotly_html_div = """\
343-
<div>\
344-
{mathjax_script}\
345-
{load_plotlyjs}\
346-
<div id="{id}" class="plotly-graph-div" \
347-
style="height:{height}; width:{width};">\
348-
</div>\
349-
<script type="text/javascript">\
350-
{require_start}window.PLOTLYENV=window.PLOTLYENV || {{}};{base_url_line}{script};{require_end}\
351-
</script>\
352-
</div>\
353-
""".format(
343+
<div>\
344+
{mathjax_script}\
345+
{load_plotlyjs}\
346+
<div id="{id}" class="plotly-graph-div" \
347+
style="height:{height}; width:{width};"></div>\
348+
<script type="text/javascript">\
349+
{require_start}\
350+
window.PLOTLYENV=window.PLOTLYENV || {{}};{base_url_line}\
351+
{script};\
352+
{require_end}\
353+
</script>\
354+
</div>""".format(
354355
mathjax_script=mathjax_script,
355356
load_plotlyjs=load_plotlyjs,
356357
id=plotdivid,

Diff for: packages/python/plotly/plotly/tests/test_io/test_renderers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ def test_repr_html(renderer):
305305
id_pattern = "cd462b94-79ce-42a2-887f-2650a761a144"
306306
template = (
307307
'<div> <script type="text/javascript">'
308-
"window.PlotlyConfig = {MathJaxConfig: 'local'};</script> "
308+
"window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n "
309309
'<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> '
310310
'<div id="cd462b94-79ce-42a2-887f-2650a761a144" class="plotly-graph-div" '
311311
'style="height:100%; width:100%;"></div> <script type="text/javascript">'
312312
" window.PLOTLYENV=window.PLOTLYENV || {};"
313313
' if (document.getElementById("cd462b94-79ce-42a2-887f-2650a761a144"))'
314-
" { Plotly.newPlot( 'cd462b94-79ce-42a2-887f-2650a761a144',"
314+
' { Plotly.newPlot( "cd462b94-79ce-42a2-887f-2650a761a144",'
315315
' [], {"template": {}},'
316316
' {"responsive": true} ) };'
317317
" </script> </div>"

0 commit comments

Comments
 (0)