Skip to content

Commit

Permalink
Merge pull request #430 from NullVoxPopuli/changeset-release/main
Browse files Browse the repository at this point in the history
Release Preview
  • Loading branch information
NullVoxPopuli authored Nov 13, 2023
2 parents 53e8c1b + 8db7126 commit db5a739
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
5 changes: 0 additions & 5 deletions .changeset/clever-cats-brush.md

This file was deleted.

19 changes: 12 additions & 7 deletions highlightjs-glimmer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# highlightjs-glimmer

## 2.2.1

### Patch Changes

- [#429](https://github.com/NullVoxPopuli/highlightjs-glimmer/pull/429) [`263c15b`](https://github.com/NullVoxPopuli/highlightjs-glimmer/commit/263c15bdea067783144569b544e277f7ef74f05b) Thanks [@davidtaylorhq](https://github.com/davidtaylorhq)! - Declare support for Node 20

## 2.2.0

### Minor Changes
Expand All @@ -8,27 +14,26 @@

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:

```js
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,

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

setup(hljs);

hljs.highlightAll();
```

Expand Down
2 changes: 1 addition & 1 deletion highlightjs-glimmer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "highlightjs-glimmer",
"version": "2.2.0",
"version": "2.2.1",
"description": "Glimmer syntax highlighting with Highlight.JS",
"main": "dist/glimmer.cjs.cjs",
"browser": "dist/glimmer.esm.min.js",
Expand Down

0 comments on commit db5a739

Please sign in to comment.