File tree Expand file tree Collapse file tree 2 files changed +53
-17
lines changed
docs/guides/markdown-features Expand file tree Collapse file tree 2 files changed +53
-17
lines changed Original file line number Diff line number Diff line change @@ -246,25 +246,13 @@ Admonition alias `:::important` should have Important title
246
246
247
247
:::
248
248
249
- ::::info Nested Admonitions
250
-
251
- Admonitions can be easily nested.
252
-
253
- :::danger Child Admonition
254
-
255
- Foo Bar
256
-
257
- :::
258
-
259
- ::::
260
-
261
- :::::note Your title
249
+ :::::note title
262
250
263
251
Some ** content** with _ Markdown_ ` syntax ` .
264
252
265
- ::::note Your nested Title
253
+ ::::note nested Title
266
254
267
- :::note Your very nested Title (does not work yet : s )
255
+ :::tip very nested Title
268
256
269
257
Some ** content** with _ Markdown_ ` syntax ` .
270
258
278
266
279
267
:::::
280
268
281
- hello
269
+ after admonition
Original file line number Diff line number Diff line change @@ -129,6 +129,54 @@ Some **content** with _Markdown_ `syntax`.
129
129
</BrowserWindow>
130
130
```
131
131
132
+ ## Nested admonitions { #nested - admonitions }
133
+
134
+ Admonitions can be nested. Use more colons `:` for each parent admonition level.
135
+
136
+ ```md
137
+ :::::info Parent
138
+
139
+ Parent content
140
+
141
+ ::::danger Child
142
+
143
+ Child content
144
+
145
+ :::tip Deep Child
146
+
147
+ Deep child content
148
+
149
+ :::
150
+
151
+ ::::
152
+
153
+ :::::
154
+ ```
155
+
156
+ ```mdx-code-block
157
+ <BrowserWindow>
158
+
159
+ :::::info Parent
160
+
161
+ Parent content
162
+
163
+ ::::danger Child
164
+
165
+ Child content
166
+
167
+ :::tip Deep Child
168
+
169
+ Deep child content
170
+
171
+ :::
172
+
173
+ ::::
174
+
175
+ :::::
176
+
177
+ </BrowserWindow>
178
+ ```
179
+
132
180
## Admonitions with MDX { #admonitions - with - mdx }
133
181
134
182
You can use MDX inside admonitions too!
@@ -308,7 +356,7 @@ const AdmonitionTypes = {
308
356
};
309
357
310
358
export default AdmonitionTypes ;
311
- ````
359
+ ```
312
360
313
361
Now you can use your new admonition keyword in a Markdown file, and it will be parsed and rendered with your custom logic:
314
362
You can’t perform that action at this time.
0 commit comments