Skip to content

GeshiNotes

Cameron edited this page Jan 28, 2017 · 1 revision

title: GeshiNotes permalink: /GeshiNotes/

Usage

You need to use the Advanced Tag Format: <code ['language'|list] [n] >source code here</code>

Tag Examples

- advanced code tag <code php> echo "Hello World"; </code>

function ReadLanguages() {

       global $languages, $languagesPath;        $dirHandle = opendir($languagesPath)                         or die("ERROR: Invalid directory path - [$languagesPath], Modify the value of \$languagesPath'");        $pattern = "^(.*)\.php$";        while ($file = readdir($dirHandle))             {                       if( eregi($pattern, $file) )                                                    $languages[] = eregi_replace($pattern, "\\1", $file);         }        closedir($dirHandle);

}

- advanced code tag with line numbers <code php n> echo "Hello World"; </code>

- default code tag <code> echo "Hello World"; </code>

- display a list of supported languages <code list></code>

- if invalid language argument, return the language list <code invalid> echo "Hello World"; </code>

Clone this wiki locally