Skip to content

Releases: NullVoxPopuli/highlightjs-glimmer

highlightjs-glimmer@2.2.2

06 Oct 06:14
Compare
Choose a tag to compare

Patch Changes

highlightjs-glimmer@2.2.1

13 Nov 14:36
db5a739
Compare
Choose a tag to compare

Patch Changes

highlightjs-glimmer@2.2.0

13 Nov 14:01
99f4468
Compare
Choose a tag to compare

Minor Changes

  • #425 3f3447a Thanks @davidtaylorhq! - Previously, this package enabled glimmer-js support by patching into the official highlightjs javascript grammar. This is problematic if you want to support both gjs and js(/jsx) syntax highlighting alongside each other.

    This change refactors things so that glimmer-javascript is defined and exported as a standalone grammar. Instead of patching the standard javascript grammar, it uses the subLanguage feature to extend it cleanly. hbs-literal and template-tag support are added via additional 'contains' rules.

To maintain the existing 'override javascript grammar' behavior for existing consumers of this package, the setup APIs will unregister the default javascript grammar, and register javascript, js, mjs and cjs as aliases of the new glimmer-javascript grammar. Consumers who want to take advantage of the standalone grammar can import it and register using the standard hljs.registerLanguage technique.

For example:

import hljs from 'highlight.js';
import { glimmerJavascript } from 'highlightjs-glimmer';

// 'javascript' must also be registered prior to running this
hljs.registerLanguage('glimmer-javascript', glimmerJavascript);

The old usage, setup and other methods,

import hljs from 'highlight.js';
import { setup } from 'highlightjs-glimmer';

setup(hljs);

hljs.highlightAll();
Have been unchanged in this release, but are likely to change in the next major so that the default / recommended APIs don't take away from the possibility of using other languages in the same document.

highlightjs-glimmer@2.1.0

24 Jun 23:20
Compare
Choose a tag to compare

Minor Changes

Patch Changes

v2.0.1

06 Nov 18:56
Compare
Choose a tag to compare

2.0.1 (2022-11-06)

Bug Fixes

  • gjs: consistently highlight gjs blocks (abfdd2b)
  • template: use more robust template tag identification (b6f3e05)

v2.0.0

05 Nov 14:04
Compare
Choose a tag to compare

2.0.0 (2022-11-05)

chore

  • drop support for node < 14 (18fd5b2)

BREAKING CHANGES

  • drop support for node < 14

v1.4.1

26 Dec 16:01
Compare
Choose a tag to compare

1.4.1 (2021-12-26)

Bug Fixes

  • support: widen highlight.js peerDep (86e3b83)

v1.4.0

01 May 17:34
Compare
Choose a tag to compare

1.4.0 (2021-05-01)

Features

  • internal: setup CJS testing with remark and rehype (631af9d)

v1.3.4

30 Apr 18:53
Compare
Choose a tag to compare

1.3.4 (2021-04-30)

Bug Fixes

  • dist: rename cjs output to end in cjs extension (1c20168)

v1.3.3

13 Apr 01:14
Compare
Choose a tag to compare

1.3.3 (2021-04-13)

Bug Fixes

  • grammar: this.property is now [class][punc][property] (9492542)