diff options
author | 0xazure <stuart.crust@gmail.com> | 2018-10-25 08:51:13 +0300 |
---|---|---|
committer | Dragos Plesca <dragos.plesca@gmail.com> | 2018-10-25 08:51:13 +0300 |
commit | c075161bc6e1b919ad6198511709f522c1409180 (patch) | |
tree | ba10261806f4ffd57095e3ae3075b10b9835f6ee | |
parent | e820eb3433a7c0576493649fe829259be4d17a90 (diff) |
Clarify how to enable syntax highlighting (#28)
Rephrase and correct missing word, and provide a full example of
applying Go syntax highlighting to a Markdown code block.
-rw-r--r-- | README.md | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -36,7 +36,19 @@ Notice the configuration necessary for disqus comments (just setting the disqusS ### Syntax Highlighting -Syntax highlighting is enabled by default and it uses the nice [rainbow js](http://craig.is/making/rainbows) library. All you need to do is to let rainbow.js the language of the highlighted code, using something like ````go` when writing the code in markdown. +Syntax highlighting is enabled by default and uses the [Rainbow](http://craig.is/making/rainbows) highlighting library. All you need to do is add a language identifier to a code block. + +For example, to apply Go syntax highlighting in Markdown: + + ```go + package main + + import "fmt" + + func main() { + fmt.Println("Hello, 世界") + } + ``` ### Responsive Images |