author | Dan |
Fri, 29 May 2009 19:40:15 -0400 | |
changeset 3 | f3e2bbbd2155 |
parent 2 | 9e3258dfae15 |
child 4 | 97d85c22ced7 |
permissions | -rwxr-xr-x |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
1 |
<?php |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
2 |
/* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
3 |
Plugin Name: GeSHi syntax highlighting |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
4 |
Plugin URI: http://enanocms.org/GeSHi_support |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
5 |
Description: Adds syntax highlighting support using the GeSHi engine. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
6 |
Author: Dan Fuhry |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
7 |
Version: 0.1 |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
8 |
Author URI: http://enanocms.org/ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
9 |
*/ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
10 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
11 |
/* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
12 |
* GeSHi highlighting plugin for Enano |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
13 |
* Version 0.1 |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
14 |
* Copyright (C) 2007 Dan Fuhry |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
15 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
16 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
17 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
18 |
* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
19 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
20 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
21 |
*/ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
22 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
23 |
global $db, $session, $paths, $template, $plugins; // Common objects |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
24 |
$GLOBALS['geshi_supported_formats'] = array( |
2 | 25 |
'abap', 'actionscript3', 'actionscript', 'ada', 'apache', 'applescript', 'apt_sources', 'asm', 'asp', 'autoit', 'avisynth', 'bash', 'basic4gl', 'bf', 'blitzbasic', 'bnf', 'boo', 'caddcl', 'cadlisp', 'cfdg', 'cfm', 'cil', 'c_mac', 'cobol', 'c', 'cpp', 'cpp-qt', 'csharp', 'css', 'delphi', 'diff', 'div', 'dos', 'dot', 'd', 'eiffel', 'email', 'fortran', 'freebasic', 'genero', 'gettext', 'glsl', 'gml', 'gnuplot', 'groovy', 'haskell', 'hq9plus', 'html', 'idl', 'ini', 'inno', 'intercal', 'io', 'java5', 'java', 'javascript', 'kixtart', 'klonec', 'klonecpp', 'latex', 'lisp', 'lolcode', 'lotusformulas', 'lotusscript', 'lscript', 'lua', 'm68k', 'make', 'matlab', 'mirc', 'mpasm', 'mxml', 'mysql', 'nsis', 'objc', 'ocaml-brief', 'ocaml', 'oobas', 'oracle11', 'oracle8', 'pascal', 'perl', 'per', 'php-brief', 'php', 'pic16', 'pixelbender', 'plsql', 'povray', 'powershell', 'progress', 'prolog', 'providex', 'python', 'qbasic', 'rails', 'reg', 'robots', 'ruby', 'sas', 'scala', 'scheme', 'scilab', 'sdlbasic', 'smalltalk', 'smarty', 'sql', 'tcl', 'teraterm', 'text', 'thinbasic', 'tsql', 'typoscript', 'vbnet', 'vb', 'verilog', 'vhdl', 'vim', 'visualfoxpro', 'visualprolog', 'whitespace', 'winbatch', 'xml', 'xorg_conf', 'xpp', 'z80' |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
26 |
); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
27 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
28 |
// Knock out the existing <code> tag support |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
29 |
$plugins->attachHook('text_wiki_construct', 'geshi_disable_tw_code($this);'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
30 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
31 |
function geshi_disable_tw_code($tw) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
32 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
33 |
$tw->disable[] = 'Code'; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
34 |
foreach ( $tw->rules as $i => $rule ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
35 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
36 |
if ( $rule == 'Code' ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
37 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
38 |
unset($tw->rules[$i]); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
39 |
return true; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
40 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
41 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
42 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
43 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
44 |
// Prevent <code> tags from being stripped or sanitized (the plugin will handle all sanitation) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
45 |
$plugins->attachHook('render_sanitize_pre', 'geshi_strip_code($text, $geshi_code_blocks, $random_id);'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
46 |
$plugins->attachHook('render_sanitize_post', 'geshi_restore_code($text, $geshi_code_blocks, $random_id);'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
47 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
48 |
function geshi_strip_code(&$text, &$codeblocks, $random_id) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
49 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
50 |
global $geshi_supported_formats; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
51 |
$codeblocks = array(); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
52 |
$sf = '(' . implode('|', $geshi_supported_formats) . ')'; |
2 | 53 |
$regexp = '/<(code|source) (?:type|lang)="?' . $sf . '"?>(.*?)<\/\\1>/s'; |
54 |
preg_match_all($regexp, $text, $matches); |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
55 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
56 |
// for debug |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
57 |
/* |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
58 |
if ( strstr($text, '<code type') ) |
2 | 59 |
die('processing codes: <pre>' . htmlspecialchars(print_r($matches, true)) . '</pre><pre>' . htmlspecialchars($text) . '</pre>' . htmlspecialchars($regexp)); |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
60 |
*/ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
61 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
62 |
foreach ( $matches[0] as $i => $match ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
63 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
64 |
$codeblocks[$i] = array( |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
65 |
'match' => $match, |
2 | 66 |
'lang' => $matches[2][$i], |
67 |
'code' => $matches[3][$i] |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
68 |
); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
69 |
$text = str_replace_once($match, "{GESHI_BLOCK:$i:$random_id}", $text); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
70 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
71 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
72 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
73 |
function geshi_restore_code(&$text, &$codeblocks, $random_id) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
74 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
75 |
foreach ( $codeblocks as $i => $match ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
76 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
77 |
$text = str_replace_once("{GESHI_BLOCK:$i:$random_id}", $match['match'], $text); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
78 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
79 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
80 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
81 |
// Formatter hook - where the actual highlighting is performed |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
82 |
$plugins->attachHook('render_wikiformat_veryearly', 'geshi_strip_code($text, $codeblocks, $random_id);'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
83 |
$plugins->attachHook('render_wikiformat_post', 'geshi_perform_highlight($result, $codeblocks, $random_id);'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
84 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
85 |
function geshi_perform_highlight(&$text, &$codeblocks, $random_id) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
86 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
87 |
static $did_header_tweak = false; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
88 |
if ( !$did_header_tweak ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
89 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
90 |
$did_header_tweak = true; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
91 |
global $template; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
92 |
$template->add_header('<style type="text/css"> |
2 | 93 |
.geshi_highlighted { |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
94 |
max-height: 1000000px !important; |
2 | 95 |
width: 600px !important; |
96 |
clip: rect(0px,auto,auto,0px); |
|
97 |
overflow: auto; |
|
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
98 |
} |
2 | 99 |
.geshi_highlighted a { |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
100 |
background-image: none !important; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
101 |
padding-right: 0 !important; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
102 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
103 |
</style> |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
104 |
'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
105 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
106 |
if ( !defined('GESHI_ROOT') ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
107 |
define('GESHI_ROOT', ENANO_ROOT . '/plugins/geshi/'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
108 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
109 |
require_once ( GESHI_ROOT . '/base.php' ); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
110 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
111 |
foreach ( $codeblocks as $i => $match ) |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
112 |
{ |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
113 |
$lang =& $match['lang']; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
114 |
$code =& $match['code']; |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
115 |
|
2 | 116 |
$geshi = new GeSHi(trim($code), $lang, null); |
1
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
117 |
$geshi->set_header_type(GESHI_HEADER_PRE); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
118 |
// $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
119 |
$geshi->set_overall_class('geshi_highlighted'); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
120 |
$parsed = $geshi->parse_code(); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
121 |
|
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
122 |
$text = str_replace_once("{GESHI_BLOCK:$i:$random_id}", $parsed, $text); |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
123 |
} |
c715631f809a
First working commit. Works using <code type="whatvever">...</code>. Supports all languages supported by default in GeSHi
Dan
parents:
0
diff
changeset
|
124 |
} |