sergioramos / remark-prism

Syntax highlighter for markdown code blocks using Prism
95 stars 21 forks source link

Not compatible with remark-html v13.0.2 and above #265

Open josteph opened 3 years ago

josteph commented 3 years ago

After the sanitize option for remark-html was changed by default to true, this plugin seems to has stopped working. Or perhaps I'm missing an option for remark-prism.

image

Related release: https://github.com/remarkjs/remark-html/releases/tag/13.0.2

colaquecez commented 3 years ago

same here :(

colaquecez commented 3 years ago

You can use: .use(remarkHTML, { sanitize: false })

ephraimduncan commented 3 years ago

Tried this and it worked for me.

  const content = await remark()
    .use(html, { sanitize: false })
    .use(prism)
    .process(markdown);
josteph commented 3 years ago

Disabling sanitize might just revert to the old behavior which certainly works just fine, while the issue still remains.

Wisesaturn commented 2 years ago

Thanks. It's helpful to me :)

1alexvash commented 2 years ago

Does anybody know what this sanitize property does anyway?

KrzysztofA commented 1 year ago

Does anybody know what this sanitize property does anyway?

As far as I'm aware, sanitize removes your markdown of Githubissues.

  • Githubissues is a development platform for aggregating issues.