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

Don't change embedded newlines into \n #253

Closed
aboyton opened this issue Mar 25, 2018 · 3 comments · Fixed by #263
Closed

Don't change embedded newlines into \n #253

aboyton opened this issue Mar 25, 2018 · 3 comments · Fixed by #263

Comments

@aboyton
Copy link

aboyton commented Mar 25, 2018

Related to #29 (although the opposite), I think it would be nice if we also didn't change embedded newlines into inline \ns.

$query =
    'SELECT *
     FROM users
     WHERE u.id IS NULL';

becomes

$query = 'SELECT *\n     FROM users\n     WHERE u.id IS NULL';
@mgrip
Copy link
Contributor

mgrip commented Mar 29, 2018

@evilebottnawi not sure how we want to address this - node.value in the parser doesn't seem to have any differentiation between

$test = "test\nstring";

and

$test = "test
string";

@mgrip
Copy link
Contributor

mgrip commented Mar 29, 2018

maybe we can utilize the new node.raw attribute somehow?

@aboyton
Copy link
Author

aboyton commented Mar 29, 2018

Depending how high priority this is I can try take a look next week.

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

Successfully merging a pull request may close this issue.

2 participants