Skip to content

Commit d6f4784

Browse files
committed
docs: update grammar report
1 parent 0c5a51a commit d6f4784

4 files changed

Lines changed: 45 additions & 32 deletions

File tree

docs/references/engine-js-compat.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

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

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

2020
## Supported Languages
2121

@@ -31,8 +31,9 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
3131
| apl | ✅ OK | 917 | - | |
3232
| applescript | ✅ OK | 152 | - | |
3333
| ara | ✅ OK | 54 | - | |
34+
| asciidoc | ✅ OK | 262 | - | |
3435
| asm | ✅ OK | 297 | - | |
35-
| astro | ✅ OK | 1090 | - | |
36+
| astro | ✅ OK | 613 | - | |
3637
| awk | ✅ OK | 36 | - | |
3738
| ballerina | ✅ OK | 230 | - | |
3839
| bat | ✅ OK | 58 | - | |
@@ -86,6 +87,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
8687
| graphql | ✅ OK | 448 | - | |
8788
| groovy | ✅ OK | 133 | - | |
8889
| hack | ✅ OK | 948 | - | |
90+
| haml | ✅ OK | 562 | - | |
8991
| handlebars | ✅ OK | 699 | - | |
9092
| haxe | ✅ OK | 174 | - | |
9193
| hcl | ✅ OK | 67 | - | |
@@ -141,7 +143,7 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
141143
| qml | ✅ OK | 408 | - | |
142144
| qmldir | ✅ OK | 7 | - | |
143145
| qss | ✅ OK | 31 | - | |
144-
| r | ✅ OK | 73 | - | |
146+
| r | ✅ OK | 71 | - | |
145147
| racket | ✅ OK | 69 | - | |
146148
| raku | ✅ OK | 52 | - | |
147149
| reg | ✅ OK | 9 | - | |
@@ -162,14 +164,14 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
162164
| sql | ✅ OK | 67 | - | |
163165
| ssh-config | ✅ OK | 12 | - | |
164166
| stylus | ✅ OK | 107 | - | |
165-
| svelte | ✅ OK | 1491 | - | |
167+
| svelte | ✅ OK | 636 | - | |
166168
| system-verilog | ✅ OK | 102 | - | |
167169
| systemd | ✅ OK | 32 | - | |
168170
| tasl | ✅ OK | 23 | - | |
169171
| tcl | ✅ OK | 34 | - | |
170172
| templ | ✅ OK | 673 | - | |
171173
| terraform | ✅ OK | 68 | - | |
172-
| tex | ✅ OK | 108 | - | |
174+
| tex | ✅ OK | 106 | - | |
173175
| toml | ✅ OK | 44 | - | |
174176
| ts-tags | ✅ OK | 997 | - | |
175177
| tsv | ✅ OK | 1 | - | |
@@ -185,12 +187,13 @@ In some edge cases, it's not guaranteed that the the highlight will be 100% the
185187
| verilog | ✅ OK | 33 | - | |
186188
| vhdl | ✅ OK | 82 | - | |
187189
| viml | ✅ OK | 72 | - | |
188-
| vue | ✅ OK | 1597 | - | |
189-
| vue-html | ✅ OK | 1620 | - | |
190+
| vue | ✅ OK | 692 | - | |
191+
| vue-html | ✅ OK | 716 | - | |
190192
| vyper | ✅ OK | 238 | - | |
191193
| wasm | ✅ OK | 78 | - | |
192194
| wenyan | ✅ OK | 18 | - | |
193195
| wgsl | ✅ OK | 44 | - | |
196+
| wikitext | ✅ OK | 104 | - | |
194197
| xml | ✅ OK | 169 | - | |
195198
| xsl | ✅ OK | 171 | - | |
196199
| yaml | ✅ OK | 48 | - | |
@@ -218,15 +221,15 @@ Languages that does not throw with the JavaScript RegExp engine, but will produc
218221
| elixir | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=elixir) | 708 | - | 179 |
219222
| erlang | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=erlang) | 147 | - | 470 |
220223
| glsl | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=glsl) | 186 | - | 306 |
221-
| haml | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=haml) | 1612 | - | 48 |
222224
| kusto | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=kusto) | 60 | - | 40 |
225+
| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 283 | - | 25 |
223226
| markdown | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=markdown) | 118 | - | 78 |
224227
| mermaid | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=mermaid) | 129 | - | 38 |
225228
| nginx | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=nginx) | 378 | - | 4 |
226229
| objective-cpp | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=objective-cpp) | 309 | - | 172 |
227230
| php | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=php) | 1131 | - | 605 |
228231
| po | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=po) | 23 | - | 336 |
229-
| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 1013 | - | 164 |
232+
| pug | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=pug) | 686 | - | 164 |
230233
| ruby | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=ruby) | 1307 | - | 1 |
231234
| shellscript | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=shellscript) | 148 | - | 56 |
232235
| smalltalk | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=smalltalk) | 35 | - | 40 |
@@ -241,11 +244,8 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that
241244
| Language | Highlight Match | Patterns Parsable | Patterns Failed | Diff |
242245
| ---------- | :------------------------------------------------------------------------- | ----------------: | --------------: | ---: |
243246
| ada | ✅ OK | 201 | 1 | |
244-
| wikitext | ✅ OK | 5217 | 86 | |
245-
| asciidoc | ✅ OK | 4390 | 91 | |
246247
| blade | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=blade) | 1124 | 2 | |
247248
| rst | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=rst) | 1835 | 22 | 62 |
248-
| latex | [🚧 Mismatch](https://textmate-grammars-themes.netlify.app/?grammar=latex) | 2451 | 48 | 25 |
249249
| powershell | ❌ Error | 87 | 1 | |
250250
| wolfram | ❌ Error | 500 | 1 | 12 |
251251
| mdx | ❌ Error | 193 | 4 | |
@@ -255,6 +255,6 @@ Languages that throws with the JavaScript RegExp engine (contains syntaxes that
255255
| apex | ❌ Error | 173 | 14 | 242 |
256256
| haskell | ❌ Error | 136 | 21 | 12 |
257257
| cpp | ❌ Error | 490 | 22 | 25 |
258-
| julia | ❌ Error | 1143 | 27 | 49 |
258+
| julia | ❌ Error | 1141 | 27 | 49 |
259259
| csharp | ❌ Error | 276 | 33 | 232 |
260260
| razor | ❌ Error | 922 | 35 | 26 |

packages/shiki/test/dist.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { expect, it } from 'vitest'
2+
// eslint-disable-next-line antfu/no-import-dist
3+
import { createHighlighter } from '../dist/index.mjs'
4+
5+
it('should works', async () => {
6+
const shiki = await createHighlighter({
7+
themes: ['vitesse-light'],
8+
langs: ['javascript'],
9+
})
10+
11+
expect(shiki.codeToHtml('console.log', { lang: 'js', theme: 'vitesse-light' }))
12+
.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>"`)
13+
})

pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ catalog:
3535
chalk: ^5.3.0
3636
eslint: ^9.11.1
3737
eslint-plugin-format: ^0.1.2
38-
esno: ^4.7.0
38+
esno: ^4.8.0
3939
fast-glob: ^3.3.2
4040
floating-vue: ^5.2.2
4141
fs-extra: ^11.2.0
@@ -72,7 +72,7 @@ catalog:
7272
simple-git-hooks: ^2.11.1
7373
taze: ^0.17.2
7474
tm-grammars: ^1.17.27
75-
tm-themes: ^1.8.5
75+
tm-themes: ^1.8.6
7676
twoslash: ^0.2.12
7777
twoslash-vue: ^0.2.12
7878
typescript: ^5.6.2

0 commit comments

Comments
 (0)