wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown code-block using docuemnt

dancerphil opened this issue · comments

We are using refractor in web worker.

It turns out that code-block in markdown will fail since we don't have document in web worker.

It could be better if we have a document check.

Related code: https://github.com/wooorm/refractor/blob/main/lang/markdown.js#L367

Version: refractor@3.4.0 (I think also in 4.1.0)

commented

I don’t understand the question.

The code you link to never runs, because Prism.plugins.autoloader shouldn’t be true.

Please spend time framing your question or post reproduction code to show that it’s a bug