vue-markdown
vue-markdown copied to clipboard
vue-markdown is not rendering
I have the same issue as https://github.com/miaolz123/vue-markdown/issues/6.
"vue": "^2.4.2",
"vue-markdown": "^2.2.4"
My vue-file:
<template>
<vue-markdown>
I am a ~~tast~~ **test**.
</vue-markdown>
</template>
<script>
import VueMarkdown from 'vue-markdown'
export default {
components: { VueMarkdown }
}
</script>
The output is just:
<div><pre><code>I am a ~~tast~~ **test**.
</code></pre>
</div>
I just followed the README.
Am I doing something wrong?
I am looking at the same problem. I will let you know if I come up with anything.
I had this issue too. My fix was to use the source attribute. So, instead of
<vue-markdown>
{{someVariable}}
</vue-markdown>
I had to do
<vue-markdown :source='someVariable'></vue-markdown>
@Ratismal thank you! It works! :tada:
plus 1, don't render at all
I noticed that the content inside
<vue-markdown>
## This needs to start from the left
</vue-markdown>
@Ratismal 's solution work for me, 2018-6-18
and because I am using Pug, this work:
vue-markdown(:source='markdown')
Full Code:
<template lang='pug'>
div
vue-markdown(:source='markdown')
</template>
I noticed that the content inside can't be nested and needs to start from the left
<vue-markdown> ## This needs to start from the left </vue-markdown>
I guess this is just a result of the markdown rule that indented text is treated as code