{"id":13682258,"url":"https://github.com/wooorm/refractor","last_synced_at":"2025-05-13T17:14:28.109Z","repository":{"id":41055365,"uuid":"99138604","full_name":"wooorm/refractor","owner":"wooorm","description":"Lightweight, robust, elegant virtual syntax highlighting using Prism","archived":false,"fork":false,"pushed_at":"2025-03-11T15:23:52.000Z","size":1521,"stargazers_count":806,"open_issues_count":0,"forks_count":42,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-03T06:04:40.165Z","etag":null,"topics":["hast","highlight","html","react","syntax","syntax-highlighting","vdom","virtual","virtual-dom"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wooorm.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":"funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"wooorm"}},"created_at":"2017-08-02T16:29:14.000Z","updated_at":"2025-05-02T18:53:19.000Z","dependencies_parsed_at":"2025-04-11T05:06:42.220Z","dependency_job_id":"cf58be2a-9e6f-4b52-8c2f-8414f1cfafc1","html_url":"https://github.com/wooorm/refractor","commit_stats":{"total_commits":180,"total_committers":13,"mean_commits":"13.846153846153847","dds":0.07222222222222219,"last_synced_commit":"fd0756390d740e59d8430b52a58866ded46db229"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Frefractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Frefractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Frefractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooorm%2Frefractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wooorm","download_url":"https://codeload.github.com/wooorm/refractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253141421,"owners_count":21860538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hast","highlight","html","react","syntax","syntax-highlighting","vdom","virtual","virtual-dom"],"created_at":"2024-08-02T13:01:43.050Z","updated_at":"2025-05-13T17:14:23.093Z","avatar_url":"https://github.com/wooorm.png","language":"JavaScript","readme":"\u003c!--lint disable no-html--\u003e\n\n# refractor\n\n[![Build][badge-build-image]][badge-build-url]\n[![Coverage][badge-coverage-image]][badge-coverage-url]\n[![Downloads][badge-downloads-image]][badge-downloads-url]\n[![Size][badge-size-image]][badge-size-url]\n\nLightweight,\nrobust,\nand elegant virtual syntax highlighting using [Prism][github-prism].\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Playground](#playground)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`refractor`](#refractor-1)\n  * [`Syntax`](#syntax)\n* [Examples](#examples)\n  * [Example: serializing hast as html](#example-serializing-hast-as-html)\n  * [Example: turning hast into react nodes](#example-turning-hast-into-react-nodes)\n* [Data](#data)\n* [CSS](#css)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Related](#related)\n* [Projects](#projects)\n* [Contribute](#contribute)\n\n## What is this?\n\nThis package wraps [Prism][github-prism] to output objects (ASTs) instead of a\nstring of HTML.\n\nPrism,\nthrough refractor,\nsupports 290+ programming languages.\nSupporting all of them requires a lot of code.\nThat’s why there are three entry points for refractor:\n\n\u003c!--count start--\u003e\n\n* `refractor/all` — 297 languages\n* `refractor/core` — 0 languages\n* `refractor` (default) — 36 common languages\n\n\u003c!--count end--\u003e\n\nBundled,\nminified,\nand gzipped,\nthose are roughly 12.7 kB (core),\n40 kB (default),\nand 211 kB (all).\n\n## When should I use this?\n\nThis package is useful when you want to perform syntax highlighting in a place\nwhere serialized HTML wouldn’t work or wouldn’t work well.\nFor example,\nyou can use refractor when you want to show code in a CLI by rendering to ANSI\nsequences,\nwhen you’re using virtual DOM frameworks\n(such as React or Preact)\nso that diffing can be performant,\nor when you’re working with ASTs\n(rehype).\n\nA different package,\n[`lowlight`][github-lowlight],\ndoes the same as refractor but uses [`highlight.js`][github-highlightjs]\ninstead.\nIf you’re looking for a *really good* but rather heavy highlighter,\ntry [`starry-night`][github-starry-night].\n\n\u003c!--Old name of the following section:--\u003e\n\n\u003ca name=\"demo\"\u003e\u003c/a\u003e\n\n## Playground\n\nYou can play with refractor on the\n[interactive demo (Replit)](https://replit.com/@karlhorky/official-refractor-demo#index.js).\n\n## Install\n\nThis package is [ESM only][github-gist-esm].\nIn Node.js (version 16+),\ninstall with [npm][npmjs-install]:\n\n```sh\nnpm install refractor\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {refractor} from 'https://esm.sh/refractor@5'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {refractor} from 'https://esm.sh/refractor@5?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {refractor} from 'refractor'\n\nconst tree = refractor.highlight('\"use strict\";', 'js')\n\nconsole.log(tree)\n```\n\nYields:\n\n```js\n{\n  type: 'root',\n  children: [\n    {\n      type: 'element',\n      tagName: 'span',\n      properties: {className: ['token', 'string']},\n      children: [{type: 'text', value: '\"use strict\"'}]\n    },\n    {\n      type: 'element',\n      tagName: 'span',\n      properties: {className: ['token', 'punctuation']},\n      children: [{type: 'text', value: ';'}]\n    }\n  ]\n}\n```\n\n## API\n\n`refractor` has several entries in its export map:\n\n* `refractor`,\n  which exports `refractor` and registers common grammars\n* `refractor/all`,\n  which exports `refractor` and registers all grammars\n* `refractor/core`,\n  which exports `refractor` and registers no grammars\n* `refractor/*`,\n  where `*` is a language name such as `markdown`,\n  which exports a [syntax function][api-syntax] as the default export\n\n### `refractor`\n\n#### `refractor.highlight(value, language)`\n\nHighlight `value` (code) as `language` (programming language).\n\n###### Parameters\n\n* `value` (`string`)\n  — code to highlight\n* `language` (`string` or `Grammar`)\n  — programming language name,\n  alias,\n  or grammar\n\n###### Returns\n\nNode representing highlighted code ([`Root`][github-hast-root]).\n\n###### Example\n\n```js\nimport css from 'refractor/css'\nimport {refractor} from 'refractor/core'\n\nrefractor.register(css)\nconsole.log(refractor.highlight('em { color: red }', 'css'))\n```\n\nYields:\n\n```js\n{\n  type: 'root',\n  children: [\n    {type: 'element', tagName: 'span', properties: [Object], children: [Array]},\n    {type: 'text', value: ' '},\n    // …\n    {type: 'text', value: ' red '},\n    {type: 'element', tagName: 'span', properties: [Object], children: [Array]}\n  ]\n}\n```\n\n#### `refractor.register(syntax)`\n\nRegister a syntax.\n\n###### Parameters\n\n* `syntax` (`Function`)\n  — language function custom made for refractor,\n  as in,\n  the files in `refractor/*`\n\n###### Example\n\n```js\nimport markdown from 'refractor/markdown'\nimport {refractor} from 'refractor/core'\n\nrefractor.register(markdown)\n\nconsole.log(refractor.highlight('*Emphasis*', 'markdown'))\n```\n\nYields:\n\n```js\n{\n  type: 'root',\n  children: [\n    {type: 'element', tagName: 'span', properties: [Object], children: [Array]}\n  ]\n}\n```\n\n#### `refractor.alias(name[, alias])`\n\nRegister aliases for already registered languages.\n\n###### Signatures\n\n* `alias(name, alias | list)`\n* `alias(aliases)`\n\n###### Parameters\n\n* `language` (`string`)\n  — programming language [name][prismjs-languages]\n* `alias` (`string`)\n  — new aliases for the programming language\n* `list` (`Array\u003cstring\u003e`)\n  — list of aliases\n* `aliases` (`Record\u003clanguage, alias | list\u003e`)\n  — map of `language`s to `alias`es or `list`s\n\n###### Example\n\n```js\nimport markdown from 'refractor/markdown'\nimport {refractor} from 'refractor/core'\n\nrefractor.register(markdown)\n\n// refractor.highlight('*Emphasis*', 'mdown')\n// ^ would throw: Error: Unknown language: `mdown` is not registered\n\nrefractor.alias({markdown: ['mdown', 'mkdn', 'mdwn', 'ron']})\nrefractor.highlight('*Emphasis*', 'mdown')\n// ^ Works!\n```\n\n#### `refractor.registered(aliasOrlanguage)`\n\nCheck whether an `alias` or `language` is registered.\n\n###### Parameters\n\n* `aliasOrlanguage` (`string`)\n  — programming language name or alias\n\n###### Example\n\n```js\nimport markdown from 'refractor/markdown'\nimport {refractor} from 'refractor/core'\n\nconsole.log(refractor.registered('markdown')) //=\u003e false\n\nrefractor.register(markdown)\n\nconsole.log(refractor.registered('markdown')) //=\u003e true\n```\n\n#### `refractor.listLanguages()`\n\nList all registered languages (names and aliases).\n\n###### Returns\n\n`Array\u003cstring\u003e`.\n\n###### Example\n\n```js\nimport markdown from 'refractor/markdown'\nimport {refractor} from 'refractor/core'\n\nconsole.log(refractor.listLanguages()) //=\u003e []\n\nrefractor.register(markdown)\n\nconsole.log(refractor.listLanguages())\n```\n\nYields:\n\n```js\n[\n  'markup', // Note that `markup` (a lot of xml based languages) is a dep of markdown.\n  'html',\n  // …\n  'markdown',\n  'md'\n]\n```\n\n### `Syntax`\n\nRefractor syntax function (TypeScript type).\n\n###### Type\n\n```ts\nexport type Syntax = ((prism: Refractor) =\u003e undefined | void) \u0026 {\n  aliases?: Array\u003cstring\u003e | undefined\n  displayName: string\n}\n```\n\n## Examples\n\n### Example: serializing hast as html\n\nhast trees as returned by refractor can be serialized with\n[`hast-util-to-html`][github-hast-util-to-html]:\n\n```js\nimport {toHtml} from 'hast-util-to-html'\nimport {refractor} from 'refractor'\n\nconst tree = refractor.highlight('\"use strict\";', 'js')\n\nconsole.log(toHtml(tree))\n```\n\nYields:\n\n```html\n\u003cspan class=\"token string\"\u003e\"use strict\"\u003c/span\u003e\u003cspan class=\"token punctuation\"\u003e;\u003c/span\u003e\n```\n\n### Example: turning hast into react nodes\n\nhast trees as returned by refractor can be turned into React (or Preact) with\n[`hast-util-to-jsx-runtime`][github-hast-util-to-jsx-runtime]:\n\n```js\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {Fragment, jsxs, jsx} from 'react/jsx-runtime'\nimport {refractor} from 'refractor'\n\nconst tree = refractor.highlight('\"use strict\";', 'js')\nconst reactNode = toJsxRuntime(tree, {Fragment, jsxs, jsx})\n\nconsole.log(react)\n```\n\nYields:\n\n```js\n{\n  '$$typeof': Symbol(react.element),\n  type: 'div',\n  key: 'h-1',\n  ref: null,\n  props: { children: [ [Object], [Object] ] },\n  _owner: null,\n  _store: {}\n}\n```\n\n\u003c!--Old name of the following section:--\u003e\n\n\u003ca name=\"syntaxes\"\u003e\u003c/a\u003e\n\n## Data\n\nIf you’re using `refractor/core`,\nno syntaxes are included.\nChecked syntaxes are included if you import `refractor`.\nUnchecked syntaxes are available through `refractor/all`.\nYou can import `refractor/core` or `refractor` and manually add more languages\nas you please.\n\nPrism operates as a singleton:\nonce you register a language in one place,\nit’ll be available everywhere.\n\nOnly these custom built syntaxes will work with `refractor` because Prism’s own\nsyntaxes are made to work with global variables and are not importable.\n\n\u003c!--support start--\u003e\n\n* [x] [`arduino`](https://github.com/wooorm/refractor/blob/main/lang/arduino.js) — alias: `ino`\n* [x] [`bash`](https://github.com/wooorm/refractor/blob/main/lang/bash.js) — alias: `sh`, `shell`\n* [x] [`basic`](https://github.com/wooorm/refractor/blob/main/lang/basic.js)\n* [x] [`c`](https://github.com/wooorm/refractor/blob/main/lang/c.js)\n* [x] [`clike`](https://github.com/wooorm/refractor/blob/main/lang/clike.js)\n* [x] [`cpp`](https://github.com/wooorm/refractor/blob/main/lang/cpp.js)\n* [x] [`csharp`](https://github.com/wooorm/refractor/blob/main/lang/csharp.js) — alias: `cs`, `dotnet`\n* [x] [`css`](https://github.com/wooorm/refractor/blob/main/lang/css.js)\n* [x] [`diff`](https://github.com/wooorm/refractor/blob/main/lang/diff.js)\n* [x] [`go`](https://github.com/wooorm/refractor/blob/main/lang/go.js)\n* [x] [`ini`](https://github.com/wooorm/refractor/blob/main/lang/ini.js)\n* [x] [`java`](https://github.com/wooorm/refractor/blob/main/lang/java.js)\n* [x] [`javascript`](https://github.com/wooorm/refractor/blob/main/lang/javascript.js) — alias: `js`\n* [x] [`json`](https://github.com/wooorm/refractor/blob/main/lang/json.js) — alias: `webmanifest`\n* [x] [`kotlin`](https://github.com/wooorm/refractor/blob/main/lang/kotlin.js) — alias: `kt`, `kts`\n* [x] [`less`](https://github.com/wooorm/refractor/blob/main/lang/less.js)\n* [x] [`lua`](https://github.com/wooorm/refractor/blob/main/lang/lua.js)\n* [x] [`makefile`](https://github.com/wooorm/refractor/blob/main/lang/makefile.js)\n* [x] [`markdown`](https://github.com/wooorm/refractor/blob/main/lang/markdown.js) — alias: `md`\n* [x] [`markup`](https://github.com/wooorm/refractor/blob/main/lang/markup.js) — alias: `atom`, `html`, `mathml`, `rss`, `ssml`, `svg`, `xml`\n* [x] [`markup-templating`](https://github.com/wooorm/refractor/blob/main/lang/markup-templating.js)\n* [x] [`objectivec`](https://github.com/wooorm/refractor/blob/main/lang/objectivec.js) — alias: `objc`\n* [x] [`perl`](https://github.com/wooorm/refractor/blob/main/lang/perl.js)\n* [x] [`php`](https://github.com/wooorm/refractor/blob/main/lang/php.js)\n* [x] [`python`](https://github.com/wooorm/refractor/blob/main/lang/python.js) — alias: `py`\n* [x] [`r`](https://github.com/wooorm/refractor/blob/main/lang/r.js)\n* [x] [`regex`](https://github.com/wooorm/refractor/blob/main/lang/regex.js)\n* [x] [`ruby`](https://github.com/wooorm/refractor/blob/main/lang/ruby.js) — alias: `rb`\n* [x] [`rust`](https://github.com/wooorm/refractor/blob/main/lang/rust.js)\n* [x] [`sass`](https://github.com/wooorm/refractor/blob/main/lang/sass.js)\n* [x] [`scss`](https://github.com/wooorm/refractor/blob/main/lang/scss.js)\n* [x] [`sql`](https://github.com/wooorm/refractor/blob/main/lang/sql.js)\n* [x] [`swift`](https://github.com/wooorm/refractor/blob/main/lang/swift.js)\n* [x] [`typescript`](https://github.com/wooorm/refractor/blob/main/lang/typescript.js) — alias: `ts`\n* [x] [`vbnet`](https://github.com/wooorm/refractor/blob/main/lang/vbnet.js)\n* [x] [`yaml`](https://github.com/wooorm/refractor/blob/main/lang/yaml.js) — alias: `yml`\n* [ ] [`abap`](https://github.com/wooorm/refractor/blob/main/lang/abap.js)\n* [ ] [`abnf`](https://github.com/wooorm/refractor/blob/main/lang/abnf.js)\n* [ ] [`actionscript`](https://github.com/wooorm/refractor/blob/main/lang/actionscript.js)\n* [ ] [`ada`](https://github.com/wooorm/refractor/blob/main/lang/ada.js)\n* [ ] [`agda`](https://github.com/wooorm/refractor/blob/main/lang/agda.js)\n* [ ] [`al`](https://github.com/wooorm/refractor/blob/main/lang/al.js)\n* [ ] [`antlr4`](https://github.com/wooorm/refractor/blob/main/lang/antlr4.js) — alias: `g4`\n* [ ] [`apacheconf`](https://github.com/wooorm/refractor/blob/main/lang/apacheconf.js)\n* [ ] [`apex`](https://github.com/wooorm/refractor/blob/main/lang/apex.js)\n* [ ] [`apl`](https://github.com/wooorm/refractor/blob/main/lang/apl.js)\n* [ ] [`applescript`](https://github.com/wooorm/refractor/blob/main/lang/applescript.js)\n* [ ] [`aql`](https://github.com/wooorm/refractor/blob/main/lang/aql.js)\n* [ ] [`arff`](https://github.com/wooorm/refractor/blob/main/lang/arff.js)\n* [ ] [`armasm`](https://github.com/wooorm/refractor/blob/main/lang/armasm.js) — alias: `arm-asm`\n* [ ] [`arturo`](https://github.com/wooorm/refractor/blob/main/lang/arturo.js) — alias: `art`\n* [ ] [`asciidoc`](https://github.com/wooorm/refractor/blob/main/lang/asciidoc.js) — alias: `adoc`\n* [ ] [`asm6502`](https://github.com/wooorm/refractor/blob/main/lang/asm6502.js)\n* [ ] [`asmatmel`](https://github.com/wooorm/refractor/blob/main/lang/asmatmel.js)\n* [ ] [`aspnet`](https://github.com/wooorm/refractor/blob/main/lang/aspnet.js)\n* [ ] [`autohotkey`](https://github.com/wooorm/refractor/blob/main/lang/autohotkey.js)\n* [ ] [`autoit`](https://github.com/wooorm/refractor/blob/main/lang/autoit.js)\n* [ ] [`avisynth`](https://github.com/wooorm/refractor/blob/main/lang/avisynth.js) — alias: `avs`\n* [ ] [`avro-idl`](https://github.com/wooorm/refractor/blob/main/lang/avro-idl.js) — alias: `avdl`\n* [ ] [`awk`](https://github.com/wooorm/refractor/blob/main/lang/awk.js) — alias: `gawk`\n* [ ] [`batch`](https://github.com/wooorm/refractor/blob/main/lang/batch.js)\n* [ ] [`bbcode`](https://github.com/wooorm/refractor/blob/main/lang/bbcode.js) — alias: `shortcode`\n* [ ] [`bbj`](https://github.com/wooorm/refractor/blob/main/lang/bbj.js)\n* [ ] [`bicep`](https://github.com/wooorm/refractor/blob/main/lang/bicep.js)\n* [ ] [`birb`](https://github.com/wooorm/refractor/blob/main/lang/birb.js)\n* [ ] [`bison`](https://github.com/wooorm/refractor/blob/main/lang/bison.js)\n* [ ] [`bnf`](https://github.com/wooorm/refractor/blob/main/lang/bnf.js) — alias: `rbnf`\n* [ ] [`bqn`](https://github.com/wooorm/refractor/blob/main/lang/bqn.js)\n* [ ] [`brainfuck`](https://github.com/wooorm/refractor/blob/main/lang/brainfuck.js)\n* [ ] [`brightscript`](https://github.com/wooorm/refractor/blob/main/lang/brightscript.js)\n* [ ] [`bro`](https://github.com/wooorm/refractor/blob/main/lang/bro.js)\n* [ ] [`bsl`](https://github.com/wooorm/refractor/blob/main/lang/bsl.js) — alias: `oscript`\n* [ ] [`cfscript`](https://github.com/wooorm/refractor/blob/main/lang/cfscript.js) — alias: `cfc`\n* [ ] [`chaiscript`](https://github.com/wooorm/refractor/blob/main/lang/chaiscript.js)\n* [ ] [`cil`](https://github.com/wooorm/refractor/blob/main/lang/cil.js)\n* [ ] [`cilkc`](https://github.com/wooorm/refractor/blob/main/lang/cilkc.js) — alias: `cilk-c`\n* [ ] [`cilkcpp`](https://github.com/wooorm/refractor/blob/main/lang/cilkcpp.js) — alias: `cilk`, `cilk-cpp`\n* [ ] [`clojure`](https://github.com/wooorm/refractor/blob/main/lang/clojure.js)\n* [ ] [`cmake`](https://github.com/wooorm/refractor/blob/main/lang/cmake.js)\n* [ ] [`cobol`](https://github.com/wooorm/refractor/blob/main/lang/cobol.js)\n* [ ] [`coffeescript`](https://github.com/wooorm/refractor/blob/main/lang/coffeescript.js) — alias: `coffee`\n* [ ] [`concurnas`](https://github.com/wooorm/refractor/blob/main/lang/concurnas.js) — alias: `conc`\n* [ ] [`cooklang`](https://github.com/wooorm/refractor/blob/main/lang/cooklang.js)\n* [ ] [`coq`](https://github.com/wooorm/refractor/blob/main/lang/coq.js)\n* [ ] [`crystal`](https://github.com/wooorm/refractor/blob/main/lang/crystal.js)\n* [ ] [`cshtml`](https://github.com/wooorm/refractor/blob/main/lang/cshtml.js) — alias: `razor`\n* [ ] [`csp`](https://github.com/wooorm/refractor/blob/main/lang/csp.js)\n* [ ] [`css-extras`](https://github.com/wooorm/refractor/blob/main/lang/css-extras.js)\n* [ ] [`csv`](https://github.com/wooorm/refractor/blob/main/lang/csv.js)\n* [ ] [`cue`](https://github.com/wooorm/refractor/blob/main/lang/cue.js)\n* [ ] [`cypher`](https://github.com/wooorm/refractor/blob/main/lang/cypher.js)\n* [ ] [`d`](https://github.com/wooorm/refractor/blob/main/lang/d.js)\n* [ ] [`dart`](https://github.com/wooorm/refractor/blob/main/lang/dart.js)\n* [ ] [`dataweave`](https://github.com/wooorm/refractor/blob/main/lang/dataweave.js)\n* [ ] [`dax`](https://github.com/wooorm/refractor/blob/main/lang/dax.js)\n* [ ] [`dhall`](https://github.com/wooorm/refractor/blob/main/lang/dhall.js)\n* [ ] [`django`](https://github.com/wooorm/refractor/blob/main/lang/django.js) — alias: `jinja2`\n* [ ] [`dns-zone-file`](https://github.com/wooorm/refractor/blob/main/lang/dns-zone-file.js) — alias: `dns-zone`\n* [ ] [`docker`](https://github.com/wooorm/refractor/blob/main/lang/docker.js) — alias: `dockerfile`\n* [ ] [`dot`](https://github.com/wooorm/refractor/blob/main/lang/dot.js) — alias: `gv`\n* [ ] [`ebnf`](https://github.com/wooorm/refractor/blob/main/lang/ebnf.js)\n* [ ] [`editorconfig`](https://github.com/wooorm/refractor/blob/main/lang/editorconfig.js)\n* [ ] [`eiffel`](https://github.com/wooorm/refractor/blob/main/lang/eiffel.js)\n* [ ] [`ejs`](https://github.com/wooorm/refractor/blob/main/lang/ejs.js) — alias: `eta`\n* [ ] [`elixir`](https://github.com/wooorm/refractor/blob/main/lang/elixir.js)\n* [ ] [`elm`](https://github.com/wooorm/refractor/blob/main/lang/elm.js)\n* [ ] [`erb`](https://github.com/wooorm/refractor/blob/main/lang/erb.js)\n* [ ] [`erlang`](https://github.com/wooorm/refractor/blob/main/lang/erlang.js)\n* [ ] [`etlua`](https://github.com/wooorm/refractor/blob/main/lang/etlua.js)\n* [ ] [`excel-formula`](https://github.com/wooorm/refractor/blob/main/lang/excel-formula.js) — alias: `xls`, `xlsx`\n* [ ] [`factor`](https://github.com/wooorm/refractor/blob/main/lang/factor.js)\n* [ ] [`false`](https://github.com/wooorm/refractor/blob/main/lang/false.js)\n* [ ] [`firestore-security-rules`](https://github.com/wooorm/refractor/blob/main/lang/firestore-security-rules.js)\n* [ ] [`flow`](https://github.com/wooorm/refractor/blob/main/lang/flow.js)\n* [ ] [`fortran`](https://github.com/wooorm/refractor/blob/main/lang/fortran.js)\n* [ ] [`fsharp`](https://github.com/wooorm/refractor/blob/main/lang/fsharp.js)\n* [ ] [`ftl`](https://github.com/wooorm/refractor/blob/main/lang/ftl.js)\n* [ ] [`gap`](https://github.com/wooorm/refractor/blob/main/lang/gap.js)\n* [ ] [`gcode`](https://github.com/wooorm/refractor/blob/main/lang/gcode.js)\n* [ ] [`gdscript`](https://github.com/wooorm/refractor/blob/main/lang/gdscript.js)\n* [ ] [`gedcom`](https://github.com/wooorm/refractor/blob/main/lang/gedcom.js)\n* [ ] [`gettext`](https://github.com/wooorm/refractor/blob/main/lang/gettext.js) — alias: `po`\n* [ ] [`gherkin`](https://github.com/wooorm/refractor/blob/main/lang/gherkin.js)\n* [ ] [`git`](https://github.com/wooorm/refractor/blob/main/lang/git.js)\n* [ ] [`glsl`](https://github.com/wooorm/refractor/blob/main/lang/glsl.js)\n* [ ] [`gml`](https://github.com/wooorm/refractor/blob/main/lang/gml.js) — alias: `gamemakerlanguage`\n* [ ] [`gn`](https://github.com/wooorm/refractor/blob/main/lang/gn.js) — alias: `gni`\n* [ ] [`go-module`](https://github.com/wooorm/refractor/blob/main/lang/go-module.js) — alias: `go-mod`\n* [ ] [`gradle`](https://github.com/wooorm/refractor/blob/main/lang/gradle.js)\n* [ ] [`graphql`](https://github.com/wooorm/refractor/blob/main/lang/graphql.js)\n* [ ] [`groovy`](https://github.com/wooorm/refractor/blob/main/lang/groovy.js)\n* [ ] [`haml`](https://github.com/wooorm/refractor/blob/main/lang/haml.js)\n* [ ] [`handlebars`](https://github.com/wooorm/refractor/blob/main/lang/handlebars.js) — alias: `hbs`, `mustache`\n* [ ] [`haskell`](https://github.com/wooorm/refractor/blob/main/lang/haskell.js) — alias: `hs`\n* [ ] [`haxe`](https://github.com/wooorm/refractor/blob/main/lang/haxe.js)\n* [ ] [`hcl`](https://github.com/wooorm/refractor/blob/main/lang/hcl.js)\n* [ ] [`hlsl`](https://github.com/wooorm/refractor/blob/main/lang/hlsl.js)\n* [ ] [`hoon`](https://github.com/wooorm/refractor/blob/main/lang/hoon.js)\n* [ ] [`hpkp`](https://github.com/wooorm/refractor/blob/main/lang/hpkp.js)\n* [ ] [`hsts`](https://github.com/wooorm/refractor/blob/main/lang/hsts.js)\n* [ ] [`http`](https://github.com/wooorm/refractor/blob/main/lang/http.js)\n* [ ] [`ichigojam`](https://github.com/wooorm/refractor/blob/main/lang/ichigojam.js)\n* [ ] [`icon`](https://github.com/wooorm/refractor/blob/main/lang/icon.js)\n* [ ] [`icu-message-format`](https://github.com/wooorm/refractor/blob/main/lang/icu-message-format.js)\n* [ ] [`idris`](https://github.com/wooorm/refractor/blob/main/lang/idris.js) — alias: `idr`\n* [ ] [`iecst`](https://github.com/wooorm/refractor/blob/main/lang/iecst.js)\n* [ ] [`ignore`](https://github.com/wooorm/refractor/blob/main/lang/ignore.js) — alias: `gitignore`, `hgignore`, `npmignore`\n* [ ] [`inform7`](https://github.com/wooorm/refractor/blob/main/lang/inform7.js)\n* [ ] [`io`](https://github.com/wooorm/refractor/blob/main/lang/io.js)\n* [ ] [`j`](https://github.com/wooorm/refractor/blob/main/lang/j.js)\n* [ ] [`javadoc`](https://github.com/wooorm/refractor/blob/main/lang/javadoc.js)\n* [ ] [`javadoclike`](https://github.com/wooorm/refractor/blob/main/lang/javadoclike.js)\n* [ ] [`javastacktrace`](https://github.com/wooorm/refractor/blob/main/lang/javastacktrace.js)\n* [ ] [`jexl`](https://github.com/wooorm/refractor/blob/main/lang/jexl.js)\n* [ ] [`jolie`](https://github.com/wooorm/refractor/blob/main/lang/jolie.js)\n* [ ] [`jq`](https://github.com/wooorm/refractor/blob/main/lang/jq.js)\n* [ ] [`js-extras`](https://github.com/wooorm/refractor/blob/main/lang/js-extras.js)\n* [ ] [`js-templates`](https://github.com/wooorm/refractor/blob/main/lang/js-templates.js)\n* [ ] [`jsdoc`](https://github.com/wooorm/refractor/blob/main/lang/jsdoc.js)\n* [ ] [`json5`](https://github.com/wooorm/refractor/blob/main/lang/json5.js)\n* [ ] [`jsonp`](https://github.com/wooorm/refractor/blob/main/lang/jsonp.js)\n* [ ] [`jsstacktrace`](https://github.com/wooorm/refractor/blob/main/lang/jsstacktrace.js)\n* [ ] [`jsx`](https://github.com/wooorm/refractor/blob/main/lang/jsx.js)\n* [ ] [`julia`](https://github.com/wooorm/refractor/blob/main/lang/julia.js)\n* [ ] [`keepalived`](https://github.com/wooorm/refractor/blob/main/lang/keepalived.js)\n* [ ] [`keyman`](https://github.com/wooorm/refractor/blob/main/lang/keyman.js)\n* [ ] [`kumir`](https://github.com/wooorm/refractor/blob/main/lang/kumir.js) — alias: `kum`\n* [ ] [`kusto`](https://github.com/wooorm/refractor/blob/main/lang/kusto.js)\n* [ ] [`latex`](https://github.com/wooorm/refractor/blob/main/lang/latex.js) — alias: `context`, `tex`\n* [ ] [`latte`](https://github.com/wooorm/refractor/blob/main/lang/latte.js)\n* [ ] [`lilypond`](https://github.com/wooorm/refractor/blob/main/lang/lilypond.js) — alias: `ly`\n* [ ] [`linker-script`](https://github.com/wooorm/refractor/blob/main/lang/linker-script.js) — alias: `ld`\n* [ ] [`liquid`](https://github.com/wooorm/refractor/blob/main/lang/liquid.js)\n* [ ] [`lisp`](https://github.com/wooorm/refractor/blob/main/lang/lisp.js) — alias: `elisp`, `emacs`, `emacs-lisp`\n* [ ] [`livescript`](https://github.com/wooorm/refractor/blob/main/lang/livescript.js)\n* [ ] [`llvm`](https://github.com/wooorm/refractor/blob/main/lang/llvm.js)\n* [ ] [`log`](https://github.com/wooorm/refractor/blob/main/lang/log.js)\n* [ ] [`lolcode`](https://github.com/wooorm/refractor/blob/main/lang/lolcode.js)\n* [ ] [`magma`](https://github.com/wooorm/refractor/blob/main/lang/magma.js)\n* [ ] [`mata`](https://github.com/wooorm/refractor/blob/main/lang/mata.js)\n* [ ] [`matlab`](https://github.com/wooorm/refractor/blob/main/lang/matlab.js)\n* [ ] [`maxscript`](https://github.com/wooorm/refractor/blob/main/lang/maxscript.js)\n* [ ] [`mel`](https://github.com/wooorm/refractor/blob/main/lang/mel.js)\n* [ ] [`mermaid`](https://github.com/wooorm/refractor/blob/main/lang/mermaid.js)\n* [ ] [`metafont`](https://github.com/wooorm/refractor/blob/main/lang/metafont.js)\n* [ ] [`mizar`](https://github.com/wooorm/refractor/blob/main/lang/mizar.js)\n* [ ] [`mongodb`](https://github.com/wooorm/refractor/blob/main/lang/mongodb.js)\n* [ ] [`monkey`](https://github.com/wooorm/refractor/blob/main/lang/monkey.js)\n* [ ] [`moonscript`](https://github.com/wooorm/refractor/blob/main/lang/moonscript.js) — alias: `moon`\n* [ ] [`n1ql`](https://github.com/wooorm/refractor/blob/main/lang/n1ql.js)\n* [ ] [`n4js`](https://github.com/wooorm/refractor/blob/main/lang/n4js.js) — alias: `n4jsd`\n* [ ] [`nand2tetris-hdl`](https://github.com/wooorm/refractor/blob/main/lang/nand2tetris-hdl.js)\n* [ ] [`naniscript`](https://github.com/wooorm/refractor/blob/main/lang/naniscript.js) — alias: `nani`\n* [ ] [`nasm`](https://github.com/wooorm/refractor/blob/main/lang/nasm.js)\n* [ ] [`neon`](https://github.com/wooorm/refractor/blob/main/lang/neon.js)\n* [ ] [`nevod`](https://github.com/wooorm/refractor/blob/main/lang/nevod.js)\n* [ ] [`nginx`](https://github.com/wooorm/refractor/blob/main/lang/nginx.js)\n* [ ] [`nim`](https://github.com/wooorm/refractor/blob/main/lang/nim.js)\n* [ ] [`nix`](https://github.com/wooorm/refractor/blob/main/lang/nix.js)\n* [ ] [`nsis`](https://github.com/wooorm/refractor/blob/main/lang/nsis.js)\n* [ ] [`ocaml`](https://github.com/wooorm/refractor/blob/main/lang/ocaml.js)\n* [ ] [`odin`](https://github.com/wooorm/refractor/blob/main/lang/odin.js)\n* [ ] [`opencl`](https://github.com/wooorm/refractor/blob/main/lang/opencl.js)\n* [ ] [`openqasm`](https://github.com/wooorm/refractor/blob/main/lang/openqasm.js) — alias: `qasm`\n* [ ] [`oz`](https://github.com/wooorm/refractor/blob/main/lang/oz.js)\n* [ ] [`parigp`](https://github.com/wooorm/refractor/blob/main/lang/parigp.js)\n* [ ] [`parser`](https://github.com/wooorm/refractor/blob/main/lang/parser.js)\n* [ ] [`pascal`](https://github.com/wooorm/refractor/blob/main/lang/pascal.js) — alias: `objectpascal`\n* [ ] [`pascaligo`](https://github.com/wooorm/refractor/blob/main/lang/pascaligo.js)\n* [ ] [`pcaxis`](https://github.com/wooorm/refractor/blob/main/lang/pcaxis.js) — alias: `px`\n* [ ] [`peoplecode`](https://github.com/wooorm/refractor/blob/main/lang/peoplecode.js) — alias: `pcode`\n* [ ] [`php-extras`](https://github.com/wooorm/refractor/blob/main/lang/php-extras.js)\n* [ ] [`phpdoc`](https://github.com/wooorm/refractor/blob/main/lang/phpdoc.js)\n* [ ] [`plant-uml`](https://github.com/wooorm/refractor/blob/main/lang/plant-uml.js) — alias: `plantuml`\n* [ ] [`plsql`](https://github.com/wooorm/refractor/blob/main/lang/plsql.js)\n* [ ] [`powerquery`](https://github.com/wooorm/refractor/blob/main/lang/powerquery.js) — alias: `mscript`, `pq`\n* [ ] [`powershell`](https://github.com/wooorm/refractor/blob/main/lang/powershell.js)\n* [ ] [`processing`](https://github.com/wooorm/refractor/blob/main/lang/processing.js)\n* [ ] [`prolog`](https://github.com/wooorm/refractor/blob/main/lang/prolog.js)\n* [ ] [`promql`](https://github.com/wooorm/refractor/blob/main/lang/promql.js)\n* [ ] [`properties`](https://github.com/wooorm/refractor/blob/main/lang/properties.js)\n* [ ] [`protobuf`](https://github.com/wooorm/refractor/blob/main/lang/protobuf.js)\n* [ ] [`psl`](https://github.com/wooorm/refractor/blob/main/lang/psl.js)\n* [ ] [`pug`](https://github.com/wooorm/refractor/blob/main/lang/pug.js)\n* [ ] [`puppet`](https://github.com/wooorm/refractor/blob/main/lang/puppet.js)\n* [ ] [`pure`](https://github.com/wooorm/refractor/blob/main/lang/pure.js)\n* [ ] [`purebasic`](https://github.com/wooorm/refractor/blob/main/lang/purebasic.js) — alias: `pbfasm`\n* [ ] [`purescript`](https://github.com/wooorm/refractor/blob/main/lang/purescript.js) — alias: `purs`\n* [ ] [`q`](https://github.com/wooorm/refractor/blob/main/lang/q.js)\n* [ ] [`qml`](https://github.com/wooorm/refractor/blob/main/lang/qml.js)\n* [ ] [`qore`](https://github.com/wooorm/refractor/blob/main/lang/qore.js)\n* [ ] [`qsharp`](https://github.com/wooorm/refractor/blob/main/lang/qsharp.js) — alias: `qs`\n* [ ] [`racket`](https://github.com/wooorm/refractor/blob/main/lang/racket.js) — alias: `rkt`\n* [ ] [`reason`](https://github.com/wooorm/refractor/blob/main/lang/reason.js)\n* [ ] [`rego`](https://github.com/wooorm/refractor/blob/main/lang/rego.js)\n* [ ] [`renpy`](https://github.com/wooorm/refractor/blob/main/lang/renpy.js) — alias: `rpy`\n* [ ] [`rescript`](https://github.com/wooorm/refractor/blob/main/lang/rescript.js) — alias: `res`\n* [ ] [`rest`](https://github.com/wooorm/refractor/blob/main/lang/rest.js)\n* [ ] [`rip`](https://github.com/wooorm/refractor/blob/main/lang/rip.js)\n* [ ] [`roboconf`](https://github.com/wooorm/refractor/blob/main/lang/roboconf.js)\n* [ ] [`robotframework`](https://github.com/wooorm/refractor/blob/main/lang/robotframework.js) — alias: `robot`\n* [ ] [`sas`](https://github.com/wooorm/refractor/blob/main/lang/sas.js)\n* [ ] [`scala`](https://github.com/wooorm/refractor/blob/main/lang/scala.js)\n* [ ] [`scheme`](https://github.com/wooorm/refractor/blob/main/lang/scheme.js)\n* [ ] [`shell-session`](https://github.com/wooorm/refractor/blob/main/lang/shell-session.js) — alias: `sh-session`, `shellsession`\n* [ ] [`smali`](https://github.com/wooorm/refractor/blob/main/lang/smali.js)\n* [ ] [`smalltalk`](https://github.com/wooorm/refractor/blob/main/lang/smalltalk.js)\n* [ ] [`smarty`](https://github.com/wooorm/refractor/blob/main/lang/smarty.js)\n* [ ] [`sml`](https://github.com/wooorm/refractor/blob/main/lang/sml.js) — alias: `smlnj`\n* [ ] [`solidity`](https://github.com/wooorm/refractor/blob/main/lang/solidity.js) — alias: `sol`\n* [ ] [`solution-file`](https://github.com/wooorm/refractor/blob/main/lang/solution-file.js) — alias: `sln`\n* [ ] [`soy`](https://github.com/wooorm/refractor/blob/main/lang/soy.js)\n* [ ] [`sparql`](https://github.com/wooorm/refractor/blob/main/lang/sparql.js) — alias: `rq`\n* [ ] [`splunk-spl`](https://github.com/wooorm/refractor/blob/main/lang/splunk-spl.js)\n* [ ] [`sqf`](https://github.com/wooorm/refractor/blob/main/lang/sqf.js)\n* [ ] [`squirrel`](https://github.com/wooorm/refractor/blob/main/lang/squirrel.js)\n* [ ] [`stan`](https://github.com/wooorm/refractor/blob/main/lang/stan.js)\n* [ ] [`stata`](https://github.com/wooorm/refractor/blob/main/lang/stata.js)\n* [ ] [`stylus`](https://github.com/wooorm/refractor/blob/main/lang/stylus.js)\n* [ ] [`supercollider`](https://github.com/wooorm/refractor/blob/main/lang/supercollider.js) — alias: `sclang`\n* [ ] [`systemd`](https://github.com/wooorm/refractor/blob/main/lang/systemd.js)\n* [ ] [`t4-cs`](https://github.com/wooorm/refractor/blob/main/lang/t4-cs.js) — alias: `t4`\n* [ ] [`t4-templating`](https://github.com/wooorm/refractor/blob/main/lang/t4-templating.js)\n* [ ] [`t4-vb`](https://github.com/wooorm/refractor/blob/main/lang/t4-vb.js)\n* [ ] [`tap`](https://github.com/wooorm/refractor/blob/main/lang/tap.js)\n* [ ] [`tcl`](https://github.com/wooorm/refractor/blob/main/lang/tcl.js)\n* [ ] [`textile`](https://github.com/wooorm/refractor/blob/main/lang/textile.js)\n* [ ] [`toml`](https://github.com/wooorm/refractor/blob/main/lang/toml.js)\n* [ ] [`tremor`](https://github.com/wooorm/refractor/blob/main/lang/tremor.js) — alias: `trickle`, `troy`\n* [ ] [`tsx`](https://github.com/wooorm/refractor/blob/main/lang/tsx.js)\n* [ ] [`tt2`](https://github.com/wooorm/refractor/blob/main/lang/tt2.js)\n* [ ] [`turtle`](https://github.com/wooorm/refractor/blob/main/lang/turtle.js) — alias: `trig`\n* [ ] [`twig`](https://github.com/wooorm/refractor/blob/main/lang/twig.js)\n* [ ] [`typoscript`](https://github.com/wooorm/refractor/blob/main/lang/typoscript.js) — alias: `tsconfig`\n* [ ] [`unrealscript`](https://github.com/wooorm/refractor/blob/main/lang/unrealscript.js) — alias: `uc`, `uscript`\n* [ ] [`uorazor`](https://github.com/wooorm/refractor/blob/main/lang/uorazor.js)\n* [ ] [`uri`](https://github.com/wooorm/refractor/blob/main/lang/uri.js) — alias: `url`\n* [ ] [`v`](https://github.com/wooorm/refractor/blob/main/lang/v.js)\n* [ ] [`vala`](https://github.com/wooorm/refractor/blob/main/lang/vala.js)\n* [ ] [`velocity`](https://github.com/wooorm/refractor/blob/main/lang/velocity.js)\n* [ ] [`verilog`](https://github.com/wooorm/refractor/blob/main/lang/verilog.js)\n* [ ] [`vhdl`](https://github.com/wooorm/refractor/blob/main/lang/vhdl.js)\n* [ ] [`vim`](https://github.com/wooorm/refractor/blob/main/lang/vim.js)\n* [ ] [`visual-basic`](https://github.com/wooorm/refractor/blob/main/lang/visual-basic.js) — alias: `vb`, `vba`\n* [ ] [`warpscript`](https://github.com/wooorm/refractor/blob/main/lang/warpscript.js)\n* [ ] [`wasm`](https://github.com/wooorm/refractor/blob/main/lang/wasm.js)\n* [ ] [`web-idl`](https://github.com/wooorm/refractor/blob/main/lang/web-idl.js) — alias: `webidl`\n* [ ] [`wgsl`](https://github.com/wooorm/refractor/blob/main/lang/wgsl.js)\n* [ ] [`wiki`](https://github.com/wooorm/refractor/blob/main/lang/wiki.js)\n* [ ] [`wolfram`](https://github.com/wooorm/refractor/blob/main/lang/wolfram.js) — alias: `mathematica`, `nb`, `wl`\n* [ ] [`wren`](https://github.com/wooorm/refractor/blob/main/lang/wren.js)\n* [ ] [`xeora`](https://github.com/wooorm/refractor/blob/main/lang/xeora.js) — alias: `xeoracube`\n* [ ] [`xml-doc`](https://github.com/wooorm/refractor/blob/main/lang/xml-doc.js)\n* [ ] [`xojo`](https://github.com/wooorm/refractor/blob/main/lang/xojo.js)\n* [ ] [`xquery`](https://github.com/wooorm/refractor/blob/main/lang/xquery.js)\n* [ ] [`yang`](https://github.com/wooorm/refractor/blob/main/lang/yang.js)\n* [ ] [`zig`](https://github.com/wooorm/refractor/blob/main/lang/zig.js)\n\n\u003c!--support end--\u003e\n\n## CSS\n\n`refractor` does not inject CSS for the syntax highlighted code.\nIt does not make sense: refractor doesn’t have to be turned into HTML and might\nnot run in a browser!\nIf you are in a browser,\nyou can use any Prism theme.\nFor example,\nto get Prism Dark from [`esm.sh`][esmsh]:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"https://esm.sh/prismjs@1.30.0/themes/prism-dark.css\"\u003e\n```\n\n\u003c!--Old name of the following section:--\u003e\n\n\u003ca name=\"plugins\"\u003e\u003c/a\u003e\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now,\nthat is Node.js 16+.\nIt also works in Deno and modern browsers.\n\nOnly the custom built syntaxes in `refractor/*` will work with\n`refractor` as Prism’s own syntaxes are made to work with global variables and\nare not importable.\n\nrefractor also does not support Prism plugins,\ndue to the same limitations,\nand that they almost exclusively deal with the DOM.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n* [`lowlight`][github-lowlight]\n  — the same as refractor but with [`highlight.js`][github-highlightjs]\n* [`starry-night`][github-starry-night]\n  — similar but like GitHub and really good\n\n## Projects\n\n* [`react-syntax-highlighter`](https://github.com/react-syntax-highlighter/react-syntax-highlighter)\n  — [React][] component for syntax highlighting\n* [`@mapbox/rehype-prism`](https://github.com/mapbox/rehype-prism)\n  — **[rehype][github-rehype]** plugin to highlight code\n  blocks\n* [`react-refractor`](https://github.com/rexxars/react-refractor)\n  — syntax highlighter for [React][]\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][opensource-guide].\n\n## License\n\n[MIT][file-license] © [Titus Wormer][wooorm]\n\n\u003c!-- Definitions --\u003e\n\n[api-syntax]: #syntax\n\n[badge-build-image]: https://github.com/wooorm/refractor/workflows/main/badge.svg\n\n[badge-build-url]: https://github.com/wooorm/refractor/actions\n\n[badge-coverage-image]: https://img.shields.io/codecov/c/github/wooorm/refractor.svg\n\n[badge-coverage-url]: https://codecov.io/github/wooorm/refractor\n\n[badge-downloads-image]: https://img.shields.io/npm/dm/refractor.svg\n\n[badge-downloads-url]: https://www.npmjs.com/package/refractor\n\n[badge-size-image]: https://img.shields.io/bundlejs/size/refractor\n\n[badge-size-url]: https://bundlejs.com/?q=refractor\n\n[esmsh]: https://esm.sh\n\n[file-license]: license\n\n[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[github-hast-root]: https://github.com/syntax-tree/hast#root\n\n[github-hast-util-to-html]: https://github.com/syntax-tree/hast-util-to-html\n\n[github-hast-util-to-jsx-runtime]: https://github.com/syntax-tree/hast-util-to-jsx-runtime\n\n[github-highlightjs]: https://github.com/highlightjs/highlight.js\n\n[github-lowlight]: https://github.com/wooorm/lowlight\n\n[github-prism]: https://github.com/PrismJS/prism\n\n[github-rehype]: https://github.com/rehypejs/rehype\n\n[github-starry-night]: https://github.com/wooorm/starry-night\n\n[npmjs-install]: https://docs.npmjs.com/cli/install\n\n[opensource-guide]: https://opensource.guide/how-to-contribute/\n\n[prismjs-languages]: https://prismjs.com/#languages-list\n\n[react]: https://react.dev\n\n[wooorm]: https://wooorm.com\n","funding_links":["https://github.com/sponsors/wooorm"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooorm%2Frefractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwooorm%2Frefractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooorm%2Frefractor/lists"}