File tree Expand file tree Collapse file tree 2 files changed +12
-39
lines changed
docs/pages/experiments/docs Expand file tree Collapse file tree 2 files changed +12
-39
lines changed Original file line number Diff line number Diff line change @@ -110,31 +110,6 @@ It says, "You will fail if you don't heed this dire warning."
110
110
:::
111
111
```
112
112
113
- ## Empty
114
-
115
- Should not be used, here just to ensure forgetting the token is not a big deal.
116
-
117
- :::
118
- This is a callout.
119
- It says, "You will fail if you don't heed this dire warning."
120
-
121
- - emphasised: ** bold text**
122
- - some code ` <div/> `
123
- - a [ link] ( #link ) .
124
-
125
- :::
126
-
127
- ``` markup
128
- :::
129
- This is a callout.
130
- It says, "You will fail if you don't heed this dire warning."
131
-
132
- - emphasised: **bold text**
133
- - some code `<div/>`
134
- - a [link](#link).
135
- :::
136
- ```
137
-
138
113
## With code
139
114
140
115
::: info
Original file line number Diff line number Diff line change @@ -458,22 +458,20 @@ function createRender(context) {
458
458
}
459
459
return undefined ;
460
460
} ,
461
-
462
461
renderer ( token ) {
463
- return `<aside class="MuiCallout-root MuiCallout-${ token . severity } ">
464
- ${
465
- [ 'info' , 'success' , 'warning' , 'error' ] . includes ( token . severity )
466
- ? [
467
- '<div class="MuiCallout-icon-container">' ,
468
- '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="ContentCopyRoundedIcon">' ,
469
- `<use class="MuiCode-copied-icon" xlink:href="#${ token . severity } -icon" />` ,
470
- '</svg>' ,
471
- '</div>' ,
472
- ] . join ( '\n' )
473
- : ''
462
+ if ( ! [ 'info' , 'success' , 'warning' , 'error' ] . includes ( token . severity ) ) {
463
+ throw new Error ( `docs-infra: Callout :::${ token . severity } is not supported` ) ;
474
464
}
475
- <div class="MuiCallout-content">
476
- ${ this . parser . parse ( token . tokens ) } \n</div></aside>` ;
465
+
466
+ return `<aside class="MuiCallout-root MuiCallout-${ token . severity } ">${ [
467
+ '<div class="MuiCallout-icon-container">' ,
468
+ '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="ContentCopyRoundedIcon">' ,
469
+ `<use class="MuiCode-copied-icon" xlink:href="#${ token . severity } -icon" />` ,
470
+ '</svg>' ,
471
+ '</div>' ,
472
+ ] . join (
473
+ '\n' ,
474
+ ) } <div class="MuiCallout-content">${ this . parser . parse ( token . tokens ) } </div></aside>`;
477
475
} ,
478
476
} ,
479
477
] ,
You can’t perform that action at this time.
0 commit comments