Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

div formatting with to_html() + full_html=False #2469

Merged
merged 3 commits into from
Sep 3, 2020

Conversation

tallamjr
Copy link
Contributor

@tallamjr tallamjr commented May 14, 2020

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.

The inclusion of newlines "\n" as well as the plot id tag being referenced by single quotes
instead of double quotes results in the following output of a figure:

This has been resolved by ensuring now newline characters are included in the formatted string for
and base_url_line now encapsulates plotly_platform_url in double quotes.

This has been tested in a markdown setting:

Before:
image

After:
image

Fixes #2468

Example without .strip():

    '    <div> ...

Example with .strip()':

    '<div> ...

	modified:   _html.py
@jonmmease
Copy link
Contributor

Looks fine to me. Thanks @tallamjr!

@jonmmease jonmmease merged commit e8b862b into plotly:master Sep 3, 2020
@tallamjr
Copy link
Contributor Author

Thank you @jonmmease 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.to_html() method produces incorrectly formatted <div> element string for full_html=False option
2 participants