-
Notifications
You must be signed in to change notification settings - Fork 117
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 multiline comments #146
Conversation
As mentioned in salesforce-ux#139
Thanks for the contribution! Before we can merge this, we need @iilei to sign the Salesforce Contributor License Agreement. |
lib/__tests__/util.js
Outdated
lines | ||
of | ||
comments | ||
`.slice(1); |
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.
Open for suggestions. My intention was to make the difference between input / output most comprehensible.
854dcdc
to
ae2cfa3
Compare
Registers the following handlebars helpers: * _cstylecomment_ marks text as C-Style comment * _commoncomment_ line count based: applies C-Style or single line: '//' * _indent (size=2)_ indents lines with 2 spaces (default size) Relates to salesforce-ux#139
ae2cfa3
to
9646d9b
Compare
This looks really good! I was talking with @kaelig about how comments are handled and wanted to get your thoughts on removing |
Yes makes sense. For making the changes easy to understand I would simply add an extra commit. If you prefer a single commit in the git history I can also squash the changes into a single commit. |
Additional commits are fine with me |
Drop `//` entirely in favour of `/* */` as discussed with @aputinski See Pull Request salesforce-ux#146 for more context
Thanks for making those changes — this is feeling really good! |
As mentioned in #139 here is my suggested change to fix handling of multiline comments.
The
commonComment
function determines by line count whether to chose Double-Slashes//
or C-Style comments/* ... */
For better consistency I also updated other formats than common.js - An extra commit intended to increase comprehensibility.
A bit of context for the LineBreak Character can be found at the eslint repo