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

BlockString: print multi line for trailing backslash #2560

Merged
merged 1 commit into from May 18, 2020

Conversation

thenamankumar
Copy link
Contributor

Fixes: #2512

\""" is not allowed inside a BlockString, so handled it by putting a \n between the backslash and triple quotes. The trailing '\n' are already handled.

Thanks for the help @IvanGoncharov .

Copy link
Member

@IvanGoncharov IvanGoncharov left a comment

Choose a reason for hiding this comment

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

@hereisnaman Looks great 👍
The next step is to write tests.

@IvanGoncharov IvanGoncharov changed the title [Issue: 2512] BlockString: print multi line for trailing backslash BlockString: print multi line for trailing backslash May 17, 2020
@thenamankumar
Copy link
Contributor Author

@hereisnaman Looks great 👍
The next step is to write tests.

Added a test.

expect(printBlockString(str, '', true)).to.equal(
joinLines('"""', 'backslash \\', '"""'),
);
});
Copy link
Member

Choose a reason for hiding this comment

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

It makes more sense to move it one test up since it has the same logic as those tests.
Also joinLines make sense only in tests related to "indent".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@IvanGoncharov
Copy link
Member

@hereisnaman Merged 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

printSchema produces incorrect AST for descriptions ending in \ (backslash)
2 participants