Open justingolden21 opened 3 years ago
@justingolden21 The markdown demo in itself is pretty limited. Having nested styles would require recursion on the Prism tokens.
Here's a demo I did: https://codesandbox.io/s/slate-0-5x-forked-75lx0?file=/src/App.tsx, notice the styles get nested.
I think I'll propose a PR to get this added.
Note: The prism tokens need to implement an inside
prop in order for this to work. The markdown library from the Prismjs website has a more complete token list.
Description Markdown (such as italics) does not apply to elements that are already headers
Recording
https://www.slatejs.org/examples/markdown-preview
Environment