Skip to content

Commit

Permalink
feat: new regexp grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 18, 2024
1 parent ed31ee5 commit 8ea8513
Show file tree
Hide file tree
Showing 8 changed files with 588 additions and 677 deletions.
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@iconify-json/svg-spinners": "^1.1.2",
"@shikijs/transformers": "workspace:*",
"@shikijs/twoslash": "workspace:*",
"@unocss/reset": "^0.59.4",
"@unocss/reset": "^0.60.2",
"@vueuse/core": "^10.9.0",
"floating-vue": "^5.2.2",
"pinia": "^2.1.7",
"shiki": "workspace:*",
"unocss": "^0.59.4",
"unocss": "^0.60.2",
"unplugin-vue-components": "^0.27.0",
"vitepress": "^1.1.4",
"vitepress": "^1.2.0",
"vue": "^3.4.27"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^2.18.0",
"@antfu/eslint-config": "^2.18.1",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.8",
"@rollup/plugin-alias": "^5.1.0",
Expand All @@ -34,7 +34,7 @@
"@vitest/coverage-v8": "^1.6.0",
"ansi-sequence-parser": "^1.1.1",
"bumpp": "^9.4.1",
"eslint": "^9.2.0",
"eslint": "^9.3.0",
"eslint-plugin-format": "^0.1.1",
"esno": "^4.7.0",
"fast-glob": "^3.3.2",
Expand All @@ -51,7 +51,7 @@
"rimraf": "^5.0.7",
"rollup": "^4.17.2",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-typescript2": "^0.36.0",
"shiki": "workspace:*",
Expand All @@ -63,8 +63,8 @@
"vite-tsconfig-paths": "^4.3.2",
"vitepress-plugin-mermaid": "^2.0.16",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.17",
"wrangler": "^3.55.0"
"vue-tsc": "^2.0.19",
"wrangler": "^3.57.0"
},
"resolutions": {
"@shikijs/compat": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@shikijs/core": "workspace:*"
},
"devDependencies": {
"tm-grammars": "^1.11.3",
"tm-grammars": "^1.12.1",
"tm-themes": "^1.4.3",
"vscode-oniguruma": "^1.7.0"
}
Expand Down
10 changes: 10 additions & 0 deletions packages/shiki/src/assets/langs-bundle-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,14 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
'name': 'Windows Registry Script',
'import': (() => import('./langs/reg')) as DynamicImportLanguageRegistration
},
{
'id': 'regexp',
'name': 'RegExp',
'aliases': [
'regex'
],
'import': (() => import('./langs/regexp')) as DynamicImportLanguageRegistration
},
{
'id': 'rel',
'name': 'Rel',
Expand Down Expand Up @@ -1427,6 +1435,8 @@ export type BundledLanguage =
| 'razor'
| 'rb'
| 'reg'
| 'regex'
| 'regexp'
| 'rel'
| 'riscv'
| 'rs'
Expand Down
2 changes: 1 addition & 1 deletion packages/shiki/test/bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ it('bundle-full', async () => {
}))

expect(highlighter.getLoadedLanguages().length)
.toMatchInlineSnapshot(`291`)
.toMatchInlineSnapshot(`293`)
})

it('bundle-web', async () => {
Expand Down

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

2 changes: 1 addition & 1 deletion packages/twoslash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.33",
"@iconify-json/codicon": "^1.1.48",
"@iconify-json/codicon": "^1.1.49",
"@shikijs/twoslash": "^3.1.2",
"hast-util-from-html": "^2.0.1",
"typescript": "^5.4.5"
Expand Down
Loading

0 comments on commit 8ea8513

Please sign in to comment.