@@ -21,7 +21,7 @@ import { codeToHtml } from 'shiki'
21
21
22
22
const html = codeToHtml('console.log("Hello World")', {
23
23
lang: 'text', // [!code hl]
24
- theme: 'vitesse-light',
24
+ theme: 'vitesse-light',
25
25
})
26
26
```
27
27
@@ -32,22 +32,15 @@ const html = codeToHtml('console.log("Hello World")', {
32
32
A special processed language ` ansi ` is provided to highlight terminal outputs. For example:
33
33
34
34
``` ansi
35
- [0;90m┌[0m [0;36;1mWelcome to VitePress![0m[0m
36
- [0;90m│[0m[0m
37
- [0;32m◇[0m Where should VitePress initialize the config?[0m
38
- [0;90m│[0m [0;2m./docs[0m[0m
39
- [0;90m│[0m[0m
40
- [0;32m◇[0m Site title:[0m
41
- [0;90m│[0m [0;2mMy Awesome Project[0m[0m
42
- [0;90m│[0m[0m
43
- [0;32m◇[0m Site description:[0m
44
- [0;90m│[0m [0;2mA VitePress Site[0m[0m
45
- [0;90m│[0m[0m
46
- [0;36m◆[0m Theme:[0m
47
- [0;36m│[0m [0;32m●[0m Default Theme [0;2m(Out of the box, good-looking docs)[0m[0m
48
- [0;36m│[0m [0;2m○[0m [0;2mDefault Theme + Customization[0m[0m
49
- [0;36m│[0m [0;2m○[0m [0;2mCustom Theme[0m[0m
50
- [0;36m└[0m
35
+ [0;32mcolored foreground[0m
36
+ [0;42mcolored background[0m
37
+
38
+ [0;1mbold text[0m
39
+ [0;2mdimmed text[0m
40
+ [0;4munderlined text[0m
41
+ [0;7mreversed text[0m
42
+ [0;9mstrikethrough text[0m
43
+ [0;4;9munderlined + strikethrough text[0m
51
44
```
52
45
53
46
Check the [ raw markdown of code snippet above] ( https://github.com/shikijs/shiki/blob/main/docs/languages.md?plain=1#L35 ) .
0 commit comments