Ticket #4060 (closed defect: fixed)
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
Change History
Changed 5 years ago by gszymaszek
- Attachment 0001-Escape-backslashes-in-PHP-single-quote-string.patch added
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
Thanks!
Applied as [aa2904eebc557fd2073cebb05ae951f2b4c38c12].
Note: See
TracTickets for help on using
tickets.