Open bjankie1 opened 6 years ago
I think I've found the answer: https://github.com/PrismJS/prism/issues/907
Prism only runs on DOMContentLoaded and highlights what's there. To highlight any other element, use Prism.highlightElement(). If there are many, use Prism.highlightAll(), but keep in mind that will also go over already highlighted elements and re-highlight them.
When vue-markdown is placec outside of
router-view
it works like a charm with highlighting. When the same component is called from withinrouter-view
component the highlighting doesn't apply. I will try to attach a screenshot presenting the effect. It seems to be some kind of race condition related to prism invocation.