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
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ 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
+
<Info>
12
+
This is acallout
13
+
</Info>
14
+
11
15
### Inline code
12
16
13
17
To denote a `word` or `phrase` as code, enclose it in backticks (\`).
@@ -22,7 +26,7 @@ Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-c
22
26
23
27
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
28
25
-
```java HelloWorld.javalines icon="java"
29
+
```java HelloWorld.java icon=java lines
26
30
classHelloWorld {
27
31
publicstaticvoidmain(String[] args) {
28
32
System.out.println("Hello, World!");
@@ -95,7 +99,7 @@ const hello = "world";
95
99
96
100
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
101
98
-
```javascript icon="square-js"
102
+
```javascript icon=square-js
99
103
consthello="world";
100
104
```
101
105
@@ -109,7 +113,7 @@ const hello = "world";
109
113
110
114
Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight.
111
115
112
-
```javascript Line Highlighting Example highlight= {1-2,5}
116
+
```javascript Line Highlighting Example {1,2,5}
113
117
constgreeting="Hello, World!";
114
118
functionsayHello() {
115
119
console.log(greeting);
@@ -131,7 +135,7 @@ sayHello();
131
135
132
136
Focus on specific lines in your code blocks using `focus` with line numbers or ranges.
133
137
134
-
```javascript Line Focus Example focus= {2,4-5}
138
+
```javascript Line Focus Example focus=2,4,5
135
139
constgreeting="Hello, World!";
136
140
functionsayHello() {
137
141
console.log(greeting);
@@ -304,7 +308,7 @@ sayHello();
304
308
305
309
Add single line comments with `[!code ++]` and `[!code --]` to mark added and removed lines. You can also mark multiple lines with a single comment, such as `[!code ++:3]` or `[!code --:5]`.
0 commit comments