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

PsySH does not escape backslash and other glitches. #351

Open
beyondlimits opened this issue Feb 5, 2017 · 2 comments
Open

PsySH does not escape backslash and other glitches. #351

beyondlimits opened this issue Feb 5, 2017 · 2 comments
Labels

Comments

@beyondlimits
Copy link

Windows 7, PHP 7.1.0, PsySH v0.8.1
Since \ character is not escaped properly, it creates ambiguity whether "\n" is a new line character or a backslash followed by a n.

>>> "\n"
=> "\n"
>>> "\\n"
=> "\n"

Other strings containing backslash also exhibit weird behavior:

>>> "\<<"
=> "<<"
>>> "\\<<"
=> "<<"
>>> "\\\<<"
=> "<<"
>>> "\\\\<<"
=> "<<"
>>> "\\\\\<<"
=> "\<<"
@bobthecow bobthecow added the bug label Feb 13, 2017
@bobthecow
Copy link
Owner

For the \\n issue, it should be using color to disambiguate. Does it show the \ and \n in different colors for you?

Some backslash issues are fixed with #359, but the ones with \< (and all sorts of variants around it) persist because that's how symphony console escapes their color tags, and IIRC they have some logic in there to prevent double escaping… I'll keep this issue around and try to make some more progress on a fix for this.

@beyondlimits
Copy link
Author

For the \\n issue, it should be using color to disambiguate. Does it show the \ and \n in different colors for you?

Indeed. I just had to use better terminal than the default one delivered with Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants