-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
There was a problem hiding this 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.
Added a test. |
expect(printBlockString(str, '', true)).to.equal( | ||
joinLines('"""', 'backslash \\', '"""'), | ||
); | ||
}); |
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@hereisnaman Merged 🎉 |
Fixes: #2512
\"""
is not allowed inside aBlockString
, so handled it by putting a\n
between the backslash and triple quotes. The trailing '\n' are already handled.Thanks for the help @IvanGoncharov .