Skip to content

Syntax Reference

This page documents the Markdown syntax that AlienMark currently supports.

Headings

AlienMark supports ATX headings from level 1 to level 4.

Input:

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

Output:

<h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4>

Lines that start with five or more # markers are treated as normal paragraphs.

Paragraphs

Non-empty lines that do not match a block syntax are grouped into paragraphs. Consecutive lines are joined with spaces.

Input:

This is the first line
and this is the second line.

Output:

<p>This is the first line and this is the second line.</p>

Strong Emphasis

Double asterisks or double underscores create strong emphasis.

Input:

Use **bold** and __also bold__ text.

Output:

<p>Use <strong>bold</strong> and <strong>also bold</strong> text.</p>

Emphasis

Single * and _ create emphasis.

Input:

Use *italic* and _also italic_.

Output:

<p>Use <em>italic</em> and <em>also italic</em>.</p>

Inline Code

Backticks create inline code.

Input:

Use `const answer = 42`.

Output:

<p>Use <code>const answer = 42</code>.</p>

AlienMark supports inline links in Markdown form.

Input:

[AlienCommons](https://example.com)

Output:

<p><a href="https://example.com">AlienCommons</a></p>

Images

AlienMark supports inline image syntax. The alt text is emitted as the alt attribute.

Input:

![AlienCommons logo](https://example.com/logo.png)

Output:

<p><img src="https://example.com/logo.png" alt="AlienCommons logo" /></p>

Fenced Code Blocks

Triple backticks create fenced code blocks. A language name after the opening fence is emitted as a language-* class on the code tag.

Input:

```ts
const answer = 42;
```

Output:

<pre><code class="language-ts">const answer = 42;</code></pre>

Blockquotes

Lines starting with > are parsed as blockquotes.

Input:

> This is quoted.

Output:

<blockquote><p>This is quoted.</p></blockquote>

Lists

AlienMark currently supports single-level ordered and unordered lists.

Unordered Lists

Input:

- first
- second

Output:

<ul><li><p>first</p></li><li><p>second</p></li></ul>

Ordered Lists

Input:

1. first
2. second

Output:

<ol><li><p>first</p></li><li><p>second</p></li></ol>

Horizontal Rules

AlienMark supports ---, ***, and ___ as horizontal rules.

Input:

---

Output:

<hr />