Mar APR May
30
2012 2013 2014
success
fail

About this capture

COLLECTED BY

Organization: Internet Archive

The Internet Archive discovers and captures web pages through many different web crawls. At any given time several distinct crawls are running, some for months, and some every day or longer. View the web archive through the Wayback Machine.

Collection: Wide Crawl started April 2013

Web wide crawl with initial seedlist and crawler configuration from April 2013.
TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20130430100435/http://github.github.com/github-flavored-markdown/
 





Support

Back to GitHub
 




Introduction to GFM


GitHub uses what we're calling "GitHub Flavored Markdown" (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality.

If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent Markdown Syntax Guide at Daring Fireball.

If you prefer to learn by example, see the following source and result:


Source

Result


If you're interested in how we render Markdown files, you might want to check out Redcarpet, our Ruby interface to the Sundown library.

Differences from traditional Markdown

Newlines


The biggest difference that GFM introduces is in the handling of linebreaks. With SM you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors. GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.

The next paragraph contains two phrases separated by a single newline character:
Roses are red
Violets are blue

becomes

Roses are red
Violets are blue

Multiple underscores in words


It is not reasonable to italicize just part of a word, especially when you're dealing with code and names often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words.
perform_complicated_task
do_this_and_do_that_and_another_thing

becomes

perform_complicated_task do_this_and_do_that_and_another_thing

URL autolinking


GFM will autolink standard URLs, so if you want to link to a URL (instead of setting link text), you can simply enter the URL and it will be turned into a link to that URL.

Fenced code blocks


Markdown converts text with four spaces at the front of each line to code blocks. GFM supports that, but we also support fenced blocks. Just wrap your code blocks in ``` and you won't need to indent manually to trigger a code block.

Syntax highlighting


We take code blocks a step further and add syntax highlighting if you request it. In your fenced block, add an optional language identifier and we'll run it through syntax highlighting. For example, to syntax highlight Ruby code:
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```

A bit of the GitHub spice

References


In addition to the changes in the previous section, certain references are auto-linked:
* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* \#Num: #1
* User/#Num: mojombo#1
* User/Project#Num: mojombo/god#1

becomes


SHA: be6a8cc

User@SHA ref: mojombo@be6a8cc

User/Project@SHA: mojombo/god@be6a8cc

#Num: #1

User/#Num: mojombo#1

User/Project#Num: mojombo/god#1

Task Lists


Further, lists can be turned into Task Lists by prefacing list items with [ ]or[x] (incomplete or complete, respectively).
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item

This feature is enabled for Issue and Pull Request descriptions and comments. In those contexts, task lists will be rendered with checkboxes that you can check on and off.

See the Task Lists blog post for more details.

Code


The newline and underscore modification code can be seen below. If you find a bug in the rendering, we'd love to hear about it. Browse through open Issues and report new Issues on the GitHub-flavored Markdown Issues page.
 


Markdown Cheat Sheet


On Markdown-enabled portions of the site, press Mon your keyboard to display a cheat sheet. 





GitHub Links

 

GitHub


About

Blog

Contact & Support

Training

Site Status
 

Tools


GitHub for Mac

Gist

GitHub Enterprise

Job Board
 

Extras


Shop

The Octodex
 

Documentation


GitHub Help

Developer API

GitHub Flavored Markdown

GitHub Pages
 




Home  

Terms of Service

Privacy

Security
 

© year GitHub Inc. All rights reserved.