DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:geshi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
devel:geshi [2013-05-04 21:30]
Klap-in [Example usage]
devel:geshi [2013-12-10 12:31]
109.195.194.200 [Example usage]
Line 5: Line 5:
  
 Please refer to the [[xref>​GeSHi]] class documentation for implementation details. Please refer to the [[xref>​GeSHi]] class documentation for implementation details.
 + 
 ===== Example usage ===== ===== Example usage =====
 Example how DokuWiki applies the highlighter for its code and file blocks. It is embedded in a wrapper method [[xref>​p_xhtml_cached_geshi]] that caches the output to reduce the server load. Example how DokuWiki applies the highlighter for its code and file blocks. It is embedded in a wrapper method [[xref>​p_xhtml_cached_geshi]] that caches the output to reduce the server load.
  
 <code php> <code php>
-$code = '​...syntax to higlight...';​+$code = '... syntax to higlight ...';
 $geshi = new GeSHi($code,​ $language, DOKU_INC . '​inc/​geshi'​);​ $geshi = new GeSHi($code,​ $language, DOKU_INC . '​inc/​geshi'​);​
 $geshi->​set_encoding('​utf-8'​);​ $geshi->​set_encoding('​utf-8'​);​
devel/geshi.txt ยท Last modified: 2013-12-10 12:31 by 109.195.194.200