vue-styleguidist / vuepress-plugin-live

Make your markdown code examples come alive
http://vuepress-live.surge.sh/
MIT License
38 stars 7 forks source link

vuepress prism syntax-highlight is broken after vue-live component is loaded #47

Closed tlyau62 closed 3 years ago

tlyau62 commented 3 years ago

Before vue-live's component is loaded, the prism syntax highlight works fine in other places at the same markdown.

image

But, it fails after the vue-live component is loaded.

image

tlyau62 commented 3 years ago

After some experiments, the problem should be related to vue-live, not this plugin nor vue-prism-editor. A very easy workaround is to import the prism/core at the beginning of the enhanceApp.js.

import "prismjs/components/prism-core";

export default ...
Kolobok12309 commented 2 years ago

@tlyau62 Big thanks, it fix ts highlight in code, i think it fix all other languages except 'markup', 'css', 'javascript'(they preloaded)