I'm having trouble getting markdown rendered with pug and @nuxtjs/markdownit
. Basically I'm trying to follow the examples but can't get it to work.
lets say I have a markdown string coming from my cms content = ## Title h2\n### title h3\n\nLong text Long text Long text Long text Long text Long text Long text Long text Long text \n\n* gimme a list item\n* and one more yeehaw
Following the example I tried:
<template lang="pug">
div
div(language="md") ## Title h2\n### title h3\n\nLong text Long text Long text Long text Long text Long text Long text Long text Long text \n\n* gimme a list item\n* and one more yeehaw
div(language="md") {{ model }}
</template>
<script>
export default {
data () {
return {
model: '## Title h2\n### title h3\n\nLong text Long text Long text Long text Long text Long text Long text Long text Long text \n\n* gimme a list item\n* and one more yeehaw'
}
}
}
</script>
Which renders me the following markup:
<div>
<div language="md">## Title h2\n### title h3\n\nLong text Long text Long text Long text Long text Long text Long text Long text Long text \n\n* gimme a list item\n* and one more yeehaw
</div>
<div language="md">## Title h2
### title h3
Long text Long text Long text Long text Long text Long text Long text Long text Long text
* gimme a list item
* and one more yeehaw
</div>
</div>
What am I doing wrong?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1964">#c1964</a>)</em></sub></div>