Parsing Markdown in Vue

Today I learned how to use marked.js to parse markdown an render html in a Vue app. Long story short, I tried a few ways to use it directly in a component using the library’s marked() method, but this didn’t work exactly as expected.

I found the method in this video tutorial to be just the ticket. Instead of repeating the marked() function each time I had some markdown to render (which didn’t work consistently anyway), I created a markdown-parsing component.

The video is a great explanation, and here is the related repo showing the markdown-parsing component, as well as how to include syntax highlighting.