atom / highlights

Syntax highlighter
https://atom.github.io/highlights
MIT License
530 stars 54 forks source link

Adopt the new `syntax--` convention when transforming scopes into class names #49

Closed as-cii closed 7 years ago

as-cii commented 7 years ago

After transitioning away from the shadow DOM in <atom-text-editor> elements, we accidentally forgot to update this repository to prepend syntax-- when transforming scopes into CSS class names. This resulted in an inconsistency between the CSS files we use in Atom and the HTML that gets generated from this library, thus causing regressions like https://github.com/atom/markdown-preview/issues/461.

This pull request changes it so that the emitted HTML complies to the new syntax-- convention. Considering this is a breaking change, I am planning to merge this pull request and bump the major version to ensure other users of this library don't observe regressions.

/cc: @atom/core

nathansobo commented 7 years ago

⚡️

bcoe commented 7 years ago

@nathansobo @as-cii, I'll communicate this change to npm. Since I think it will require some style-sheet updating on our part.

nathansobo commented 7 years ago

@as-cii What about parameterizing this prefix so @bcoe and friends don't have to change their style sheet for a different use case? Then we also don't have to bump the major though it may already be too late.

as-cii commented 7 years ago

Yeah a parameter sounds good. Thanks for the heads up @bcoe! I'll add it next week and release a new version. I'm afraid we'll have to stick with the new major version, though, as I already bumped it earlier today.

nathansobo commented 7 years ago

@as-cii What if we unpublish the major?

bcoe commented 7 years ago

@as-cii @nathansobo awesome, thanks for making it easier on us 👍