Mark down cheat sheet

25 Apr 2019

how to markdown

Markdown cheat scheet

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

New Line

(In this example, leading and trailing spaces are shown with with dots: ⋅)

two spaces at the end⋅⋅

Emphasis

*italics*
**bold**
~~strikethrough~~

Links

[I'm an inline-style link](https://www.google.com)
![alt text](https://github.com/icon48.png "Logo Title Text 1")

Code blocks

Inline `code`
```
fenced code block
```
    code block can also be created by four spaces indent

Block quotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

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.

Horizontal lines

--- or ***

Lists

(In this example, leading and trailing spaces are shown with with dots: ⋅)

1. First ordered list item
2. Another item
⋅⋅* Unordered sub-list. 
1. Actual numbers don't matter, just that it's a number
⋅⋅1. Ordered sub-list
4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list     items. Notice the blank line above, and the leading spaces     (at least one, but we'll use three here to also align the     raw Markdown).

⋅⋅⋅To have a line break without a paragraph, you will need     to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same     paragraph.⋅⋅
⋅⋅⋅(This is contrary to the typical GFM line break     behaviour, where trailing spaces are not required.)

* Unordered list can use asterisks
- Or minuses
+ Or pluses

Tables

Tables aren't part of the core Markdown spec, but some markdown engines support them

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to     make the raw Markdown line up prettily. You can also use     inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Escape characters

You can use an extra backtick at the start and end to make sure it escapes correctly:

``List`1``

When inline it will display as List`1

Markdown provides backslash escapes for the following characters:

\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark

for example, this:

## \\ \` \* \_ \{ \} \[ \] \( \) \# \+ \- \. \!

returns:

\ ` * _ { } [ ] ( ) # + - . !

For fenced code blocks, the prescription is more backticks.

This Markdown

````
```
Example of Markdown syntax for fenced code block with triple back ticks
```
````

will be rendered like this

```
Example of Markdown syntax for fenced code block with triple back ticks
```

taken from https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
and https://meta.stackexchange.com/questions/82718/how-do-i-escape-a-backtick-within-in-line-code-in-markdown
the extended syntax has also support for checkboxes and header links https://www.markdownguide.org/extended-syntax/


Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.