Ticket #4060 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

PHP syntax highlighting breaks on single quoted strings that end with escaped backslash

Reported by: gszymaszek Owned by: andrew_b
Priority: trivial Milestone: 4.8.25
Component: mcedit Version: master
Keywords: syntax Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master


Consider the following simple PHP code:

$a = 'Aaa\\';
echo $a, PHP_EOL;

There’s an escaped backslash in the $a string, so that the code would print:


mcedit doesn’t see the escaped backslash, it sees an escaped quotation mark and thinks that the rest of the code is still that $a string:

$a = 'xxxx\';
echo $a, PHP_EOL;


0001-Escape-backslashes-in-PHP-single-quote-string.patch (1.1 KB) - added by gszymaszek 4 years ago.

Change History

Changed 4 years ago by gszymaszek

comment:1 Changed 4 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted

comment:2 Changed 4 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset set to committed-master
  • Resolution set to fixed
  • Branch state changed from no branch to merged

comment:3 Changed 4 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.