Syntax highlighting is a feature that displays source code, in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.1
Pygments高亮代码块
C
Java
1
2
3
4
5
6
7
class helloworld
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
标准代码块
Python
#!/usr/bin/python
printf("Hello World")
行内代码
Bash
echo "Hello World"
版权声明:自由转载-非商用-非衍生-保持署名 froyobin
本文永久链接:
http://froyobin.github.io/home/sample-post/code-highlighting