Changeset 70

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

geshi highlight: previous method doesn't fix proper code tag preparsing, now it should working

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/geshi_highlight/manifest.xml

    r69 r70  
    3838                ]]></hook> 
    3939 
    40                 <hook id="ps_parse_message_post_censor"><![CDATA[ 
     40                <hook id="ps_preparse_bbcode_start"><![CDATA[ 
    4141                        $text = preg_replace('#\[code=([a-zA-Z0-9]+)\]#s', '[code]#%$1%#', $text); 
     42                ]]></hook> 
     43                 
     44                <hook id="ps_preparse_bbcode_end"><![CDATA[ 
     45                        $text = preg_replace('#\[code\]\#\%([a-zA-Z0-9]+)\%\##s', '[code=$1]', $text); 
    4246                ]]></hook> 
    4347 
    4448                <hook id="ps_parse_message_pre_split"><![CDATA[ 
    45                         $text = preg_replace_callback('#\[code\]\#\%([a-zA-Z0-9]+)\%\#(.*?)\[/code\]#su', 'geshi_syntax_highlight', $text); 
     49                        $text = preg_replace_callback('#\[code=([a-zA-Z0-9]+)\](.*?)\[/code\]#s', 'geshi_syntax_highlight', $text); 
    4650                ]]></hook> 
    4751