{"name":"refractor","version":"3.4.0","description":"Lightweight, robust, elegant virtual syntax highlighting using Prism","license":"MIT","keywords":["syntax","code","ast","virtual","dom","highlight","highlighting","prism"],"repository":{"type":"git","url":"git+https://github.com/wooorm/refractor.git"},"bugs":{"url":"https://github.com/wooorm/refractor/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Conor Hastings","email":"hastings.conorm@gmail.com"},{"name":"Daniel Stefanovic","email":"daniel.stefanovic@gmail.com"},{"name":"Mike Kruk","email":"tamagokun@gmail.com"},{"name":"Peter Williams","email":"peterwilliams@gmail.com"},{"name":"Brian Mearns","email":"bmearns@commercehub.com"},{"name":"Gray Zhang","email":"otakustay@gmail.com"}],"dependencies":{"hastscript":"^6.0.0","parse-entities":"^2.0.0","prismjs":"~1.24.0"},"devDependencies":{"@babel/core":"^7.0.0","alpha-sort":"^4.0.0","arr-diff":"^4.0.0","async":"^3.0.0","bail":"^1.0.0","browserify":"^17.0.0","chalk":"^4.0.0","detab":"^2.0.0","is-hidden":"^1.0.0","is-keyword":"^1.2.2","mdast-zone":"^4.0.0","not":"^0.1.0","nyc":"^15.0.0","prettier":"^2.0.0","rehype":"^11.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","tape":"^5.0.0","tinyify":"^3.0.0","trim-lines":"^1.0.0","unist-builder":"^2.0.0","unist-util-remove-position":"^3.0.0","xo":"^0.37.0"},"scripts":{"generate":"node script/languages && node script/list","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","build-bundle":"browserify index.js -s refractor > refractor.js","build-mangle":"browserify index.js -s refractor -p tinyify > refractor.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test/index.js","test":"npm run generate && npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100,"exclude":["lang/*.js"]},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"import/extensions":"off","unicorn/no-array-callback-reference":"off","unicorn/no-fn-reference-in-iterator":"off","unicorn/prefer-includes":"off","unicorn/prefer-optional-catch-binding":"off","unicorn/prefer-type-error":"off","unicorn/string-content":"off","guard-for-in":"off"},"ignores":["lang/*.js","refractor.js"]},"remarkConfig":{"plugins":["preset-wooorm",["toc",{"heading":"contents","skip":"license"}],"./script/count","./script/support"]},"readme":"# refractor\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nLightweight, robust, elegant virtual syntax highlighting using [Prism][].\nUseful for virtual DOMs and non-HTML things.\nPerfect for [React][], [VDOM][], and others.\n\n<!--count start-->\n\n`refractor` is built to work with all syntaxes supported by [Prism][],\nthat’s [258 languages][names] (as of [`prism@1.24.0`][prismjs]) and all\n[themes][].\n\n<!--count end-->\n\nWant to use [`highlight.js`][hljs] instead?\nTry [`lowlight`][lowlight]!\n\n## Contents\n\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`refractor.register(syntax)`](#refractorregistersyntax)\n    *   [`refractor.alias(name[, alias])`](#refractoraliasname-alias)\n    *   [`refractor.highlight(value, language)`](#refractorhighlightvalue-language)\n    *   [`refractor.registered(language)`](#refractorregisteredlanguage)\n    *   [`refractor.listLanguages()`](#refractorlistlanguages)\n*   [Browser](#browser)\n*   [Plugins](#plugins)\n*   [Syntaxes](#syntaxes)\n*   [Related](#related)\n*   [Projects](#projects)\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install refractor\n```\n\n[Use in the browser »][browser]\n\n## Use\n\n```js\nvar refractor = require('refractor')\n\nvar nodes = refractor.highlight('\"use strict\";', 'js')\n\nconsole.log(nodes)\n```\n\nYields:\n\n```js\n[\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\nWhich serialized with [`rehype`][rehype] or [`hast-util-to-html`][to-html]\nyields (you may have to wrap it into a fragment like so: `{type: 'root',\nchildren: nodes}`):\n\n```html\n<span class=\"token string\">\"use strict\"</span><span class=\"token punctuation\">;</span>\n```\n\n> **Tip**: Use [`hast-to-hyperscript`][to-hyperscript] to transform to other\n> virtual DOMs, or DIY.\n\n## API\n\n### `refractor.register(syntax)`\n\nRegister a [syntax][].\nNeeded if you’re using [`refractor/core`][browser].\n\n###### Example\n\n```js\nvar refractor = require('refractor/core')\nvar markdown = require('refractor/lang/markdown')\n\nrefractor.register(markdown)\n\nconsole.log(refractor.highlight('*Emphasis*', 'markdown'))\n```\n\nYields:\n\n```js\n[\n  {\n    type: 'element',\n    tagName: 'span',\n    properties: {className: [Array]},\n    children: [[Object], [Object], [Object]]\n  }\n]\n```\n\n### `refractor.alias(name[, alias])`\n\nRegister a new `alias` for the `name` language.\n\n###### Signatures\n\n*   `alias(name, alias|list)`\n*   `alias(aliases)`\n\n###### Parameters\n\n*   `name` (`string`) — [Name][names] of a registered language\n*   `alias` (`string`) — New alias for the registered language\n*   `list` (`Array.<alias>`) — List of aliases\n*   `aliases` (`Object.<alias|list>`) — Map where each key is a `name` and each\n    value an `alias` or a `list`\n\n###### Example\n\n```js\nvar refractor = require('refractor/core')\nvar markdown = require('refractor/lang/markdown')\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.highlight(value, language)`\n\nParse `value` (`string`) according to the `language` ([name or alias][syntax])\nsyntax.\n\n###### Returns\n\nVirtual nodes representing the highlighted value ([`Array.<Node>`][node]).\n\n###### Example\n\n```js\nvar refractor = require('refractor/core')\n\nconsole.log(refractor.highlight('em { color: red }', 'css'))\n```\n\nYields:\n\n```js\n[\n  {\n    type: 'element',\n    tagName: 'span',\n    properties: {className: [Array]},\n    children: [[Object]]\n  },\n  {type: 'text', value: ' '},\n  // …\n  {type: 'text', value: ' red '},\n  {\n    type: 'element',\n    tagName: 'span',\n    properties: {className: [Array]},\n    children: [[Object]]\n  }\n]\n```\n\n### `refractor.registered(language)`\n\nCheck if a `language` ([name or alias][syntax]) is registered.\n\n###### Example\n\n```js\nvar refractor = require('refractor/core')\nvar markdown = require('refractor/lang/markdown')\n\nconsole.log(refractor.registered('markdown'))\n\nrefractor.register(markdown)\n\nconsole.log(refractor.registered('markdown'))\n```\n\nYields:\n\n```js\nfalse\ntrue\n```\n\n### `refractor.listLanguages()`\n\nList all registered languages ([names and aliases][syntax]).\n\n###### Returns\n\n`Array.<string>`.\n\n###### Example\n\n```js\nvar refractor = require('refractor/core')\nvar markdown = require('refractor/lang/markdown')\n\nconsole.log(refractor.listLanguages())\n\nrefractor.register(markdown)\n\nconsole.log(refractor.listLanguages())\n```\n\nYields:\n\n```js\n[\n  'markup',\n  'html',\n  // …\n  'javascript',\n  'js'\n]\n[\n  'markup',\n  'html',\n  // …\n  'javascript',\n  'js',\n  'markdown',\n  'md'\n]\n```\n\n## Browser\n\nI do not suggest using the [pre-bundled][releases] files or requiring\n`refractor` itself in the browser as that would include a 376kb (139kb GZipped)\nof code.\n\nInstead require `refractor/core` and include only the needed syntaxes.\nFor example:\n\n```js\nvar refractor = require('refractor/core')\n\nrefractor.register(require('refractor/lang/jsx'))\n\nconsole.log(refractor.highlight('<Dropdown primary />', 'jsx'))\n```\n\nYields:\n\n```js\n[\n  {\n    type: 'element',\n    tagName: 'span',\n    properties: {className: ['token', 'tag']},\n    children: [\n      {type: 'element', tagName: 'span', properties: {className: [Array]}, children: [[Object], [Object]]},\n      {type: 'text', value: ' '},\n      {type: 'element', tagName: 'span', properties: {className: [Array]}, children: [[Object]]},\n      {type: 'text', value: ' '},\n      {type: 'element', tagName: 'span', properties: {className: [Array]}, children: [[Object]]}\n    ]\n  }\n]\n```\n\n…When using [browserify][] and minifying with [tinyify][] this results in\njust 65kb of code (23kb with GZip).\n\n## Plugins\n\n`refractor` does not support Prism plugins:\n\n1.  Prism plugins often deal with the DOM, not Prism tokens\n2.  Prism is made using global variables instead of a module format, so all\n    syntaxes below are custom built to work so you can `require` just what you\n    need\n\n## Syntaxes\n\nAll syntaxes are included if you `require('refractor')`.\nIf you’re using `refractor/core`, checked syntaxes are always included, but\nunchecked syntaxes are not and must be `require`d and [`register`][register]ed.\n\nUnlike in Prism, `cssExtras` and `phpExtras` are camel-cased instead of\ndash-cased.\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 requirable.\n\n<!--support start-->\n\n*   [x] [`clike`](https://github.com/wooorm/refractor/blob/main/lang/clike.js)\n*   [x] [`css`](https://github.com/wooorm/refractor/blob/main/lang/css.js)\n*   [x] [`javascript`](https://github.com/wooorm/refractor/blob/main/lang/javascript.js) — alias: `js`\n*   [x] [`markup`](https://github.com/wooorm/refractor/blob/main/lang/markup.js) — alias: `html`, `mathml`, `svg`, `xml`, `ssml`, `atom`, `rss`\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*   [ ] [`arduino`](https://github.com/wooorm/refractor/blob/main/lang/arduino.js)\n*   [ ] [`arff`](https://github.com/wooorm/refractor/blob/main/lang/arff.js)\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*   [ ] [`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*   [ ] [`bash`](https://github.com/wooorm/refractor/blob/main/lang/bash.js) — alias: `shell`\n*   [ ] [`basic`](https://github.com/wooorm/refractor/blob/main/lang/basic.js)\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*   [ ] [`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*   [ ] [`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)\n*   [ ] [`c`](https://github.com/wooorm/refractor/blob/main/lang/c.js)\n*   [ ] [`cfscript`](https://github.com/wooorm/refractor/blob/main/lang/cfscript.js)\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*   [ ] [`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*   [ ] [`coq`](https://github.com/wooorm/refractor/blob/main/lang/coq.js)\n*   [ ] [`cpp`](https://github.com/wooorm/refractor/blob/main/lang/cpp.js)\n*   [ ] [`crystal`](https://github.com/wooorm/refractor/blob/main/lang/crystal.js)\n*   [ ] [`csharp`](https://github.com/wooorm/refractor/blob/main/lang/csharp.js) — alias: `dotnet`, `cs`\n*   [ ] [`csp`](https://github.com/wooorm/refractor/blob/main/lang/csp.js)\n*   [ ] [`cssExtras`](https://github.com/wooorm/refractor/blob/main/lang/css-extras.js)\n*   [ ] [`csv`](https://github.com/wooorm/refractor/blob/main/lang/csv.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*   [ ] [`diff`](https://github.com/wooorm/refractor/blob/main/lang/diff.js)\n*   [ ] [`django`](https://github.com/wooorm/refractor/blob/main/lang/django.js) — alias: `jinja2`\n*   [ ] [`dnsZoneFile`](https://github.com/wooorm/refractor/blob/main/lang/dns-zone-file.js)\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*   [ ] [`excelFormula`](https://github.com/wooorm/refractor/blob/main/lang/excel-formula.js)\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*   [ ] [`firestoreSecurityRules`](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*   [ ] [`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*   [ ] [`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)\n*   [ ] [`go`](https://github.com/wooorm/refractor/blob/main/lang/go.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`\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*   [ ] [`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*   [ ] [`icuMessageFormat`](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*   [ ] [`ini`](https://github.com/wooorm/refractor/blob/main/lang/ini.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*   [ ] [`java`](https://github.com/wooorm/refractor/blob/main/lang/java.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*   [ ] [`jsExtras`](https://github.com/wooorm/refractor/blob/main/lang/js-extras.js)\n*   [ ] [`jsTemplates`](https://github.com/wooorm/refractor/blob/main/lang/js-templates.js)\n*   [ ] [`jsdoc`](https://github.com/wooorm/refractor/blob/main/lang/jsdoc.js)\n*   [ ] [`json`](https://github.com/wooorm/refractor/blob/main/lang/json.js) — alias: `webmanifest`\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*   [ ] [`keyman`](https://github.com/wooorm/refractor/blob/main/lang/keyman.js)\n*   [ ] [`kotlin`](https://github.com/wooorm/refractor/blob/main/lang/kotlin.js) — alias: `kt`, `kts`\n*   [ ] [`kumir`](https://github.com/wooorm/refractor/blob/main/lang/kumir.js) — alias: `kum`\n*   [ ] [`latex`](https://github.com/wooorm/refractor/blob/main/lang/latex.js) — alias: `tex`, `context`\n*   [ ] [`latte`](https://github.com/wooorm/refractor/blob/main/lang/latte.js)\n*   [ ] [`less`](https://github.com/wooorm/refractor/blob/main/lang/less.js)\n*   [ ] [`lilypond`](https://github.com/wooorm/refractor/blob/main/lang/lilypond.js)\n*   [ ] [`liquid`](https://github.com/wooorm/refractor/blob/main/lang/liquid.js)\n*   [ ] [`lisp`](https://github.com/wooorm/refractor/blob/main/lang/lisp.js)\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*   [ ] [`lua`](https://github.com/wooorm/refractor/blob/main/lang/lua.js)\n*   [ ] [`makefile`](https://github.com/wooorm/refractor/blob/main/lang/makefile.js)\n*   [ ] [`markdown`](https://github.com/wooorm/refractor/blob/main/lang/markdown.js) — alias: `md`\n*   [ ] [`markupTemplating`](https://github.com/wooorm/refractor/blob/main/lang/markup-templating.js)\n*   [ ] [`matlab`](https://github.com/wooorm/refractor/blob/main/lang/matlab.js)\n*   [ ] [`mel`](https://github.com/wooorm/refractor/blob/main/lang/mel.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*   [ ] [`nand2tetrisHdl`](https://github.com/wooorm/refractor/blob/main/lang/nand2tetris-hdl.js)\n*   [ ] [`naniscript`](https://github.com/wooorm/refractor/blob/main/lang/naniscript.js)\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*   [ ] [`objectivec`](https://github.com/wooorm/refractor/blob/main/lang/objectivec.js) — alias: `objc`\n*   [ ] [`ocaml`](https://github.com/wooorm/refractor/blob/main/lang/ocaml.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*   [ ] [`perl`](https://github.com/wooorm/refractor/blob/main/lang/perl.js)\n*   [ ] [`phpExtras`](https://github.com/wooorm/refractor/blob/main/lang/php-extras.js)\n*   [ ] [`php`](https://github.com/wooorm/refractor/blob/main/lang/php.js)\n*   [ ] [`phpdoc`](https://github.com/wooorm/refractor/blob/main/lang/phpdoc.js)\n*   [ ] [`plsql`](https://github.com/wooorm/refractor/blob/main/lang/plsql.js)\n*   [ ] [`powerquery`](https://github.com/wooorm/refractor/blob/main/lang/powerquery.js)\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)\n*   [ ] [`purescript`](https://github.com/wooorm/refractor/blob/main/lang/purescript.js) — alias: `purs`\n*   [ ] [`python`](https://github.com/wooorm/refractor/blob/main/lang/python.js) — alias: `py`\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*   [ ] [`r`](https://github.com/wooorm/refractor/blob/main/lang/r.js)\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*   [ ] [`regex`](https://github.com/wooorm/refractor/blob/main/lang/regex.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*   [ ] [`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)\n*   [ ] [`ruby`](https://github.com/wooorm/refractor/blob/main/lang/ruby.js) — alias: `rb`\n*   [ ] [`rust`](https://github.com/wooorm/refractor/blob/main/lang/rust.js)\n*   [ ] [`sas`](https://github.com/wooorm/refractor/blob/main/lang/sas.js)\n*   [ ] [`sass`](https://github.com/wooorm/refractor/blob/main/lang/sass.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*   [ ] [`scss`](https://github.com/wooorm/refractor/blob/main/lang/scss.js)\n*   [ ] [`shellSession`](https://github.com/wooorm/refractor/blob/main/lang/shell-session.js)\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*   [ ] [`solutionFile`](https://github.com/wooorm/refractor/blob/main/lang/solution-file.js)\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*   [ ] [`splunkSpl`](https://github.com/wooorm/refractor/blob/main/lang/splunk-spl.js)\n*   [ ] [`sqf`](https://github.com/wooorm/refractor/blob/main/lang/sqf.js)\n*   [ ] [`sql`](https://github.com/wooorm/refractor/blob/main/lang/sql.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*   [ ] [`stylus`](https://github.com/wooorm/refractor/blob/main/lang/stylus.js)\n*   [ ] [`swift`](https://github.com/wooorm/refractor/blob/main/lang/swift.js)\n*   [ ] [`t4Cs`](https://github.com/wooorm/refractor/blob/main/lang/t4-cs.js)\n*   [ ] [`t4Templating`](https://github.com/wooorm/refractor/blob/main/lang/t4-templating.js)\n*   [ ] [`t4Vb`](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*   [ ] [`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)\n*   [ ] [`twig`](https://github.com/wooorm/refractor/blob/main/lang/twig.js)\n*   [ ] [`typescript`](https://github.com/wooorm/refractor/blob/main/lang/typescript.js) — alias: `ts`\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*   [ ] [`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*   [ ] [`vbnet`](https://github.com/wooorm/refractor/blob/main/lang/vbnet.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*   [ ] [`visualBasic`](https://github.com/wooorm/refractor/blob/main/lang/visual-basic.js)\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*   [ ] [`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`, `wl`, `nb`\n*   [ ] [`xeora`](https://github.com/wooorm/refractor/blob/main/lang/xeora.js) — alias: `xeoracube`\n*   [ ] [`xmlDoc`](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*   [ ] [`yaml`](https://github.com/wooorm/refractor/blob/main/lang/yaml.js) — alias: `yml`\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<!--support end-->\n\n## Related\n\n*   [`lowlight`][lowlight] — Same, but based on [`highlight.js`][hljs]\n\n## Projects\n\n*   [`react-syntax-highlighter`](https://github.com/conorhastings/react-syntax-highlighter)\n    — [React][] component for syntax highlighting\n*   [`rehype-prism`](https://github.com/mapbox/rehype-prism)\n    — Syntax highlighting in [**rehype**](https://github.com/rehypejs/rehype)\n*   [`react-refractor`](https://github.com/rexxars/react-refractor)\n    — Syntax highlighter for [React][]\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/refractor/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/refractor/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/refractor.svg\n\n[coverage]: https://codecov.io/github/wooorm/refractor\n\n[downloads-badge]: https://img.shields.io/npm/dm/refractor.svg\n\n[downloads]: https://www.npmjs.com/package/refractor\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/refractor.svg\n\n[size]: https://bundlephobia.com/result?p=refractor\n\n[npm]: https://www.npmjs.com/package/refractor/tutorial\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[releases]: https://github.com/wooorm/refractor/releases\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[names]: https://prismjs.com/#languages-list\n\n[themes]: https://prismjs.com/#theme\n\n[react]: https://facebook.github.io/react/\n\n[vdom]: https://github.com/Matt-Esch/virtual-dom\n\n[to-hyperscript]: https://github.com/syntax-tree/hast-to-hyperscript\n\n[to-html]: https://github.com/syntax-tree/hast-util-to-html\n\n[browser]: #browser\n\n[prism]: https://github.com/PrismJS/prism\n\n[prismjs]: https://www.npmjs.com/package/prismjs\n\n[lowlight]: https://github.com/wooorm/lowlight\n\n[hljs]: https://github.com/isagalaev/highlight.js\n\n[browserify]: https://github.com/browserify/browserify\n\n[tinyify]: https://github.com/browserify/tinyify\n\n[node]: https://github.com/syntax-tree/hast#ast\n\n[syntax]: #syntaxes\n\n[register]: #refractorregistersyntax\n","readmeFilename":"readme.md","gitHead":"94e7a99922d8ea3551eeae24fa82cd11c4284a9e","homepage":"https://github.com/wooorm/refractor#readme","_id":"refractor@3.4.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"integrity":"sha512-dBeD02lC5eytm9Gld2Mx0cMcnR+zhSnsTfPpWqFaMgUMJfC9A6bcN3Br/NaXrnBJcuxnLFR90k1jrkaSyV8umg==","shasum":"62bd274b06c942041f390c371b676eb67cb0a678","tarball":"http://registry-npm.ywwl.com/refractor/download/refractor-3.4.0.tgz","fileCount":263,"unpackedSize":842382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3EWUCRA9TVsSAnZWagAAD0YQAIhGk0lj/RdXv+24ZxOg\nOLb3AVWypJROzYGO5gaBAcYiuw4VsS+fesSeh3WSYCIR+46k72OfyGU85p2X\nMB4IGhrYZBp4AZvVpzNbEReChq1+kLm8BxDlTdlOyYiMxBx2MCbkok9YIzA7\nYD/ekroPDbrEWFsfDC9BGupcpcdoKcRSyCRuLHfxHIHrOCnVcWePjQIAABYv\nBGUlOS/zkyatlKHpIgyJTTHNaACDFYJVPIeJ/k+D6RDSh6ck5NYWtw0KfOnf\n6+J+MZuTAMAE+e6hQBHMwQmzY1M55/kJE8dp7yKEwxgelB73veg0uCqJWx2B\nd/ogzww6NQi51FD9GgTS3nUr8/Tc2orRXw7Qt1Dp81CrAK+WQRVp3j/cgFl5\napGLn6v/ODHWELtmy8LMlyukd34u0yuovJNkXdHSYD8NgOYDqIp0A1Qc8WW2\nA12yT8r3ZcdMl6Up6dtxBrgJbVWHP3kEQr8sLSWOZD9ExGJS0jMkwAE0X1e2\nS0E5k24nfr4uQYp3cpgeA5flfhO56XQmhKgPen7i7dyF9MRrqpJlUevPOm2M\nO2iVR/iJivhG76QuU3P+A14w+u3RhiMj6rFqJ2pcxsWYgkWWluH7iGYbJ5Nz\n5xWVrLgntFOE4WXeBbE9aXWDQ5dJgZzYSpzLu9Vx/phkY7GyusQSuxmhKobR\nTjJN\r\n=lOLp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtI1pme4TqtUAoJdvvR1Ztxc6PDumOGgp0xyosH+h2jgIgSrBScrd5C6MrAh+c2mGU8IF8csxP90T4kCVPviE+Fco="}],"size":263405,"noattachment":false,"key":"/refractor/-/refractor-3.4.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/refractor_3.4.0_1625048467997_0.02596075312372803"},"_hasShrinkwrap":false,"publish_time":1625048468255,"_cnpm_publish_time":1625048468255,"dist-tags":{"latest":"5.0.0","legacy":"3.6.0"}}