You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code.mdx
+101-6Lines changed: 101 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Code"
3
3
description: "Display inline code and code blocks"
4
-
icon: 'code'
4
+
icon: "code"
5
5
---
6
6
7
7
## Basic
@@ -14,8 +14,6 @@ To denote a `word` or `phrase` as code, enclose it in backticks (\`).
14
14
To denote a `word` or `phrase` as code, enclose it in backticks (`).
15
15
```
16
16
17
-
18
-
19
17
### Code Block
20
18
21
19
Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language.
@@ -40,9 +38,7 @@ class HelloWorld {
40
38
41
39
## Syntax Highlighting
42
40
43
-
Put the name of your programming language after the three backticks to get syntax highlighting.
44
-
45
-
We use [Prism](https://prismjs.com/#supported-languages) for syntax highlighting. [Test Drive Prism](https://prismjs.com/test.html#language=markup) lists all the languages supported.
41
+
Enable syntax highlighting by adding the language name after the opening backticks of a code snippet.
46
42
47
43
```java
48
44
classHelloWorld {
@@ -62,6 +58,105 @@ class HelloWorld {
62
58
```
63
59
````
64
60
61
+
### Languages
62
+
63
+
We use [Shiki](https://shiki.style/languages) for syntax highlighting and support these languages using standard markdown syntax:
0 commit comments