wp的code显示插件WP-Syntax的使用说明和more
星期一, 2008-11-17 | Author: liyz | wordpress | 4,139 views
自己装的是wp-syntax.0.8版本,现贴出使用,供自己方便查找
先展示一个<.!--more--.>
Wrap code blocks with <.pre lang="LANGUAGE" line="1" .> and `<./pre.>
where `LANGUAGE` is a [GeSHi](http://qbnz.com/highlighter/) supported language
syntax. See below for a full list of supported languages. The `line`
attribute is optional.
**Example 1: PHP, no line numbers**
<div id="foo"> <?php function foo() { echo "Hello World!\\n"; } ?> </div> |
**Example 2: Java, with line numbers**
1 2 3 4 5 | public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } |
**Example 3: Ruby, with line numbers starting at 18**
18 19 20 21 22 | class Example def example(arg1) return "Hello: " + arg1.to_s end end |
== Supported Languages ==
The following languages are supported in the `lang` attribute:
abap, actionscript, actionscript3, ada, apache, applescript, asm, **asp**,
autoit, **bash**, blitzbasic, bnf, **c**, c_mac, caddcl, cadlisp, cfdg, cfm,
cpp-qt, **cpp**, **csharp**, **css**, d, delphi, diff, div, dos, dot, eiffel,
fortran, freebasic, genero, gettext, glsl, gml, groovy, haskell,
**html4strict**, idl, ini, inno, io, **java**, **java5**, **javascript**,
kixtart, latex, lisp, lotusformulas, lotusscript, lua, m68k, matlab, mirc,
mpasm, mxml, **mysql**, nsis, **objc**, ocaml-brief, ocaml, oobas, **oracle8**,
pascal, per, **perl**, php-brief, **php**, plsql, **python**, qbasic, **rails**,
reg, robots, **ruby**, sas, scala, scheme, sdlbasic, smalltalk, smarty, **sql**,
tcl, text, thinbasic, tsql, **vb**, **vbnet**, verilog, vhdl, visualfoxpro,
winbatch, **xml**, xpp, z80
(Bold languages just highlight the more popular ones.)
文章作者: liyz
本文地址: https://www.pomelolee.com/121.html
除非注明,Pomelo Lee文章均为原创,转载请以链接形式标明本文地址
No comments yet.
Leave a comment
Search
相关文章
热门文章
最新文章
文章分类
- ajax (10)
- algorithm-learn (3)
- Android (6)
- as (3)
- computer (85)
- Database (30)
- disucz (4)
- enterprise (1)
- erlang (2)
- flash (5)
- golang (3)
- html5 (18)
- ios (4)
- JAVA-and-J2EE (186)
- linux (143)
- mac (10)
- movie-music (11)
- pagemaker (36)
- php (50)
- spring-boot (2)
- Synology群晖 (2)
- Uncategorized (6)
- unity (1)
- webgame (15)
- wordpress (33)
- work-other (2)
- 低代码 (1)
- 体味生活 (40)
- 前端 (21)
- 大数据 (8)
- 游戏开发 (9)
- 爱上海 (19)
- 读书 (4)
- 软件 (3)