Skip to content

Commit 4b80879

Browse files
committed
Add some more grammars for syntax highlighting
1 parent ddfb9c9 commit 4b80879

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

generate/pipeline/article.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
import assert from 'node:assert/strict'
77
import fs from 'node:fs/promises'
88
import {fileURLToPath} from 'node:url'
9+
import etc from '@wooorm/starry-night/etc'
910
import sourceGitignore from '@wooorm/starry-night/source.gitignore'
11+
import sourceRegexpExtended from '@wooorm/starry-night/source.regexp.extended'
12+
import sourceRegexpPosix from '@wooorm/starry-night/source.regexp.posix'
13+
import sourceRegexp from '@wooorm/starry-night/source.regexp'
14+
import sourceSy from '@wooorm/starry-night/source.sy'
1015
import sourceTsx from '@wooorm/starry-night/source.tsx'
1116
import {common} from '@wooorm/starry-night'
1217
import remarkFrontmatter from 'remark-frontmatter'
@@ -79,7 +84,16 @@ export const article = unified()
7984
.use(rehypeRaw)
8085
.use(rehypeInferReadingTimeMeta)
8186
.use(rehypeStarryNight, {
82-
grammars: [...common, sourceGitignore, sourceTsx],
87+
grammars: [
88+
...common,
89+
etc,
90+
sourceGitignore,
91+
sourceRegexpExtended,
92+
sourceRegexpPosix,
93+
sourceRegexp,
94+
sourceSy,
95+
sourceTsx
96+
],
8397
plainText: ['txt']
8498
})
8599
.use(rehypeTwoslash, {twoslash: {compilerOptions: commandLine.options}})

0 commit comments

Comments
 (0)