Syntax Highlighter

By tsangktsangk


Uses the Syntax Highlighter Library in

The type attribute can be any of the below:

  • C++: cpp
  • C#: csharp
  • CSS: css
  • Java: java
  • Javascript: jscript
  • PHP: php
  • Pythod: python
  • Ruby: ruby
  • SQL: sql
  • VisualBasic: vb
  • XML: xml
  • Perl: perl


[[include :snippets:syntax type=cpp]]
int main()
printf("some code here like this.");
[[include :snippets:syntax-end]]

renders this:

Thanks to tsangk for this great snippet: conditional-blocks

text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]

Other snippets posted by tsangk

URL Title with Slash Redirect - 04 Jan 2018 11:32
404 (Page does not exist) Redirect - 20 Nov 2012 11:40
Custom HTML Blocks - 25 Oct 2012 11:30
Conditional Blocks - 15 Feb 2012 00:36

Rate this solution

If you think this solution is useful — rate it up!

rating: +11+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License