Codepen breaks when I save but works when I edit (Markdown Previewer Project)

Hey there, having some issues with the Markdown Previewer project. Now I’ve gotten it to run for 7/8 checks but I’ve run into this weird issue where it generally works when I edit it and it gets reprocessed, but when I save, exit and come back or just switch to full page view, the app just breaks.

After saving:

Link to Codepen here:

It’s still a little messy sorry. I suspect that it has to do with the way I’m setting the initial state with a giant string for the default markup, I tried moving it into componentDidMount but that solved nothing. Other thing is that the marked library I’m importing could be breaking in some way? I dunno, I’m trying lots of things but nothing seems to help. Any suggestions or clues as to what I can do here? Any help appreciated!

Just posting here to show it does work when I edit:

I found it! There in the markdown section you can see I use as an examply but I think the transpiler is interpreting that as code. I deleted it, replaced it with a

tag as an example, works now!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.