Basic Markdown document to do testing with
This commit is contained in:
331
tests/markdown_specification.md
Normal file
331
tests/markdown_specification.md
Normal file
@@ -0,0 +1,331 @@
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
|
||||
### Heading 3
|
||||
|
||||
#### Heading 4
|
||||
|
||||
##### Heading 5
|
||||
|
||||
###### Heading 6
|
||||
|
||||
Horizontal rule below me
|
||||
|
||||
---
|
||||
|
||||
Horizontal rule above me
|
||||
|
||||
# Heading 1 No Space
|
||||
## Heading 2 No Space
|
||||
### Heading 3 No Space
|
||||
#### Heading 4 No Space
|
||||
##### Heading 5 No Space
|
||||
###### Heading 6 No Space
|
||||
|
||||
---
|
||||
|
||||
Heading 1 with two or more equal signs
|
||||
===
|
||||
|
||||
Heading 2 with two or more dashes
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
Paragraph 1.
|
||||
|
||||
Paragraph 2
|
||||
with many line
|
||||
breaks that will
|
||||
automatically be
|
||||
turned into
|
||||
one
|
||||
long
|
||||
line.
|
||||
|
||||
Paragraph 3; one literal long line.
|
||||
|
||||
---
|
||||
|
||||
Paragraph 4 with rendered
|
||||
line breaks (two spaces
|
||||
after the end of a
|
||||
line)
|
||||
|
||||
Paragraph 5 with HTML<br>
|
||||
line breaks in \<br\> tags<br>
|
||||
...yeah...
|
||||
|
||||
---
|
||||
|
||||
**Bold** is made with two asterisks (\*\*I'm emboldened\*\*).
|
||||
|
||||
*Italics* is made with one asterisk (\*I'm in italics\*).
|
||||
|
||||
__Bold__ and _italics_ can also be done with underscores.
|
||||
|
||||
Underscores will *not* work in these instances:<br>
|
||||
Love__is__bold (It should look like "Loveisbold", not "Love<strong>is</strong>bold")<br>
|
||||
A_cat_meow (It should look like "Acatmeow", not "A<em>cat</em>meow")
|
||||
|
||||
Bold *and* italic text can be made with one emboldening pair of characters
|
||||
and one italicizing pair of characters.
|
||||
|
||||
I say ***Hello world!*** (three asterisks \*\*\*)<br>
|
||||
I say ___Hello world!___ (three underscores \_\_\_)<br>
|
||||
I say _**Hello world!**_ (one underscore; two asterisks \_\*\*)<br>
|
||||
I say **_Hello world!_** (two asterisks; one underscore \*\*\_)<br>
|
||||
I say __*Hello world!*__ (two underscores; one asterisk \_\_\*)<br>
|
||||
I say *__Hello world!__* (one asterisk; two underscores \*\_\_)
|
||||
|
||||
Again, there cannot be underscores in the middle of a word.
|
||||
|
||||
---
|
||||
|
||||
> I'm a blockquote
|
||||
|
||||
> I'm a blockquote...
|
||||
>
|
||||
> ...with many paragraphs.
|
||||
|
||||
> I'm a blockquote...
|
||||
>
|
||||
>> So am I! But within another one.
|
||||
|
||||
> I'm a blockquote
|
||||
>
|
||||
> #### With a heading
|
||||
>
|
||||
> - And a
|
||||
> - list...
|
||||
>
|
||||
> Along with some *more* formatting!
|
||||
> **Very cool**.
|
||||
|
||||
---
|
||||
|
||||
1. I'm
|
||||
2. An
|
||||
3. Ordered
|
||||
4. List
|
||||
|
||||
1. I am also an ordered list.
|
||||
1. But I should still be the same output as the above list.
|
||||
1. Yeah.
|
||||
|
||||
1. Same
|
||||
8. Thing
|
||||
4. Here
|
||||
6. BTW
|
||||
|
||||
1. I'm an ordered list.
|
||||
2. Here are some indents.
|
||||
1. Wow
|
||||
2. Very nice
|
||||
3. Third Item
|
||||
4. Fourth...
|
||||
1. Indented item
|
||||
|
||||
1) Some may use parentheses
|
||||
2) Like me.
|
||||
|
||||
---
|
||||
|
||||
- I'm an unordered list
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
|
||||
* I'm also an unordered list
|
||||
* But with asterisks
|
||||
* Very...
|
||||
* nice...
|
||||
|
||||
+ Again, I'm an unordered list
|
||||
+ With plus signs!
|
||||
|
||||
- And here are some indents.
|
||||
- Second Item
|
||||
- Third Item
|
||||
- Indented 1
|
||||
- Indented 2
|
||||
- Fourth Item
|
||||
|
||||
To start unordered lists with numbers followed by a period, do this:
|
||||
- 1969\. What a great year for science!
|
||||
- Beat that, USSR!
|
||||
|
||||
Mixing unordered list signs is bad.
|
||||
But, I think it should still be allowed, but with a warning in the parser.
|
||||
+ First (+)
|
||||
- Second (-)
|
||||
* Third (*)
|
||||
+ Fourth (+)
|
||||
|
||||
Now onto adding elements in lists.
|
||||
|
||||
To "interrupt" a list with some element, then "continue" the list again, do this:
|
||||
* First
|
||||
* Second. Let's interrupt:
|
||||
|
||||
There is an empty (or at least, a newline with some whitespace) line above and below me. I am also indented by four spaces or one tab.
|
||||
|
||||
* Third. I continue!
|
||||
|
||||
Same with blockquotes:
|
||||
* First
|
||||
* Second
|
||||
|
||||
> Blockquote
|
||||
|
||||
* Third
|
||||
|
||||
Adding codeblocks in lists.
|
||||
Indent by 8 spaces or two tabs, because the first indent is for adding the
|
||||
element, and the second is for making the code block.
|
||||
1. Step 1
|
||||
2. Step 2
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>hello world</title>
|
||||
</head>
|
||||
|
||||
3. Step 3
|
||||
|
||||
Images
|
||||
1. Blah
|
||||
2. Blah blah
|
||||
|
||||

