Markdown: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 87: Line 87:
=Blockquotes=
=Blockquotes=


{{{
Use the '>' at the beginning of the line
something and use the '>' at the beginning of the line
 
<pre>


> this is in
> this is in
> blockquotes
> blockquotes
}}}
</pre>
 


</font>
</font>


=Inline Code=


!!!Inline Code
==Backticks==


!!Backticks
<pre>
 
{{{
blah blah blah `this will show up as code <blah>` then blah blah blah
blah blah blah `this will show up as code <blah>` then blah blah blah
}}}
</pre>


!!Four leading spaces
==Four leading spaces==


{{{
<pre>
This will show up normal and
This will show up normal and


Line 115: Line 114:


normal again
normal again
}}}
</pre>


!!Four Dashes
==Four Dashes==


<font color=red>Works in GitHub, not sure if it works generically. When I find out, update this.</font>
<font color=red>Works in GitHub, not sure if it works generically. When I find out, update this.</font>


{{{
<pre>
----
----
oc whoami
oc whoami
----
----
}}}
</pre>


!!Code Fencing (GitHub Specific)
==Code Fencing (GitHub Specific)==


Specific to GitHub, allows multiple lines without indentation:
Specific to GitHub, allows multiple lines without indentation:


{{{
<pre>
```
```
this will show up
this will show up
   as code
   as code
```
```
}}}
</pre>


For syntax highlighting, specify the language:
For syntax highlighting, specify the language:


{{{
<pre>
```javascript
```javascript
blah blah
blah blah
blah
blah
```
```
}}}
</pre>
 
 


!!!GitHub Specific Markdown
=GitHub Specific Markdown=


!!Strikethrough
==Strikethrough==


{{{
<pre>
~~will be stroke through~~
~~will be stroke through~~
}}}
</pre>


!!User Reference (Mention)
==User Reference (Mention)==


{{{
<pre>
@github-user-id
@github-user-id
}}}
</pre>


This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.
This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.


!!Task Lists
==Task Lists==


{{{
<pre>
- [x] item checked
- [x] item checked
- [x] another item checked
- [x] another item checked
- [ ] item that is not checked
- [ ] item that is not checked
}}}
</pre>


!!!Tables
=Tables=


{{{
{{{

Revision as of 20:37, 9 January 2016

Markdown

External

Overview

Markdown is a lightweight syntax for styling all forms of writing on the GitHub platform. It is automatically interpreted on GitHub when found in Gists, comments in Issues and Pull Requests and files with .md or .markdown extension.

Headers

# This is a <h1> header
## This is a <h2> header
...
##### This is a <h5> header

Italic

*This text will be italic*
_This text will also be italic_

Bold

**This text will be bold**
__This text will also be bold__

Italic and bold can be combined.

Colors

<font color=magenta>something</font>

Link

The http:// URL specified in text are automatically converted to links. Otherwise:

[Text](url}

the URL can be absolute or relative.

Image

![Alt Text](url)

the URL can be absolute or relative.

Unnumbered List

Use stars or dashes as follows:

* Item 1
* Item 2
  * Item 2a
  * Item 2b
- Item 1
- Item 2
  - Item 2a
  - Item 2b

Numbered List

1. Item 1
2. Item 2
   * Item 2a
   * Item 2b

Blockquotes

Use the '>' at the beginning of the line


> this is in
> blockquotes

Inline Code

Backticks

blah blah blah `this will show up as code <blah>` then blah blah blah

Four leading spaces

This will show up normal and

    this will show up
      as code

normal again

Four Dashes

Works in GitHub, not sure if it works generically. When I find out, update this.

----
oc whoami
----

Code Fencing (GitHub Specific)

Specific to GitHub, allows multiple lines without indentation:

```
this will show up
  as code
```

For syntax highlighting, specify the language:

```javascript
blah blah
blah
```

GitHub Specific Markdown

Strikethrough

~~will be stroke through~~

User Reference (Mention)

@github-user-id

This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.

Task Lists

- [x] item checked
- [x] another item checked
- [ ] item that is not checked

Tables

Second Header



!!!Repository References

!!SHA References

Any reference to a commit’s SHA-1 hash will be automatically converted into a link to that commit on GitHub.

{{{ 16c999e8c71134401a78d4d46435517b2271d6ac mojombo@16c999e8c71134401a78d4d46435517b2271d6ac mojombo/github-flavored-markdown@16c999e8c71134401a78d4d46435517b2271d6ac }}}


!!Issue References

Any number that refers to an Issue or Pull Request will be automatically converted into a link.

{{{

  1. 1

mojombo#1 mojombo/github-flavored-markdown#1 }}}