Skip to content

Conversation

@danbev
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected 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..

@nodejs-github-botnodejs-github-bot added console Issues and PRs related to the console subsystem. doc Issues and PRs related to the documentations. labels Nov 8, 2016
@silverwind
Copy link
Contributor

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.

@danbev
Copy link
ContributorAuthor

I'd be happy to go the through the rest, but before I do are people happy
with no indentation or would a two space indentation be preferred?

onsdag 9 november 2016 skrev silverwind [email protected]:

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.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#9518 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAaY39r1zJu79rwIR5gYT9HDhXzOsgvcks5q8g1-gaJpZM4Ks2q6
.

@silverwind
Copy link
Contributor

@nodejs/collaborators any preferences for style of indentation in code samples? I personally prefer the non-indented version.

@mscdex
Copy link
Contributor

IMHO the comments should be above the line it's referring to and unindented.

@silverwind
Copy link
Contributor

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

@targos
Copy link
Member

Unindented comments LGTM.
I would also prefer to have them before the corresponding line but have no strong opinion.

@gibfahn
Copy link
Member

Comments look good unindented

+1 for above the line, I get the argument for having stdout below, but I think it's less clear.

Copy link
Contributor

@silverwindsilverwind left a 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.

@danbevdanbevforce-pushed the consistent-indent-of-comments branch from 80e2d81 to 6a1f03cCompareNovember 15, 2016 04:54
@danbev
Copy link
ContributorAuthor

@danbev
Copy link
ContributorAuthor

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..
@danbevdanbevforce-pushed the consistent-indent-of-comments branch from 6a1f03c to 867dedaCompareNovember 16, 2016 06:47
danbev added a commit to danbev/node that referenced this pull request Nov 16, 2016
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 <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@danbev
Copy link
ContributorAuthor

Landed in 367065b

@danbevdanbev closed this Nov 16, 2016
addaleax pushed a commit that referenced this pull request Nov 22, 2016
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 <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 13, 2016
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 <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
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 <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
@danbevdanbev deleted the consistent-indent-of-comments branch January 17, 2017 07:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consoleIssues and PRs related to the console subsystem.docIssues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@danbev@silverwind@mscdex@targos@gibfahn@not-an-aardvark@MylesBorins@nodejs-github-bot