Skip to content

Instantly share code, notes, and snippets.

@karlgb
Created February 10, 2020 04:11
Show Gist options
  • Select an option

  • Save karlgb/ddbfdaa7efd1e155b6421b68362332af to your computer and use it in GitHub Desktop.

Select an option

Save karlgb/ddbfdaa7efd1e155b6421b68362332af to your computer and use it in GitHub Desktop.
markdown-ref

Heading 1 (underlined)

Heading 2 with custom-id {#custom-id}

Some renderers support linking to headers with ids.
Link to headings with custom ids via a standard link with a pund sign followed by the custom heading ID.

Heading 3

Heading 4

Heading 5
Heading 6

Paragraphs are separated by blank lines.

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.

Begin each line with two spaces or more to make text look e x a c t l y like you type i t.

Footnotes will be added to the bottom of the document, with a link back to the original reference

I have more to say up here. 1


Emphasis

This text is italic

This text is also italic

This text is bold

This text is also bold

Combined emphasis with asterisks and underscores.

This text is strikethrough

This is a block quote.

More

This is a block quote with multiple paragraphs

Simply include the a blank line with a leading greater than symbol.

Quoting continued

Nested quotes are allso possible.

The double symbol will do ya.

More quoting

Blockquotes can include some of the other elements.

Including headings

  • bullet points

And even emphasis


Links

Github Home Page

Github Link with Title

I'm a reference-style link

I'm a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).


Lists

  1. First ordered list item
  2. Another item
  3. Actual numbers don't matter, just that it's a number
    1. Nested ordered list requires 4 leading spaces
  4. And another item
  • Unordered list can use asterisks
    • And require two leading spaces when nested

Code & Syntax Highlighting

Inline code has back-ticks around it.

Blocks of code are either fenced by lines with three back-ticks ``` (preferred), or are indented with four spaces.

var s = "Specifies language for renderers with syntax highlighting";
alert(s);
s = "Python with syntax highlighting if supported"
print s
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.

Tables

You can cheat by using the table generator.

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

Task lists

When supported, render with checkboxes.

  • Task 1
  • Completed item
  • Not completed item

Images

Inline Markdown Logo:Markdown Logo

Linked image: alt text

Referenced logo: Markdown Logo


Github Markdown

GitHub.com uses its own version of the Markdown syntax that provides an additional set of features.

Footnotes

  1. To say down here. This can be a block with paragraphs, code and all the things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment