You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have separate components. One for creating new markdown and another for viewing saved markdowns on a separate page.
This is in a nextjs app but I don't think it's a next problem.
If I use rehypePrism it works. If I use rehypeSanitize it works. But if I use them both, then the prism classes don't get added to the output.
I worked around it in my viewer component by sanitizing the data before feeding it to the viewer but would rather not have to work around it like this and don't know how to do the same with the editor
Is there an option to tell the editor which order to run the plugins in so it can run through sanitize and then through prism? Any ideas why prism isn't processing if I try to use both plugins?
Thanks
The text was updated successfully, but these errors were encountered:
So if I put them in order this way in the editor, it is working but with a little bit of delay. I guess that's expected because of all that processing for every key typed. Order is important. If I place rehypeSanitize first then rehypePrism doesn't work.
But the same doesn't work in my MarkDownViewer component. rehypePrizm first means no sanitizing. It seems like a race condition like plugins should be ran in order and async before anything is output to the viewer.
I have separate components. One for creating new markdown and another for viewing saved markdowns on a separate page.
This is in a nextjs app but I don't think it's a next problem.
If I use rehypePrism it works. If I use rehypeSanitize it works. But if I use them both, then the prism classes don't get added to the output.
I worked around it in my viewer component by sanitizing the data before feeding it to the viewer but would rather not have to work around it like this and don't know how to do the same with the editor
MarkDownEditor.tsx
MarkDownViewer.tsx
Is there an option to tell the editor which order to run the plugins in so it can run through sanitize and then through prism? Any ideas why prism isn't processing if I try to use both plugins?
Thanks
The text was updated successfully, but these errors were encountered: