Skip to content

Instantly share code, notes, and snippets.

@joemaller
Created November 30, 2018 15:42
Show Gist options
  • Save joemaller/9cd94f378e4e9774b57be2b20cd01080 to your computer and use it in GitHub Desktop.
Save joemaller/9cd94f378e4e9774b57be2b20cd01080 to your computer and use it in GitHub Desktop.
An example of what's possible to do with Markdown.

Markdown Reference Sample

An example of what's possible to do with Markdown.

Basic formatting

Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.

Paragraphs must be separated by a blank line. Basic formatting of italics and bold is supported. This can be nested like so.

Lists

Ordered list

  1. Item 1
  2. A second item
  3. Number 3
  4. Go forth, fourth item

Unordered list

  • An item
  • Another item
  • Yet another item
  • And there's more...

Block Modifiers

Code block

Code blocks are very useful for developers and other people who look at code or other things that are written in plain text. As you can see, it uses a fixed-width font.

You can also make inline code to add code into other things.

Fenced Code Blocks

/*
 * Fenced Code Blocks are even better since
 * they can be tagged with a language for 
 * syntax coloring and don't need any special
 * indentation. 
 */

function sayHi() {
  return "hello, I'm JavaScript";
}

Quote

Looking at these stars suddenly dwarfed my own troubles and all the gravities of terrestrial life. I thought of their unfathomable distance, and the slow inevitable drift of their movements out of the unknown past into the unknown future.

Horizontal rule

Useful for dividing sections.


Headings

There are six levels of headings. They correspond with the six levels of HTML headings. You've probably noticed them already in the page. Each level down uses one more hash character.

Headings can also contain formatting

They can even contain inline code

The first three heading levels already appear above. Here are the rest:

Heading 4

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