Closed ckpearson closed 6 months ago
This may actually be down to the markdown receiving weird additional \
characters at newlines from a multiline literal string. I've since tested it by importing from a markdown file directly as a string and it behaves as expected.
Was able to diagnose this by using the source viewer mode.
I would expect the plugin to skip over directives it cannot handle and for the editor to then render any following content
That's not how the directives plugin (and the Editor in general) works. It would silently destroy content if it skips unknown constructs. If you expect such content, you can create a catch-all directive descriptor that does some basic rendering but preserves the structure.
Up to your example, one possible problem I see is the indent in the multiline string. However, I doubt that this would work without the catch all descriptor.
Describe the bug When adding the directives plugin ANY directive encountered causes content following it to not render
Reproduction Minimal repro here: https://codesandbox.io/p/sandbox/mdx-editor-base-forked-3k4wff
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the plugin to skip over directives it cannot handle and for the editor to then render any following content
Desktop (please complete the following information):