-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Add client-side rendering option for Markdown pane based on MyST #7149
base: main
Are you sure you want to change the base?
Conversation
Okay, I only just realized mystjs uses an ancient version of myst 😢 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7149 +/- ##
==========================================
- Coverage 82.21% 82.17% -0.04%
==========================================
Files 327 328 +1
Lines 48974 49001 +27
==========================================
+ Hits 40264 40269 +5
- Misses 8710 8732 +22 ☔ View full report in Codecov by Sentry. |
Its a great beginning. A lot of Markdown is probably pretty simple and supported by the ancient version. We can add a comment or request for an update at the mystjs github. |
Also remember to think about if plugins are a thing for mystjs and whether we support it. |
Okay, figured it out, this now uses latest myst-parser and myst-to-html + highlight.js for syntax highlighting. Works great, still some alignment on code styling needed but overall I'm quite happy. |
Tested with the streaming support and as expected it does zero backtracking now, i.e. it only ever sends the newly added snippets rather than having to go back and modify the previous text. |
Yes, but not really. It's a pretty opinionated Markdown implementation with lots of features supported out-of-the-box. |
Have you tested in different templates whether it looks ok? |
This PR adds a new client-side rendering option to the
Markdown
pane. Specifically you can now setrenderer='mystjs'
and the Markdown will be transformed into HTML clientside, which has number of benefits:Markdown
value can be jslinked with e.g. an editor, without requiring a roundtrip to Python