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

fix: strings #136

Merged
merged 1 commit into from
Mar 1, 2018
Merged

fix: strings #136

merged 1 commit into from
Mar 1, 2018

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Mar 1, 2018

All buggy things are commented.

Feel free to feedback.

Issue about syntax: #138.

Let's review this and merge as is. It is maximum how we can handle strings right now.

@alexander-akait alexander-akait changed the title [WIP] fix: strings fix: strings Mar 1, 2018
Copy link
Contributor

@mgrip mgrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! 1 thing about escaping single quotes

// $string = 'You can also have embedded\\n newlines in
// strings this way as it is
// okay to do';
$string = 'Arnold once said: "I\\'ll be back"';
Copy link
Contributor

@mgrip mgrip Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing - i think an extra \ got added

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrip yep let's add test, but here all fine with \, jest always escaped special characters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just realized that - thanks! looks good to me!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?php
$string = 'this is a simple string';
// $string = 'You can also have embedded\\n newlines in
Copy link
Contributor

@mgrip mgrip Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should remain 'You can also have embedded\n newlines in, right? <- nvm realized this is how the snapshot gets printed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrip yes

@mgrip mgrip merged commit 037cc38 into master Mar 1, 2018
@alexander-akait alexander-akait deleted the fix-string-escaping branch March 1, 2018 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants