加裝wp-syntax,使用方式如下
Example 1: PHP, no line numbers
在原始碼模式下,使用下列語法
Example 2: Java, with line numbers
使用有行號的設定
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
public class Hello {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Example 3: Ruby, with line numbers starting at 18
設定啟始行號
class Example
def example(arg1)
return "Hello: " + arg1.to_s
end
end
class Example
def example(arg1)
return "Hello: " + arg1.to_s
end
end