模板:Syntaxhighlight/doc

来自戏曲百科

模板:Tsh<syntaxhighlight>...</syntaxhighlight>包裹需要语法高亮的文本(syntax-highlighted text)与<syntaxhighlight>之不同,支持文本的折行(wrapped)显示。

用法

参数

  • lang:
代码 语言
4cs 4CS
6502acme MOS 6502 (6510) ACME Cross Assembler
6502kickass MOS 6502 (6510) Kick Assembler
6502tasm MOS 6502 (6510) TASM/64TASS
68000devpac Motorola 68000 - HiSoft Devpac ST 2 Assembler
abap ABAP
actionscript ActionScript
actionscript3 ActionScript3
ada Ada
algol68 ALGOL 68
apache Apache configuration
applescript AppleScript
apt_sources APT sources
arm ARM Assembler
asm Assembly
asp Active Server Pages (ASP)
asymptote Asymptote
autoconf Autoconf
autohotkey AutoHotkey
autoit AutoIt
avisynth 模板:Tsl
awk Awk
bascomavr BASCOM AVR
bash Bash
basic4gl 模板:Tsl
bf Brainfuck
bibtex BibTeX
blitzbasic 模板:Tsl
bnf 巴科斯范式
boo Boo
c C
c_loadrunner C Loadrunner
c_mac C (Mac)
caddcl 模板:Tsl
cadlisp AutoLISP
cfdg CFDG
cfm 模板:Tsl
chaiscript 模板:Tsl
cil Common Intermediate Language (CIL)
clojure Clojure
clp 模板:Tsl
cmake CMake
cobol COBOL
coffeescript CoffeeScript
cpp C++
cpp-qt C++ (Qt toolkit)
csharp C#
css Cascading Style Sheets (CSS)
cuesheet Cue sheet
d D
dcl 模板:Tsl
dcpu16 0x10c
dcs Data Conversion System
delphi Delphi
diff Diff
div DIV
dos 批次檔
dot DOT
e 模板:Tsl
ecmascript ECMAScript
eiffel Eiffel
email Email (mbox \ eml \ RFC format)
epc Enerscript
erlang Erlang
euphoria 模板:Tsl
f1 Formula One
falcon Falcon
fo FO
fortran Fortran
freebasic FreeBASIC
freeswitch FreeSWITCH
fsharp F♯
gambas Gambas
gdb GNU侦错器
genero Genero
genie Genie
gettext Gettext
glsl OpenGL Shading Language (GLSL)
gml Game Maker Language (GML)
gnuplot Gnuplot
go Go
groovy Groovy
gwbasic GW-BASIC
haskell Haskell
haxe Haxe
hicest HicEst
hq9plus HQ9+
html4strict HTML
html5 HTML5
icon 模板:Tsl
idl Uno IDL
ini INI
inno Inno
intercal 模板:Tsl
io Io
j J
java Java
java5 Java(TM) 2 Platform Standard Edition 5.0
javascript JavaScript
jcl 模板:Tsl
kixtart KiXtart
klonec Klone C
klonecpp Klone C++
latex LaTeX
lb 模板:Tsl
ldif 模板:Tsl
lisp Lisp
llvm LLVM
locobasic 模板:Tsl
logtalk 模板:Tsl
lolcode LOLCODE
lotusformulas 模板:Tsl
lotusscript 模板:Tsl
lscript 模板:Tsl
lsl2 模板:Tsl
lua Lua
magiksf 模板:Tsl
m68k Motorola 68000 Assembler
make make
mapbasic 模板:Tsl
matlab MATLAB M
moin Wikitext/MediaWiki[1]
mirc 模板:Tsl
mmix 模板:Tsl
modula2 Modula-2
modula3 Modula-3
mpasm Microchip Assembler
mxml MXML
mysql MySQL
nagios Nagios
netrexx 模板:Tsl
newlisp 模板:Tsl
nsis Nullsoft Scriptable Install System (NSIS)
oberon2 模板:Tsl
objc Objective-C
objeck 模板:Tsl
ocaml OCaml
ocaml-brief OCaml
ocl 模板:Tsl
octave Octave
oobas 模板:Tsl
oorexx 模板:Tsl
oracle11 Oracle 11 SQL
oracle8 Oracle 8 SQL
oxygene 模板:Tsl
oz Oz
parasail 模板:Tsl
parigp 模板:Tsl
pascal Pascal
pcre 模板:Tsl
per per
perl Perl
perl6 Perl 6
pf 模板:Tsl
php PHP
php-brief PHP
pic16 PIC汇编语言
pike Pike
pixelbender 模板:Tsl
pli PL/I
plsql PL-SQL
postgresql PostgreSQL
povray Persistence of Vision Raytracer
powerbuilder Powerbuilder
powershell Windows PowerShell
proftpd ProFTPd
progress 模板:Tsl
prolog Prolog
properties Properties file
providex 模板:Tsl
purebasic PureBasic
pycon Python
pys60 模板:Tsl
python Python
q 模板:Tsl
qbasic QBasic/QuickBASIC
rails Rails
rebol REBOL
reg 注册表
rexx REXX
robots robots.txt
rpg 模板:Tsl
rpgii 模板:Tsl
rpgiii 模板:Tsl
rpg400 模板:Tsl
rpgiv 模板:Tsl
rpmspec RPM Spec files
rsplus R
ruby Ruby
sas SAS
scala Scala
scheme Scheme
scilab Scilab
sdlbasic 模板:Tsl
smalltalk Smalltalk
smarty Smarty
spark SPARK
sparql SPARQL
sql SQL
stonescript StoneScript (Scripting language for 模板:Tsl)
systemverilog SystemVerilog
tcl Tcl
teraterm Tera Term
text 模板:Tsl
thinbasic 模板:Tsl
tsql Transact-SQL
typoscript TypoScript
unicon 模板:Tsl
upc Unified Parallel C
urbi 模板:Tsl
uscript 虚幻引擎
vala Vala
vb Visual Basic
vbnet Visual Basic .NET
vedit 模板:Tsl
verilog Verilog
vhdl VHDL
vim Vim
visualfoxpro Visual FoxPro
visualprolog Visual Prolog
whitespace Whitespace
whois WHOIS
winbatch 模板:Tsl
xml XML
xorg_conf 模板:Tsl
yaml YAML
xpp 模板:Tsl
z80 ZiLOG Z80 Assembler
zxbasic ZXBasic
  • code:需要语法高亮显示的内容。

例子

{{Syntaxhighlight|lang=javascript|code=mw.util.addPortletLink('p-personal', '/w/index.php?title=Special:MyPage/Sandbox&action=edit&preload=Template%3AUser_sandbox%2Fpreload&editintro=Template%3AUser_sandbox', 'My sandbox', 'pt-mysandbox', 'Go to my sandbox');}}

模板:Syntaxhighlight

参见

注释

模板:Reflist


  1. Pygments没有提供"wikitext"或"mediawiki"语法解析(见phab:T29828)。请使用"html+handlebars"或"moin"替代。