title: Markdown rendering test page purpose: every feature of the rendered view, for trying it by hand #
Markdown rendering test page #
Open this file in code-browser and press Render (⇧⌘V). Each section exercises one part of the rendered view, and the Outline lists them all. Compare this commit with the one before it to see changed blocks.
Text and inline markup #
Plain text with emphasis, strong, struck, inline code, a
⌘K chord, H2O and x2.
A blockquote, with a second line that continues it.
Lists #
- An item
- Another, with a nested list
- nested one
- nested two
- A third
- First
- Second
- Third
Tasks:
Table #
| Feature | Where it runs | Status |
|---|---|---|
| Markdown | VM | done |
| Math | VM | done |
| Mermaid | VM (svgdom) | prototype |
Code #
// Highlighted with the viewer's own colours.
export function greet(name: string): string {
return `Hello, ${name}`
}
echo "costs $5 and $10" # dollars in code are not math
Links #
- Relative link to the architecture doc
- Anchor to the Math section
- External link opens in your browser
- [A javascript: link](javascript:alert(1)) is not followed
Images #
A repository image (loads from git):
A remote image on the allow-list (raw.githubusercontent.com is a default):
Remote images off the allow-list (blocked, with "Allow host"):
Math #
Inline: the energy is $E = mc^2$, and $\sqrt{a^2 + b^2}$ is a length. Prices stay text: it costs $5 and $10.
Display, on its own lines:
$$ \int_0^1 x^2 , dx = \frac{1}{3} $$
One line: $$\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$$
As a fence:
\begin{pmatrix} a & b \\ c & d \end{pmatrix}
\begin{pmatrix} x \\ y \end{pmatrix}
=
\begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}
Macros that could link or style are off: $\href{https://example.com}{x}$
Mermaid #
Flowchart #
Sequence #
Class #
State #
Entity relationship #
Gantt #
Pie #
gitGraph (rough) #
Mindmap #
Architecture #
A syntax error (stays code) #
graph LR a --> ((
HTML #
Allowed HTML: details and summary
This renders, with every attribute except the allowed few stripped.
A centred paragraph, from align="center".
Blocked HTML shows as source: