Changeset 69

Show
Ignore:
Timestamp:
03/04/09 16:08:26 (3 years ago)
Author:
daris
Message:

geshi highlight: fixed preparse errors when message has more than 1 code tag + release 1.0.4

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/geshi_highlight/manifest.xml

    r53 r69  
    44        <id>geshi_highlight</id> 
    55        <title>GeSHi Highlight</title> 
    6         <version>1.0.3</version> 
     6        <version>1.0.4</version> 
    77        <description>Highlights code tags in posts using GeSHi highlighter.</description> 
    88        <author>Daris</author> 
     
    3838                ]]></hook> 
    3939 
     40                <hook id="ps_parse_message_post_censor"><![CDATA[ 
     41                        $text = preg_replace('#\[code=([a-zA-Z0-9]+)\]#s', '[code]#%$1%#', $text); 
     42                ]]></hook> 
     43 
    4044                <hook id="ps_parse_message_pre_split"><![CDATA[ 
    41                         $text = preg_replace_callback('#\[code=([^\[]+?)\](.*?)\[/code\]#s', 'geshi_syntax_highlight', $text); 
     45                        $text = preg_replace_callback('#\[code\]\#\%([a-zA-Z0-9]+)\%\#(.*?)\[/code\]#su', 'geshi_syntax_highlight', $text); 
    4246                ]]></hook> 
    4347