empress / ember-showdown-prism

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

configure prism to use the glimmer parser, as ember doesn't use handlebars #50

Open NullVoxPopuli opened 12 months ago

NullVoxPopuli commented 12 months ago

Initially mentioned and explained here: https://github.com/ember-learn/guides-source/pull/1930#pullrequestreview-1512651200

Glimmer plugin for prism: https://prismjs-glimmer.nullvoxpopuli.com/ Docs: https://github.com/NullVoxPopuli/prismjs-glimmer

By using handlebars, we incorrect highlight glimmer code. (Ember does not use handlebars, despite the extension being shared)

Here is how to set up prism with using glimmer for the hbs extension: https://github.com/shipshapecode/ember-prism/blob/main/addon/index.js#L2


Why didn't i get glimmer set up as a default in prismjs?

mansona commented 12 months ago

@NullVoxPopuli we are already using ember-prism here 🤔 it could be that we're on an older version since it was added 🤷 if you want to try to update and make sure that this repo works and all the repos that are using it also work then that would be a good contribution 👍

NullVoxPopuli commented 12 months ago

PR: https://github.com/empress/ember-showdown-prism/pull/51

the scene from the princess bride where the dread pirate roberts says as you wish as he tumbles down a hill -- it's posted here because it's silly, and I care about using correct syntax parsing