From: Benny B. <Ben...@gm...> - 2009-07-19 09:30:59
|
> Made modifications to the regex and getting some very weird output using > 1.0.8.4: > This regex setting: > 'REGEXPS' => array( > //Hex numbers > 0 => '\$[0-9a-fA-F]+', > //Characters > 1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})', > 2 => array(GESHI_SEARCH => '(asm)(.*)(end)', > GESHI_REPLACE => '\\2', > GESHI_MODIFIERS => 'sU', > GESHI_BEFORE => '\\1', > GESHI_AFTER => '\\3' > ) > ), > with the style above, produces this output (no classes) For Commenting better use COMMENT_REGEXP; normal regexp are handled quite late in the highlighting process and thus won't match if comments break them into parts. Also you need to match \b on word boundaries else you will get an accidential block termination on identifiers like EndOfFile and the like. > Also, I'm trying to add another Keyword "section" and getting this error: > Undefined offset: 5 in C:\wamp\www\geshi.1.0.8.4\geshi.php on line 3269 > > I added this: > > 'KEYWORDS' => array( > . > . > . > 5 => array( > 'Region' > ), > ), > > with this style: > 'STYLES' => array( > 'KEYWORDS' => array( > 1 => 'color: #000000; font-weight: bold;', > 2 => 'color: #000000; font-weight: bold;', > 3 => 'color: #000000;', > 4 => 'color: #000000;', > 5 => 'color: #C0C0C0;', > ), > > This is for the Region directive in Delphi.Net to make it show like in > Visual Studio. I'm not sure how it shows in Delphi.Net Use the language file validation script (langcheck) and it will show you the error ... Regards, BenBE. |