Skip to content

Commit 80047ac

Browse files
committed
expandable
1 parent adc23dc commit 80047ac

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

code.mdx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,9 @@ sayHello();
253253
````
254254

255255
## Expandable
256-
TODO: - expandable `boolean`
257-
If you have a long code block and `[expandable]` after your title to make it close and expand.
256+
Allow users to expand and collapse long code blocks using `expandable`.
258257

259-
```python library.py [expandable]
258+
```python Expandable Example expandable
260259
from datetime import datetime, timedelta
261260
from typing import Dict, List, Optional
262261
from dataclasses import dataclass
@@ -347,12 +346,15 @@ if __name__ == "__main__":
347346
```
348347

349348
````md
350-
```javascript Expandable Example [expandable]
351-
const greeting = "Hello, World!";
352-
function sayHello() {
353-
console.log(greeting);
354-
}
355-
sayHello();
349+
```python Expandable Example expandable
350+
from datetime import datetime, timedelta
351+
from typing import Dict, List, Optional
352+
from dataclasses import dataclass
353+
354+
# ...
355+
356+
if __name__ == "__main__":
357+
main()
356358
```
357359
````
358360

0 commit comments

Comments
 (0)