|
||||
|
||||
3. Wow that was Tux!
|
||||
|
||||
You can nest lists within lists.
|
||||
1. First
|
||||
2. Second
|
||||
3. Third
|
||||
- Unordered
|
||||
- Wow.
|
||||
4. Fourth
|
||||
|
||||
- Unordered
|
||||
- Un
|
||||
- Or
|
||||
1. First
|
||||
2. Second
|
||||
- Dered
|
||||
|
||||
---
|
||||
|
||||
Code!
|
||||
|
||||
Enclose in \`backticks\`:
|
||||
|
||||
Type `vim` to open one of the best editors ever.
|
||||
|
||||
To escape backticks, do this:<br>
|
||||
\`\`Okay we're escaping this: \`vim\`. Wow that was easy.\`\`<br>
|
||||
Which looks like:<br>
|
||||
<code>Okay we're escaping this: `vim`. Wow that was easy.</code>
|
||||
|
||||
Code blocks:
|
||||
Two ways...
|
||||
|
||||
Indent by 4 spaces or one tab:<br>
|
||||
int main()
|
||||
{
|
||||
printf("wow\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Or, my personal favorite, use three backticks:<br>
|
||||
```
|
||||
int main()
|
||||
{
|
||||
printf("wow\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
Then to enable highlighting for a language:
|
||||
|
||||
> \`\`\`python
|
||||
> `...Python code here...`
|
||||
> \`\`\`
|
||||
|
||||
```python
|
||||
print("hello world!")
|
||||
```
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Links:
|
||||
|
||||
\[Alias; like the alt attribute in \<a\> tags\]\(www.actual-link.com\)
|
||||
|
||||
I like [Duck Duck Go](https://duckduckgo.com)
|
||||
|
||||
To add a title that shows when you hover your cursor over the link, add a string after the link
|
||||
|
||||
\[Alias; like the alt attribute in \<a\> tags\]\(www.actual-link.com "I'm a title"\)
|
||||
|
||||
I like [Duck Duck Go](https://duckduckgo.com "The best search engine for privacy")
|
||||
|
||||
URLs & Emails:
|
||||
|
||||
\<link here\>
|
||||
|
||||
<https://www.markdownguide.org>
|
||||
<fake@example.com>
|
||||
|
||||
And you can use formatting within the links:
|
||||
|
||||
```
|
||||
I love supporting the **[EFF](https://eff.org)**.
|
||||
This is the *[Markdown Guide](https://www.markdownguide.org)*.
|
||||
See the section on [`code`](#code).
|
||||
```
|
||||
|
||||
I love supporting the **[EFF](https://eff.org)**.
|
||||
This is the *[Markdown Guide](https://www.markdownguide.org)*.
|
||||
See the section on [`code`](#code).
|
||||
|
||||
---
|
||||
|
||||
Reference style links:
|
||||
|
||||
First part:
|
||||
|
||||
[hobbit-hole][1]
|
||||
|
||||
Second part (in multiple formats):
|
||||
|
||||
```
|
||||
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
|
||||
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle "Hobbit lifestyles"
|
||||
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
|
||||
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle (Hobbit lifestyles)
|
||||
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> "Hobbit lifestyles"
|
||||
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
|
||||
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> (Hobbit lifestyles)
|
||||
```
|
||||
|
||||
And so:
|
||||
|
||||
I live in a [hobbit-hole][1]. It's very nice.
|
||||
|
||||
You should read [Tolkien][2]!
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle "Hobbit lifestyles"
|
||||
[2]: https://en.wikipedia.org/wiki/J._R._R._Tolkien
|
||||
Reference in New Issue
Block a user