website/_dogfooding/_pages tests/markdown-tests-md.md
This file should be interpreted in a more CommonMark compliant way
<head>
<title>HEAD Markdown Page tests title</title>
<meta name="keywords" content="cooking, blog"/>
</head>
:::danger
TODO unsupported (yet), see issue
:::
Html comment: <!-- comment -->
Html comment multi-line:
<!-- comment --> <!-- prettier-ignore -->MDX comment:
MDX comment multi-line:
<!-- prettier-ignore -->{/* comment */}
import BrowserWindow from '@site/src/components/BrowserWindow';
<BrowserWindow>BrowserWindow content
</BrowserWindow>export const answer = 42;
Test {xyz}
Admonitions still work
:::note[title]
note
:::
Our custom Details/Summary also works in CommonMark mode
</details>:::danger
TODO unsupported (yet), see issue
:::
function Clock(props) {
const [date, setDate] = useState(new Date());
useEffect(() => {
var timerID = setInterval(() => tick(), 1000);
return function cleanup() {
clearInterval(timerID);
};
});
function tick() {
setDate(new Date());
}
return (
<div>
<h2>It is {date.toLocaleTimeString()}.</h2>
// highlight-start
long long long long long long long long long long long long line
// highlight-end
</div>
);
}
function Clock(props) {
const [date, setDate] = useState(new Date());
useEffect(() => {
var timerID = setInterval(() => tick(), 1000);
return function cleanup() {
clearInterval(timerID);
};
});
function tick() {
setDate(new Date());
}
return (
<div>
<h2>It is {date.toLocaleTimeString()}.</h2>
</div>
);
}
:::danger
TODO unsupported (yet), see issue
:::
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Health check
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts
prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
Custom heading syntax {#custom-heading-id} still works
<span style="color: blue;">blue span</span>
<p style="color: green;">green p</p><button style="color: red;">red button</button>
<div style="border: solid; background-color: grey; color: lime; padding: 10px"> lime <span style="color: red; margin: 10px;">red</span> </div><p>
When pressing this button, no alert should be printed
<button onClick="alert('unsafe');">Click me</button>
</p>