Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mc-butler opened this issue Feb 6, 2020 · 4 comments
Assignees
Labels
area: mcedit mcedit, the built-in text editor prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4060
Reporter gszymaszek (@gszy)
Keywords syntax

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;

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by gszymaszek (@gszy) on Feb 6, 2020 at 8:59 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2020 at 16:45 UTC (comment 1)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2020 at 16:46 UTC (comment 2)

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

Thanks!

Applied as [aa2904e].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2020 at 16:48 UTC (comment 3)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcedit mcedit, the built-in text editor prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants