SyntaxHighlight GeSHi
From Wikipedia!
Testing the Extension:SyntaxHighlight GeSHi extension.
Contents |
[edit] Examples
- Normal pre, no extension
if (blah) {
// stuff
}
- Basic example (pre mode)
if (blah) { // stuff }
- Div mode
if (blah) {
// stuff
}
// stuff
}
- Light on black may be easier to read than light on white - dark on light may be better.
|
if (blah) {
// stuff } |
if (blah) {
// stuff } |
if (blah) {
// stuff } |
if (blah) {
// stuff } |
if (blah) {
// stuff } |
- Line numbered (forces div mode)
-
if (blah) {
-
// stuff -
}
- Line numbered with offset
-
if (blah) {
-
// stuff -
}
- Non-strict
$x = 'y'; <?php $x = 'y'; ?>
- Strict
$x = 'y'; <?php $x = 'y'; ?>
INSERT INTO arsearch2 (Findindex,Word,Src,SESSION) SELECT STRAIGHT_JOIN ind0.Findindex,ind0.Subject,ind0.Src,25765 FROM arindex AS ind0 ,arindex AS ind1,arindex AS ind2 WHERE ind0.Subject='WIRING' AND ind1.Subject='DIAGRAM' AND ind2.Subject='LUCAS' AND ind0.FindIndex=ind1.FindIndex AND ind0.FindIndex=ind2.FindIndex AND ind0.Src=ind1.Src AND ind0.Src=ind2.Src
- Long lines, yuck.
try:
self._site = getSite(otherlang, familyName)
except ValueError:
raise NoPage('%s is not a local page on %s, and the %s family is not supported by PyWikipediaBot!' % (title, self.site(), familyName
))
[edit] More examples
[edit] BNF
<postal-address> ::= <name-part> <street-address> <zip-part> <name-part> ::= <personal-part> <last-name> <opt-jr-part> <EOL> | <personal-part> <name-part> <personal-part> ::= <first-name> | <initial> "." <street-address> ::= <opt-apt-num> <house-num> <street-name> <EOL> <zip-part> ::= <town-name> "," <state-code> <ZIP-code> <EOL>
[edit] Diff
[edit] Context format
*** /path/to/original ''timestamp'' --- /path/to/new ''timestamp'' *************** *** 1,3 **** --- 1,9 ---- + This is an important + notice! It should + therefore be located at + the beginning of this + document! + This part of the document has stayed the same from version to *************** *** 5,20 **** be shown if it doesn't change. Otherwise, that would not be helping to ! compress the size of the ! changes. ! ! This paragraph contains ! text that is outdated. ! It will be deleted in the ! near future. It is important to spell ! check this dokument. On the other hand, a misspelled word isn't the end of the world. --- 11,20 ---- be shown if it doesn't change. Otherwise, that would not be helping to ! compress anything. It is important to spell ! check this document. On the other hand, a misspelled word isn't the end of the world. *************** *** 22,24 **** --- 22,28 ---- this paragraph needs to be changed. Things can be added after it. + + This paragraph contains + important new additions + to this document.
[edit] Unified format
--- original ''timestamp'' +++ new ''timestamp'' @@ -1,3 +1,9 @@ +This is an important +notice! It should +therefore be located at +the beginning of this +document! + This part of the document has stayed the same from version to @@ -5,16 +11,10 @@ be shown if it doesn't change. Otherwise, that would not be helping to -compress the size of the -changes. - -This paragraph contains -text that is outdated. -It will be deleted in the -near future. +compress anything. It is important to spell -check this dokument. On +check this document. On the other hand, a misspelled word isn't the end of the world. @@ -22,3 +22,7 @@ this paragraph needs to be changed. Things can be added after it. + +This paragraph contains +important new additions +to this document.
[edit] INI
[section1] ; some comment on section1 var1 = abc var2 = 451 [section2] ; another comment var1 = 123 var2 = dfg