You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would really like to be able to easily use Markdown in Panel because it's so easy to write content with text, images and code and get a beautiful looking pages back.
But in Panel there are some pains to using Markdown. One pain is that indentation of markdown text is not supported.
When I write a longer markdown text in a python file in my editor (VS Code), then the default "python indentation" is not handled by pn.pane.Markdown. It's easist to understand from the code and images below.
I would like a solution where indented text is rendered nicely. For example by removing leading spaces/ tabs from the text.
A solution like this would lower the friction to using Panel.
Streamlit does this.
The code is here
importpanelaspndefmain():
text_error=""" This is not formatted correctly by Markdown due to the indentation!"""text_ok="""This is formatted correctly by Markdown!"""app=pn.Column(
pn.pane.Markdown(text_error),
pn.pane.HTML("<hr>", sizing_mode="stretch_width"),
pn.pane.Markdown(text_ok),
)
app.servable()
main()
The text was updated successfully, but these errors were encountered:
I would really like to be able to easily use Markdown in Panel because it's so easy to write content with text, images and code and get a beautiful looking pages back.
But in Panel there are some pains to using Markdown. One pain is that indentation of markdown text is not supported.
When I write a longer markdown text in a python file in my editor (VS Code), then the default "python indentation" is not handled by pn.pane.Markdown. It's easist to understand from the code and images below.
I would like a solution where indented text is rendered nicely. For example by removing leading spaces/ tabs from the text.
A solution like this would lower the friction to using Panel.
Streamlit does this.
The code is here
The text was updated successfully, but these errors were encountered: