Cleaned up formatting and links
This commit is contained in:
parent
10c6aea6a9
commit
0f2b07928c
81
markdown.md
81
markdown.md
@ -6,16 +6,20 @@
|
||||
[Lists](#lists)
|
||||
[Links](#links)
|
||||
[Images](#images)
|
||||
[Code and Syntax Highlighting](#code and syntax highlighting)
|
||||
[Code and Syntax Highlighting](#code-and-syntax-highlighting)
|
||||
[Tables](#tables)
|
||||
[Blockquotes](#blockquotes)
|
||||
[Inline HTML](#inline-html)
|
||||
[Horizontal Rule](#horizontal-rule)
|
||||
[Line Breaks](#line breaks)
|
||||
[Line Breaks](#line-breaks)
|
||||
[Youtube videos](#youtube-videos)
|
||||
|
||||
***
|
||||
|
||||
### Headers
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
# H1
|
||||
## H2
|
||||
@ -33,6 +37,8 @@ Alt-H2
|
||||
------
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
@ -48,6 +54,10 @@ Alt-H1
|
||||
Alt-H2
|
||||
------
|
||||
|
||||
***
|
||||
|
||||
Code:
|
||||
|
||||
### Emphasis
|
||||
|
||||
```no-highlight
|
||||
@ -59,6 +69,7 @@ Combined emphasis with **asterisks and _underscores_**.
|
||||
|
||||
Strikethrough uses two tildes. ~~Scratch this.~~
|
||||
```
|
||||
Results:
|
||||
|
||||
Emphasis, aka italics, with *asterisks* or _underscores_.
|
||||
|
||||
@ -68,9 +79,12 @@ Combined emphasis with **asterisks and _underscores_**.
|
||||
|
||||
Strikethrough uses two tildes. ~~Scratch this.~~
|
||||
|
||||
***
|
||||
|
||||
### Lists
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
1. First ordered list item
|
||||
2. Another item
|
||||
@ -86,6 +100,8 @@ Strikethrough uses two tildes. ~~Scratch this.~~
|
||||
+ Or pluses
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
1. First ordered list item
|
||||
2. Another item
|
||||
* Unordered sub-list.
|
||||
@ -99,6 +115,7 @@ Strikethrough uses two tildes. ~~Scratch this.~~
|
||||
- Or minuses
|
||||
+ Or pluses
|
||||
|
||||
***
|
||||
|
||||
### Links
|
||||
|
||||
@ -134,9 +151,12 @@ Some text to show that the reference links can follow later.
|
||||
[1]: http://slashdot.org
|
||||
[link text itself]: http://www.reddit.com
|
||||
|
||||
***
|
||||
|
||||
### Images
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
Here's our logo (hover to see the title text):
|
||||
|
||||
@ -149,6 +169,8 @@ Reference-style:
|
||||
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
Here's our logo (hover to see the title text):
|
||||
|
||||
Inline-style:
|
||||
@ -159,20 +181,26 @@ Reference-style:
|
||||
|
||||
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
|
||||
|
||||
***
|
||||
|
||||
### Code and Syntax Highlighting
|
||||
|
||||
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and *Markdown Here* -- support syntax highlighting. *Markdown Here* supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).
|
||||
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers(including Github's and Gitea's) support syntax highlighting. *Markdown Here* supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers).
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
Inline `code` has `back-ticks around` it.
|
||||
```
|
||||
Results:
|
||||
|
||||
Inline `code` has `back-ticks around` it.
|
||||
|
||||
Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
|
||||
|
||||
```no-highlight
|
||||
Code:
|
||||
|
||||
```
|
||||
```javascript
|
||||
var s = "JavaScript syntax highlighting";
|
||||
alert(s);
|
||||
@ -189,6 +217,8 @@ Blocks of code are either fenced by lines with three back-ticks <code>```</code>
|
||||
```
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
```javascript
|
||||
var s = "JavaScript syntax highlighting";
|
||||
alert(s);
|
||||
@ -204,14 +234,17 @@ No language indicated, so no syntax highlighting in Markdown Here (varies on Git
|
||||
But let's throw in a <b>tag</b>.
|
||||
```
|
||||
|
||||
(Github Wiki pages don't seem to support syntax highlighting, so the above won't be colourful (the strings are not red, for example). Try it out in a *Markdown Here* email or a Github Markdown README or Github Issue -- you can preview a new Issue without submitting it.)
|
||||
(Github Wiki pages don't seem to support syntax highlighting, so the above won't be colourful (the strings are not red, for example). Try it out in a Github Markdown README or Github Issue -- you can preview a new Issue without submitting it.)
|
||||
|
||||
Again, to see what languages are available for highlighting, and how to write those language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).
|
||||
|
||||
***
|
||||
|
||||
### Tables
|
||||
|
||||
Tables aren't part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.
|
||||
Tables aren't part of the core Markdown spec, but they are part of GFM and Gitea does support them.\
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
Colons can be used to align columns.
|
||||
@ -230,6 +263,8 @@ Markdown | Less | Pretty
|
||||
1 | 2 | 3
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
Colons can be used to align columns.
|
||||
|
||||
| Tables | Are | Cool |
|
||||
@ -245,9 +280,12 @@ Markdown | Less | Pretty
|
||||
*Still* | `renders` | **nicely**
|
||||
1 | 2 | 3
|
||||
|
||||
***
|
||||
|
||||
### Blockquotes
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
> Blockquotes are very handy in email to emulate reply text.
|
||||
> This line is part of the same quote.
|
||||
@ -257,6 +295,8 @@ Quote break.
|
||||
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
> Blockquotes are very handy in email to emulate reply text.
|
||||
> This line is part of the same quote.
|
||||
|
||||
@ -264,11 +304,14 @@ Quote break.
|
||||
|
||||
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
|
||||
|
||||
***
|
||||
|
||||
### Inline HTML
|
||||
|
||||
You can also use raw HTML in your Markdown, and it'll mostly work pretty well.
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
<dl>
|
||||
<dt>Definition list</dt>
|
||||
@ -279,6 +322,8 @@ You can also use raw HTML in your Markdown, and it'll mostly work pretty well.
|
||||
</dl>
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
<dl>
|
||||
<dt>Definition list</dt>
|
||||
<dd>Is something people use sometimes.</dd>
|
||||
@ -287,9 +332,12 @@ You can also use raw HTML in your Markdown, and it'll mostly work pretty well.
|
||||
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
|
||||
</dl>
|
||||
|
||||
***
|
||||
|
||||
### Horizontal Rule
|
||||
|
||||
Code:
|
||||
|
||||
```
|
||||
Three or more...
|
||||
|
||||
@ -306,6 +354,8 @@ ___
|
||||
Underscores
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
Three or more...
|
||||
|
||||
---
|
||||
@ -320,6 +370,7 @@ ___
|
||||
|
||||
Underscores
|
||||
|
||||
***
|
||||
|
||||
### Line Breaks
|
||||
|
||||
@ -327,6 +378,8 @@ My basic recommendation for learning how line breaks work is to experiment and d
|
||||
|
||||
Here are some things to try out:
|
||||
|
||||
Code:
|
||||
|
||||
```
|
||||
Here's a line for us to start with.
|
||||
|
||||
@ -336,6 +389,8 @@ This line is also a separate paragraph, but...
|
||||
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
Here's a line for us to start with.
|
||||
|
||||
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
|
||||
@ -350,14 +405,28 @@ This line is only separated by a single newline, so it's a separate line in the
|
||||
|
||||
They can't be added directly but you can add an image with a link to the video like this:
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
<a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
|
||||
" target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
|
||||
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
<a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
|
||||
" target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
|
||||
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
|
||||
|
||||
Or, in pure Markdown, but losing the image sizing and border:
|
||||
|
||||
Code:
|
||||
|
||||
```no-highlight
|
||||
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
|
||||
```
|
||||
|
||||
Results:
|
||||
|
||||
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
|
||||
|
Loading…
Reference in New Issue
Block a user