You are here: PSPad forum > Bug report / Hlášení chyb > PHP highlighting stops if ?> is used in code

PHP highlighting stops if ?> is used in code

#1 PHP highlighting stops if ?> is used in code

Posted by: PaulPic | Date: 2014-10-29 20:45 | IP: IP Logged

Sample from ganon library (ganon.php):


function parse_php() {
$start = $this->pos;
if ($this->next_pos('?>', false) !== self::TOK_UNKNOWN) {
$this->pos -= 2;
}
$len = $this->pos - 1 - $start;
$this->status['text'] = (($len > 0) ? substr($this->doc, $start + 1, $len) : '');
$this->status['last_pos'] = ++$this->pos;
return true;
}

Highlighting stops at line 3 ...

Options: Reply | Quote | Up ^


#2 Re: PHP highlighting stops if ?> is used in code

Posted by: pspad | Date: 2014-10-29 20:54 | IP: IP Logged

The multihighlighter uses regular expressions to detect start and end of included scripting. Nobody send me regular expression what can solve all situations and possibilities with PHP end of the script. If you can send me it, I will fix it.

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