forked from github-linguist/linguist
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
accf734
commit 28bbead
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Highlighting | ||
|
||
GitHub uses Linguist to power the syntax highlighting of code blocks. You know, the difference between this | ||
|
||
``` | ||
var util = require('util'); | ||
var net = require('net'); | ||
var stream = require('stream'); | ||
var url = require('url'); | ||
``` | ||
|
||
and this | ||
|
||
``` js | ||
var util = require('util'); | ||
var net = require('net'); | ||
var stream = require('stream'); | ||
var url = require('url'); | ||
``` | ||
|
||
In order to syntax highlight a code block, you must provide a "language name" to the code block syntax of your Markup of choice. | ||
|
||
For example, for Markdown, this would look like: | ||
|
||
``` javascript | ||
|
||
Whereas for AsciiDoc, this might be: | ||
|
||
[source,javascript] | ||
|
||
Below is a comprehensive list of of the language codes necessary for syntax highlighting a code block. |