Skip to content

Commit adc23dc

Browse files
committed
showLineNumbers
1 parent 666adcf commit adc23dc

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

code.mdx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const hello = "world";
192192
## Line Highlighting
193193
Highlight specific lines in your code blocks using `highlight` with the line numbers or ranges you want to highlight.
194194

195-
```javascript Line Highlighting Example {1,3-5}
195+
```javascript Line Highlighting Example highlight={1,3-5}
196196
const greeting = "Hello, World!";
197197
function sayHello() {
198198
console.log(greeting);
@@ -201,7 +201,7 @@ sayHello();
201201
```
202202

203203
````md
204-
```javascript Line Highlighting Example {1,3-5}
204+
```javascript Line Highlighting Example highlight={1,3-5}
205205
const greeting = "Hello, World!";
206206
function sayHello() {
207207
console.log(greeting);
@@ -213,7 +213,7 @@ sayHello();
213213
## Line focusing
214214
Focus on specific lines in your code blocks using `focus` with line numbers or ranges.
215215

216-
```javascript Line Focus Example {2,4-5}
216+
```javascript Line Focus Example focus={2,4-5}
217217
const greeting = "Hello, World!";
218218
function sayHello() {
219219
console.log(greeting);
@@ -222,7 +222,7 @@ sayHello();
222222
```
223223

224224
````md
225-
```javascript Line Focus Example {2,4-5}
225+
```javascript Line Focus Example focus={2,4-5}
226226
const greeting = "Hello, World!";
227227
function sayHello() {
228228
console.log(greeting);
@@ -232,7 +232,25 @@ sayHello();
232232
````
233233

234234
## Show line numbers
235-
TODO: - showLineNumbers `boolean`
235+
Display line numbers on the left side of your code block using `showLineNumbers`.
236+
237+
```javascript Show Line Numbers Example showLineNumbers
238+
const greeting = "Hello, World!";
239+
function sayHello() {
240+
console.log(greeting);
241+
}
242+
sayHello();
243+
```
244+
245+
````md
246+
```javascript Show Line Numbers Example showLineNumbers
247+
const greeting = "Hello, World!";
248+
function sayHello() {
249+
console.log(greeting);
250+
}
251+
sayHello();
252+
```
253+
````
236254

237255
## Expandable
238256
TODO: - expandable `boolean`

0 commit comments

Comments
 (0)