diff --git a/tests/gfx/tux.webp b/tests/gfx/tux.webp new file mode 100644 index 0000000..1e0d497 Binary files /dev/null and b/tests/gfx/tux.webp differ diff --git a/tests/markdown_specification.md b/tests/markdown_specification.md new file mode 100644 index 0000000..c2b7cc0 --- /dev/null +++ b/tests/markdown_specification.md @@ -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
+line breaks in \ tags
+...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:
+Love__is__bold (It should look like "Loveisbold", not "Loveisbold")
+A_cat_meow (It should look like "Acatmeow", not "Acatmeow") + +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 \*\*\*)
+I say ___Hello world!___ (three underscores \_\_\_)
+I say _**Hello world!**_ (one underscore; two asterisks \_\*\*)
+I say **_Hello world!_** (two asterisks; one underscore \*\*\_)
+I say __*Hello world!*__ (two underscores; one asterisk \_\_\*)
+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 + + + + hello world + + +3. Step 3 + +Images +1. Blah +2. Blah blah + + ![TUX!!!](gfx/tux.webp) + +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:
+\`\`Okay we're escaping this: \`vim\`. Wow that was easy.\`\`
+Which looks like:
+Okay we're escaping this: `vim`. Wow that was easy. + +Code blocks: +Two ways... + +Indent by 4 spaces or one tab:
+ int main() + { + printf("wow\n"); + return 0; + } + +Or, my personal favorite, use three backticks:
+``` +int main() +{ + printf("wow\n"); + return 0; +} +``` + +Then to enable highlighting for a language: + +> \`\`\`python +> `...Python code here...` +> \`\`\` + +```python +print("hello world!") +``` + +```c +#include +int main() +{ + printf("hello world!\n"); + return 0; +} +``` + +--- + +Links: + +\[Alias; like the alt attribute in \ 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 \ 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: + +\ + + + + +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]: "Hobbit lifestyles" +[1]: 'Hobbit lifestyles' +[1]: (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