empress / ember-showdown-prism

https://ember-showdown-prism.netlify.app/
MIT License
11 stars 3 forks source link

fix dollar signs in codeblocks breaking when running through Prism #13

Closed nickschot closed 3 years ago

nickschot commented 3 years ago

Our prism showdown plugin was breaking dollar signs because Prism was interfering with the "custom characters" showdown uses during parsing. This PR temporarily reinstates the normal characters so Prism can do it's thing and then restores the "custom characters" afterwards so showdown doesn't break.

Context 1: https://github.com/ember-learn/ember-blog/issues/863 Context 2: https://github.com/showdownjs/showdown/blob/a9f38b6f057284460d6447371f3dc5dea999c0a6/src/converter.js#L285

mansona commented 3 years ago

also when the demo is added feel free to dismiss my review 👍