Markdown .md tests
This file should be interpreted in a more CommonMark compliant way
SEO
<head>
<title>HEAD Markdown Page tests title</title>
<meta name="keywords" content="cooking, blog"/>
</head>
위험
TODO unsupported (yet), see issue
Comment
Html comment:
Html comment multi-line:
MDX comment: {/* comment */}
MDX comment multi-line:
{/* comment */}
JSX syntax
import BrowserWindow from '@site/src/components/BrowserWindow';
BrowserWindow content
export const answer = 42;
Test {xyz}
Admonition
Admonitions still work
title
note
Details
MD Summary
Our custom Details/Summary also works in CommonMark mode
Tab
위험
TODO unsupported (yet), see issue
Code block test
Title
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>
{/* prettier-ignore */}
long long long long long long long long long long long long line
{/* prettier-ignore */}
</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>
);
}
위험
TODO unsupported (yet), see issue
Mermaid
Heading Id
Custom heading syntax {#custom-heading-id}
still works
HTML
Styling
blue span
green p
lime red
Embeds
Closed image tag:
Unclosed image tag:
Iframe
Security
<p>
When pressing this button, no alert should be printed
<button onClick="alert('unsafe');">Click me</button>
</p>
When pressing this button, no alert should be printed