# Markdown example document

This file shows most of what the Xorbin Markdown editor and viewer can render. Open it with **Open file**, or paste its text, and compare the result with the source.

> **Tip:** switch between *Write*, *Split* and *Preview* to see the text and the result side by side.

## Text formatting

You can write **bold**, *italic*, ***bold and italic***, ~~strikethrough~~ and `inline code`. A [link with a title](https://xorbin.com "Xorbin") and an automatic link like https://example.com both work.

A line that ends with two spaces  
continues on a new line, while a blank line starts a new paragraph.

Escape a symbol with a backslash: \*not italic\*, \# not a heading.

Raw HTML is allowed but cleaned: press <kbd>Ctrl</kbd> + <kbd>S</kbd>, or <mark>highlight</mark> something. H<sub>2</sub>O and x<sup>2</sup> work too.

---

## Lists

### Bulleted and nested

- Fruit
  - Apples
  - Pears
    - Williams
    - Conference
- Vegetables
- Bread

### Numbered

1. Write the text
2. Check the preview
3. Copy or export it
   1. Copy as rich text
   2. Download a `.md` or `.html` file

### Task list

- [x] Open the editor
- [x] Paste some Markdown
- [ ] Share the link
- [ ] Export a PDF

## Table

| Format         | Copy | Export | Notes                    |
| -------------- | :--: | -----: | ------------------------ |
| Rich text      | Yes  |      – | Google Docs, Word, Gmail |
| HTML code      | Yes  |  .html | Clean, no page wrapper   |
| Markdown       | Yes  |    .md | The text you typed       |

Columns can be aligned left (default), centered (`:--:`) or right (`--:`).

## Code

Inline code looks like `const total = price * quantity;` and blocks are fenced with three backticks:

```js
// JavaScript
function greet(name) {
  return `Hello, ${name}!`;
}

console.log(greet("Markdown"));
```

```python
# Python
def fizzbuzz(n):
    for i in range(1, n + 1):
        print("FizzBuzz" if i % 15 == 0 else "Fizz" if i % 3 == 0 else "Buzz" if i % 5 == 0 else i)
```

```bash
# Shell
printf 'hello' | sha256sum
```

Code blocks are shown in monospace without syntax colours.

## Quotes

> A quote can span several lines
> and contain **formatting**.
>
> > Quotes can also be nested.

## Footnotes and details

Markdown was created by John Gruber in 2004.[^1] Footnotes are collected at the bottom of the page and link back to the text.[^note]

<details>
<summary>Click to expand</summary>

Hidden text goes here. It can contain **Markdown** too.

</details>

## What is not supported (yet)

- Math (LaTeX), such as `$x^2$`
- Diagrams, such as Mermaid
- Emoji shortcodes, such as `:smile:`
- Syntax colours in code blocks
- Images that point to a file next to the document (`./pic.png`); images with a full `https://` address do load

[^1]: Gruber wrote the first version together with Aaron Swartz.
[^note]: This is a second footnote, with a [link](https://xorbin.com).
