A tour of the Markdown features
This post exists to show off formatting. If something here looks wrong, the styles or the parser need work.
Inline formatting
You can write bold, italic, both, strikethrough and inline code. Escape characters with a backslash: *not italic*. Links look like this one to the PHP manual, a relative link, or a bare URL: https://example.com/a_b_c?x=1&y=2.
Two trailing spaces force a line break,
like this.
Snake_case_words are safe
Words_with_underscores don't turn italic, and 2 * 3 * 4 doesn't either.
Lists
Unordered, with nesting:
- Fruit
- Apples
- Pears
- Vegetables
- Anything else
Ordered, starting somewhere other than one:
- Third
- Fourth
- Fifth
A task list:
- Write the parser
- Write the styles
- Build the CMS
Code
Fenced blocks keep their language for later highlighting:
<?php
declare(strict_types=1);
function greet(string $name): string
{
return "Hello, {$name}!"; // <b>not</b> interpreted as HTML
}
const total = [1, 2, 3].reduce((a, b) => a + b, 0);
console.log(`total: ${total}`);
Tables
| Module | Storage | Notes |
|---|---|---|
| tierlist | SQLite | per-user lists |
| randomizer | files | 426 MusicXML files |
| blog | .md | this very blog |
Quotes and rules
Programs must be written for people to read, and only incidentally for machines to execute.
— Abelson & Sussman
Images
Safety
Raw HTML is shown as text, never run: <script>alert('hi')</script>. Dangerous links such as this one are neutralised.