-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
doc: make comment indentation consistent #9518
Conversation
Looking good from my side, but did you check other doc files that this is the only case of such comments? I think there ought to be more similar cases. |
I'd be happy to go the through the rest, but before I do are people happy onsdag 9 november 2016 skrev silverwind notifications@github.com:
|
@nodejs/collaborators any preferences for style of indentation in code samples? I personally prefer the non-indented version. |
IMHO the comments should be above the line it's referring to and unindented. |
I generally agree, but think an exception for stdout could be made. Some people use this style for those: console.log('hello world');
//=> hello world |
Unindented comments LGTM. |
Comments look good unindented +1 for above the line, I get the argument for having stdout below, but I think it's less clear. |
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.
LGTM, nice work. I prefer the comment-after-code style because it's what one would see in the REPL. Let's see if we get a few more approvals.
80e2d81
to
6a1f03c
Compare
I'd like to merge this later today if there are no objections. |
Currently, console.md use different indentation for comments in the code examples. This commit makes the indentation consistent by putting the comments at the beginning of the line (really no indentation that is). I was not sure what is preferred but hopefully comments on the PR will provide guidance..
6a1f03c
to
867deda
Compare
Currently, some of the docs use different indentation for comments in the code examples. This commit makes the indentation consistent by putting the comments at the beginning of the line (really no indentation that is). PR-URL: nodejs#9518 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Landed in 367065b |
Currently, some of the docs use different indentation for comments in the code examples. This commit makes the indentation consistent by putting the comments at the beginning of the line (really no indentation that is). PR-URL: #9518 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Currently, some of the docs use different indentation for comments in the code examples. This commit makes the indentation consistent by putting the comments at the beginning of the line (really no indentation that is). PR-URL: #9518 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Currently, some of the docs use different indentation for comments in the code examples. This commit makes the indentation consistent by putting the comments at the beginning of the line (really no indentation that is). PR-URL: #9518 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
doc
Description of change
Currently, console.md use different indentation for comments in the code
examples. This commit makes the indentation consistent by putting the
comments at the beginning of the line (really no indentation that is). I
was not sure what is preferred but hopefully comments on the PR will
provide guidance..