ele828 / hexo-prism-plugin

Hexo plugin for code highlighting by prism.js, supporting JSX syntax
205 stars 51 forks source link

HTML Not Escaped #40

Open edburyenegren-okta opened 6 years ago

edburyenegren-okta commented 6 years ago

With highlight: false, HTML is no longer escaped inside code blocks in Hexo.

ele828 commented 6 years ago

I think this is a bug. I will fix this once I get any chance. Welcome if you want to address a fix :)

ertrzyiks commented 4 years ago

My blog was also affected by this bug and I have it fixed by using markdown-it

Since I already had the renderer installed https://github.com/hexojs/hexo-renderer-markdown-it I just added the prism plugin https://github.com/jGleitz/markdown-it-prism

npm install markdown-it-prism --save

and added this plugin to markdown-it renderer config

markdown:
  plugins:
    - markdown-it-prism