You are here: PSPad forum > Bug report / Hlášení chyb > Re: 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!
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
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.
Posted by: pspad | Date: 2015-09-11 12:15 | IP: IP Logged
Fixed, available in the next build
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