Ticket #4060 (closed defect: fixed)

Opened 5 years ago

Last modified 5 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

Description

Consider the following simple PHP code:

<?php
$a = 'Aaa\\';
echo $a, PHP_EOL;

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

Aaa\

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:

<?php
$a = 'xxxx\';
echo $a, PHP_EOL;

Attachments

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

Change History

Changed 5 years ago by gszymaszek

comment:1 Changed 5 years ago by andrew_b

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

comment:2 Changed 5 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 5 years ago by andrew_b

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