vue-markdown icon indicating copy to clipboard operation
vue-markdown copied to clipboard

vue-markdown is not rendering

Open blackst0ne opened this issue 8 years ago • 7 comments
trafficstars

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?

blackst0ne avatar Sep 13 '17 00:09 blackst0ne

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

willmitchell avatar Sep 19 '17 20:09 willmitchell

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 avatar Oct 04 '17 16:10 Ratismal

@Ratismal thank you! It works! :tada:

blackst0ne avatar Oct 06 '17 05:10 blackst0ne

plus 1, don't render at all

DanielWLam avatar Oct 10 '17 11:10 DanielWLam

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>

ispal avatar Oct 13 '17 18:10 ispal

@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>

1c7 avatar Jun 18 '18 13:06 1c7

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

mkamensky avatar Feb 08 '20 10:02 mkamensky