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
The example from https://github.com/widgetti/reacton#markdown-component-example does not work with myst_parser>=0.18 since the to_html function has been removed from the python api (see https://github.com/executablebooks/MyST-Parser/blob/28725fceb8e1e117cb247b06a267f82c501ce527/CHANGELOG.md#breaking-changes)
myst_parser>=0.18
to_html
One solution:
@reacton.component def Markdown(md: str): from markdown_it.renderer import RendererHTML from myst_parser.config.main import MdParserConfig from myst_parser.parsers.mdit import create_md_parser md_parser = create_md_parser(MdParserConfig(), RendererHTML) html = md_parser.render(md) return w.HTML(value=html)
BR, Alex
The text was updated successfully, but these errors were encountered:
f07c9f5
docs: fix markdown example, Fixes #3
30a181e
af8b6e0
(FYI, sorry for the late reply, just noticed I didn't get GH notifications from the repo)
I just fixed this in af8b6e0 , and also included a Markdown example at:
Markdown example live with Jupyter lite
The example from https://github.com/widgetti/reacton#markdown-component-example does not work with
myst_parser>=0.18
since theto_html
function has been removed from the python api (see https://github.com/executablebooks/MyST-Parser/blob/28725fceb8e1e117cb247b06a267f82c501ce527/CHANGELOG.md#breaking-changes)One solution:
BR, Alex
The text was updated successfully, but these errors were encountered: