Changeset 44 for branches/geshi_highlight/manifest.xml
- Timestamp:
- 02/14/09 08:47:18 (3 years ago)
- Files:
-
- 1 modified
-
branches/geshi_highlight/manifest.xml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/geshi_highlight/manifest.xml
r14 r44 4 4 <id>geshi_highlight</id> 5 5 <title>GeSHi Highlight</title> 6 <version>1.0. 1</version>6 <version>1.0.2</version> 7 7 <description>Highlights code tags in posts using GeSHi highlighter.</description> 8 8 <author>Daris</author> … … 17 17 <hook id="ps_start"><![CDATA[ 18 18 require_once $ext_info['path'].'/geshi.php'; 19 19 20 if (!function_exists('htmlspecialchars_decode')) 21 { 22 function htmlspecialchars_decode($str) 23 { 24 return strtr($str, array_flip(get_html_translation_table(HTML_SPECIALCHARS))); 25 } 26 } 27 20 28 function geshi_syntax_highlight($matches) 21 29 { 22 global $lang_common;23 24 30 $lang = $matches[1]; 25 31 $source = htmlspecialchars_decode(trim($matches[2])); … … 30 36 return '[code]'.$code.'[/code]'; 31 37 } 38 32 39 ]]></hook> 33 40 34 41 <hook id="ps_parse_message_pre_split"><![CDATA[ 35 42 $text = preg_replace_callback('#\[code=([^\[]+?)\](.*?)\[/code\]#s', 'geshi_syntax_highlight', $text);