-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: ui.markdown component #903
Conversation
wusteven815
commented
Sep 23, 2024
•
edited
Loading
edited
- Adds ui.markdown widget #890
- Update Jest transform (similar to feat: add LaTeX to Markdown web-client-ui#1734 (comment))
Would we expect it to accept common props as well? |
For reference: https://docs.streamlit.io/develop/api-reference/text/st.markdown#stmarkdown Streamlit exposes unsafe_allow_html to turn off escaping. Also supports emoji shortcodes which is just neat. Probably not something we need to do, but neat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code blocks aren't rendering properly. You'll need to pass in a component for rendering code blocks, like we do in our MarkdownEditor component.
ReactMarkdown shows an example of this in their page as well (side note, I didn't know you could use tildes to mark code blocks as well, thought it was just backticks).
Example that doesn't look right:
from deephaven import ui
md = ui.markdown("""
# Code block example
```python
from deephaven import empty_table
t = empty_table(1000).update("x=i")
```
""")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Add doc page.
28e370a
to
fbea65d
Compare
9fa0fd8
to
9bd90ad
Compare
Co-authored-by: margaretkennedy <[email protected]>
This reverts commit 0d1eea8.