summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorit33 <iantien@gmail.com>2015-11-20 11:32:17 -0800
committerit33 <iantien@gmail.com>2015-11-20 11:32:17 -0800
commit97cc51599a4cd499529e2e1f175e094a51ff27db (patch)
tree23884404bde5a86f5d544714cce821c614b6d18f
parent25bc02c785167370b0e2e04ee04f305a801078c4 (diff)
parentc085cebda78d6e48279621aff04fe0c18d24bbf6 (diff)
downloadchat-97cc51599a4cd499529e2e1f175e094a51ff27db.tar.gz
chat-97cc51599a4cd499529e2e1f175e094a51ff27db.tar.bz2
chat-97cc51599a4cd499529e2e1f175e094a51ff27db.zip
Merge pull request #1479 from mattermost/lfbrock-patch-1
Update Markdown.md
-rw-r--r--doc/usage/Markdown.md32
1 files changed, 30 insertions, 2 deletions
diff --git a/doc/usage/Markdown.md b/doc/usage/Markdown.md
index 055f47619..dd90ede19 100644
--- a/doc/usage/Markdown.md
+++ b/doc/usage/Markdown.md
@@ -11,9 +11,9 @@ You can use either `_` or `*` around a word to make it italic. Use two to make i
* `**_bold-italic_**` renders as **_bold-italics_**
* `~~strikethrough~~` renders as ~~strikethrough~~
-## Code:
+## Code Block:
-Create a code block by indenting four spaces, or by placing ``` on the line above and below your code.
+Create a code block by indenting each line by four spaces, or by placing ``` on the line above and below your code.
Example:
@@ -26,6 +26,34 @@ Renders as:
code block
```
+### Syntax Highlighting
+
+To add syntax highlighting, type the language to be highlighted after the ``` at the beginning of the code block.
+
+Supported languages are:
+`diff, apache, makefile, http, json, markdown, javascript, css, nginx, objectivec, python, xml, perl, bash, php, coffee (CoffeeScript), cs (C#), cpp (C++), sql, go, ruby, java, ini, latex`
+
+Example:
+
+ ``` go
+ package main
+ import "fmt"
+ func main() {
+ fmt.Println("Hello, 世界")
+ }
+ ```
+
+Renders as:
+``` go
+package main
+import "fmt"
+func main() {
+ fmt.Println("Hello, 世界")
+}
+```
+
+## In-line Code:
+
Create in-line monospaced font by surrounding it with backticks.
```
`monospace`