miaolz123 / vue-markdown

A Powerful and Highspeed Markdown Parser for Vue
https://miaolz123.github.io/vue-markdown/
MIT License
1.91k stars 258 forks source link

vue-markdown is not rendering #43

Open blackst0ne opened 7 years ago

blackst0ne commented 7 years ago

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?

willmitchell commented 7 years ago

I am looking at the same problem. I will let you know if I come up with anything.

Ratismal commented 7 years ago

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>
blackst0ne commented 6 years ago

@Ratismal thank you! It works! :tada:

DanielWLam commented 6 years ago

plus 1, don't render at all

ispal commented 6 years ago

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>
1c7 commented 6 years ago

@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>
mkamensky commented 4 years ago

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