You are here: PSPad forum > English discussion forum > Re: Bug? Regex breaks PHP Code Highlighting
Posted by: jask | Date: 2013-04-18 14:03 | IP: IP Logged
Hi,
I have this (working) Regex that kills all kinds of empty <p> Tags in my Output, Unfortunately in my PSPad this breaks the PHP Hightlighting. Everything after the regex ist just black text. Can anyone confirm this? Any workaround?
'#<p>(\s| |</?\s?br\s?/?>)*</?p>#'
Thanks
Posted by: myf | Date: 2013-04-18 18:19 | IP: IP Logged
Yup, it does in HTML Multihighlighter
<?php
var $a = '#<p>(\s| |</?\s?br\s?/?>)*</?p>#';
var $b = $a;
?>
the "?>" ends PHP block for PSPad and returns to HTML, so "hotfix" could be anything what prevents occurence of such string, eg
… or you if it is plain PHP file, use PHP highlighter instead and you may leave source intact.
Edited 1 time(s). Last edit at 2013-04-18 18:28 by myf.
Posted by: carbonize | Date: 2013-04-18 20:21 | IP: IP Logged
It's a known issue with HTML Multihighlighter. As myf says switch to just PHP highlighting.
--
Carbonize
Posted by: jask | Date: 2013-04-24 13:26 | IP: IP Logged
Well, that was easy, switched to PHP Hightling and everything's fine. Thanks guys.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR