ravenq / markdown-it-vue

The vue lib for markdown-it.
MIT License
348 stars 67 forks source link

github emoji not showing and Syntax highlighting not work #14

Closed muhsalaaio closed 4 years ago

muhsalaaio commented 4 years ago

hi i have issue when using emoji and add javascript syntax on markdown-it-vue

here is my code

<markdown-it-vue class="md-body" :content="markdownText" :options="options"/>

and this is the script

<script>
import MarkdownItVue from 'markdown-it-vue';
import 'markdown-it-vue/dist/markdown-it-vue.css';
import datane from '../markdown/materi.md';

export default {
  components: {
    MarkdownItVue
  },
  data() {
    return {
      options: {
        markdownIt: {
          linkify: true,
          html: true,
        }
      }
    }
  },
  computed: {
    markdownText() {
      return datane;
    }
  }
}
</script>

but the emoji and syntax not highlighted

Emoji not showing,

should be like this:

Syntax not highlighted

should be like this

is it a bug or am i missing something?

ravenq commented 4 years ago

Thanks for you issue:

  1. There is a bug in the 'markdow-it-highlight' plugin. It not highlight the code when it not asign the lang in the token. And in the new vesion,it will detect the lang automatically. Here the commit: 990686989fa3d7a57496d8179a66fea68741f710
  2. It does work in my demo for the Emoji http://122.51.246.153/markdown

图片 It may need more infomation.

muhsalaa commented 4 years ago

I found out the red code and not working highlighting is because use of this pakcage along with vuetify

ravenq commented 4 years ago

图片

it can work.but it be affected by the global css.