Skip to content

Commit

Permalink
docs: update grammar report
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 29, 2024
1 parent 0c5a51a commit d6f4784
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 32 deletions.
32 changes: 16 additions & 16 deletions docs/references/engine-js-compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Compatibility reference of all built-in grammars with the [JavaScript RegExp engine](/guide/regex-engines#javascript-regexp-engine-experimental).

> Genreated on Monday, September 16, 2024
> Genreated on Sunday, September 29, 2024
>
> Version `1.17.6`
> Version `1.20.0`
>
> Runtime: Node.js v20.12.2
Expand All @@ -13,9 +13,9 @@ Compatibility reference of all built-in grammars with the [JavaScript RegExp eng
| | Count |
| :-------------- | ---------------------------: |
| Total Languages | 213 |
| Supported | [172](#supported-languages) |
| Supported | [175](#supported-languages) |
| Mismatched | [23](#mismatched-languages) |
| Unsupported | [18](#unsupported-languages) |
| Unsupported | [15](#unsupported-languages) |

## Supported Languages

Expand All @@ -31,8 +31,9 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
| apl | ✅ OK | 917 | - | |
| applescript | ✅ OK | 152 | - | |
| ara | ✅ OK | 54 | - | |
| asciidoc | ✅ OK | 262 | - | |
| asm | ✅ OK | 297 | - | |
| astro | ✅ OK | 1090 | - | |
| astro | ✅ OK | 613 | - | |
| awk | ✅ OK | 36 | - | |
| ballerina | ✅ OK | 230 | - | |
| bat | ✅ OK | 58 | - | |
Expand Down Expand Up @@ -86,6 +87,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
| graphql | ✅ OK | 448 | - | |
| groovy | ✅ OK | 133 | - | |
| hack | ✅ OK | 948 | - | |
| haml | ✅ OK | 562 | - | |
| handlebars | ✅ OK | 699 | - | |
| haxe | ✅ OK | 174 | - | |
| hcl | ✅ OK | 67 | - | |
Expand Down Expand Up @@ -141,7 +143,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
| qml | ✅ OK | 408 | - | |
| qmldir | ✅ OK | 7 | - | |
| qss | ✅ OK | 31 | - | |
| r | ✅ OK | 73 | - | |
| r | ✅ OK | 71 | - | |
| racket | ✅ OK | 69 | - | |
| raku | ✅ OK | 52 | - | |
| reg | ✅ OK | 9 | - | |
Expand All @@ -162,14 +164,14 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
| sql | ✅ OK | 67 | - | |
| ssh-config | ✅ OK | 12 | - | |
| stylus | ✅ OK | 107 | - | |
| svelte | ✅ OK | 1491 | - | |
| svelte | ✅ OK | 636 | - | |
| system-verilog | ✅ OK | 102 | - | |
| systemd | ✅ OK | 32 | - | |
| tasl | ✅ OK | 23 | - | |
| tcl | ✅ OK | 34 | - | |
| templ | ✅ OK | 673 | - | |
| terraform | ✅ OK | 68 | - | |
| tex | ✅ OK | 108 | - | |
| tex | ✅ OK | 106 | - | |
| toml | ✅ OK | 44 | - | |
| ts-tags | ✅ OK | 997 | - | |
| tsv | ✅ OK | 1 | - | |
Expand All @@ -185,12 +187,13 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
| verilog | ✅ OK | 33 | - | |
| vhdl | ✅ OK | 82 | - | |
| viml | ✅ OK | 72 | - | |
| vue | ✅ OK | 1597 | - | |
| vue-html | ✅ OK | 1620 | - | |
| vue | ✅ OK | 692 | - | |
| vue-html | ✅ OK | 716 | - | |
| vyper | ✅ OK | 238 | - | |
| wasm | ✅ OK | 78 | - | |
| wenyan | ✅ OK | 18 | - | |
| wgsl | ✅ OK | 44 | - | |
| wikitext | ✅ OK | 104 | - | |
| xml | ✅ OK | 169 | - | |
| xsl | ✅ OK | 171 | - | |
| yaml | ✅ OK | 48 | - | |
Expand Down Expand Up @@ -218,15 +221,15 @@ Languages that does not throw with the JavaScript RegExp engine, but will produc
| elixir | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=elixir) | 708 | - | 179 |
| erlang | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=erlang) | 147 | - | 470 |
| glsl | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=glsl) | 186 | - | 306 |
| haml | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=haml) | 1612 | - | 48 |
| kusto | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=kusto) | 60 | - | 40 |
| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 283 | - | 25 |
| markdown | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=markdown) | 118 | - | 78 |
| mermaid | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=mermaid) | 129 | - | 38 |
| nginx | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=nginx) | 378 | - | 4 |
| objective-cpp | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=objective-cpp) | 309 | - | 172 |
| php | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=php) | 1131 | - | 605 |
| po | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=po) | 23 | - | 336 |
| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 1013 | - | 164 |
| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 686 | - | 164 |
| ruby | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=ruby) | 1307 | - | 1 |
| shellscript | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=shellscript) | 148 | - | 56 |
| smalltalk | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=smalltalk) | 35 | - | 40 |
Expand All @@ -241,11 +244,8 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that
| Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff |
| ---------- | :------------------------------------------------------------------------- | ----------------: | --------------: | ---: |
| ada | ✅ OK | 201 | 1 | |
| wikitext | ✅ OK | 5217 | 86 | |
| asciidoc | ✅ OK | 4390 | 91 | |
| blade | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=blade) | 1124 | 2 | |
| rst | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=rst) | 1835 | 22 | 62 |
| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 2451 | 48 | 25 |
| powershell | ❌ Error | 87 | 1 | |
| wolfram | ❌ Error | 500 | 1 | 12 |
| mdx | ❌ Error | 193 | 4 | |
Expand All @@ -255,6 +255,6 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that
| apex | ❌ Error | 173 | 14 | 242 |
| haskell | ❌ Error | 136 | 21 | 12 |
| cpp | ❌ Error | 490 | 22 | 25 |
| julia | ❌ Error | 1143 | 27 | 49 |
| julia | ❌ Error | 1141 | 27 | 49 |
| csharp | ❌ Error | 276 | 33 | 232 |
| razor | ❌ Error | 922 | 35 | 26 |
13 changes: 13 additions & 0 deletions packages/shiki/test/dist.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { expect, it } from 'vitest'
// eslint-disable-next-line antfu/no-import-dist
import { createHighlighter } from '../dist/index.mjs'

it('should works', async () => {
const shiki = await createHighlighter({
themes: ['vitesse-light'],
langs: ['javascript'],
})

expect(shiki.codeToHtml('console.log', { lang: 'js', theme: 'vitesse-light' }))
.toMatchInlineSnapshot(`"<pre class="shiki vitesse-light" style="background-color:#ffffff;color:#393a34" tabindex="0"><code><span class="line"><span style="color:#B07D48">console</span><span style="color:#999999">.</span><span style="color:#B07D48">log</span></span></code></pre>"`)
})
28 changes: 14 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ catalog:
chalk: ^5.3.0
eslint: ^9.11.1
eslint-plugin-format: ^0.1.2
esno: ^4.7.0
esno: ^4.8.0
fast-glob: ^3.3.2
floating-vue: ^5.2.2
fs-extra: ^11.2.0
Expand Down Expand Up @@ -72,7 +72,7 @@ catalog:
simple-git-hooks: ^2.11.1
taze: ^0.17.2
tm-grammars: ^1.17.27
tm-themes: ^1.8.5
tm-themes: ^1.8.6
twoslash: ^0.2.12
twoslash-vue: ^0.2.12
typescript: ^5.6.2
Expand Down

0 comments on commit d6f4784

Please sign in to comment.