Skip to content

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

@NullVoxPopuli

Description

@NullVoxPopuli

Initially mentioned and explained here: ember-learn/guides-source#1930 (review)

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?

  • the author of prismjs supports ie10 and earlier, which i do not
  • as with highlightjs, we aren't the only users of the hbs extension. There are people using actual handlebars wich may be mislead by the glimmer parser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions