You are here: PSPad forum > Bug report / Hlášení chyb > another glitch in multihighlighter

another glitch in multihighlighter

#1 another glitch in multihighlighter

Posted by: cyberchicken | Date: 2015-09-01 19:00 | IP: IP Logged

the following (tested) code is wrongly highlighted:

//*
echo "branch one";
/*/
echo "branch two";
//*/

It represents a basic form of a common trick: with a simple add/remove of the first forward slash you can switch from branch A to B.
It is very useful because during developmente you have a good visual hint of what code you are running (that you missed usingif(true/false)).

But in Pspad when branch A is active, branch B doesn't look commentend.
Somehow the regex fails to recognize "/*/" as the beginning of a comment.
I know the regexps don't have the expressive power of languages like php, but in this case maybe it can be fixed.

Thank you!

Options: Reply | Quote | Up ^


#2 Re: another glitch in multihighlighter

Posted by: cyberchicken | Date: 2015-09-01 19:04 | IP: IP Logged

Pardon me. Let be even clearer:


/*/
echo "branch three";
*/

This code doesn't look commented, but it is, according to php compiler.

It looks simple, that's why I hope that it can be fixed in the regexp.

Thank you

Options: Reply | Quote | Up ^


#3 Re: another glitch in multihighlighter

Posted by: pspad | Date: 2015-09-01 19:33 | IP: IP Logged

You are right, there is a problem with /*/ construction.
I will try to fix it.

Options: Reply | Quote | Up ^


#4 Re: another glitch in multihighlighter

Posted by: pspad | Date: 2015-09-11 12:15 | IP: IP Logged

Fixed, available in the next build

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR