Skip to content

Commit

Permalink
Merge pull request #160 from highcharts-for-python/bugfix/159-sharedo…
Browse files Browse the repository at this point in the history
…ptions-serializing-to-improper-js-literal

Implemented bugfix for SharedOptions serialization in Jupyter context. Closes #159
  • Loading branch information
hcpchris authored Apr 6, 2024
2 parents 83c5d03 + 9cf03ce commit 0c54a2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion highcharts_core/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ def prep_js_for_jupyter(js_str,
"""document.addEventListener('DOMContentLoaded', function() {""", '')
js_str = js_str.replace('renderTo = ', '')
js_str = js_str.replace(',\noptions = ', ',\n')
js_str = js_str[:-3]
if '.setOptions(' not in js_str:
js_str = js_str[:-3]

Check warning on line 531 in highcharts_core/utility_functions.py

View check run for this annotation

Codecov / codecov/patch

highcharts_core/utility_functions.py#L531

Added line #L531 was not covered by tests

if random_slug:
function_str = f"""function insertChart_{random_slug}() """
Expand Down

0 comments on commit 0c54a2f

Please sign in to comment.