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
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,11 @@ icon: "code"
8
8
9
9
You can add inline code snippets or code blocks. Code blocks support meta options for syntax highlighting, titles, line highlighting, icons, and more.
10
10
11
+
<Check>
12
+
Test\
13
+
hththth
14
+
</Check>
15
+
11
16
### Inline code
12
17
13
18
To denote a `word` or `phrase` as code, enclose it in backticks (\`).
@@ -22,7 +27,7 @@ Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-c
22
27
23
28
Specify the programming language for syntax highlighting and to enable meta options. Add any meta options, like a title or icon, after the language.
24
29
25
-
```java HelloWorld.javalines icon="java"
30
+
```java HelloWorld.java icon=java lines
26
31
classHelloWorld {
27
32
publicstaticvoidmain(String[] args) {
28
33
System.out.println("Hello, World!");
@@ -95,7 +100,7 @@ const hello = "world";
95
100
96
101
Add an icon to your code block. You can use [FontAwesome](https://fontawesome.com/icons) icons, [Lucide](https://lucide.dev/icons/) icons, or absolute URLs.
97
102
98
-
```javascript icon="square-js"
103
+
```javascript icon=square-js
99
104
consthello="world";
100
105
```
101
106
@@ -109,7 +114,7 @@ const hello = "world";
109
114
110
115
Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight.
111
116
112
-
```javascript Line Highlighting Example highlight= {1-2,5}
117
+
```javascript Line Highlighting Example {1,2,5}
113
118
constgreeting="Hello, World!";
114
119
functionsayHello() {
115
120
console.log(greeting);
@@ -131,7 +136,7 @@ sayHello();
131
136
132
137
Focus on specific lines in your code blocks using `focus` with line numbers or ranges.
133
138
134
-
```javascript Line Focus Example focus= {2,4-5}
139
+
```javascript Line Focus Example focus=2,4,5
135
140
constgreeting="Hello, World!";
136
141
functionsayHello() {
137
142
console.log(greeting);
@@ -316,7 +321,7 @@ For multiple consecutive lines, specify the number of lines after a colon:
316
321
317
322
The comment syntax must match your programming language (for example, `//` for JavaScript or `#` for Python).
0 commit comments