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

comment formatting #2034

Closed
hoodie opened this issue Jan 13, 2012 · 3 comments
Closed

comment formatting #2034

hoodie opened this issue Jan 13, 2012 · 3 comments

Comments

@hoodie
Copy link

hoodie commented Jan 13, 2012

There have already been a few issues about comments in coffeescript. I was wondering what you might think about allowing documentary comments in coffeescript.

/**
 * blocks like these are being used by tools like yuidoc
 *
 */

###
# however in coffeescript you would expect something like this
#
###

###
 * not something like this
 *
###

Means it would be cool if leading '#'s inside a block comment would be turned ' *'.
What do you thing about that?

@jashkenas
Copy link
Owner

I'm not a fan of fancy/strange comment ornamentation. Personally, I'd prefer a language where the only kind of comment is a single character that leads a line.

# Like
# this
# does.

... CoffeeScript also has block comments -- mostly for consistency with block strings and block regexes, but also to allow you to pass comments through to the compiled JS. Changing the way comments work for a particular documentation tool isn't going to happen.

@satyr
Copy link
Collaborator

satyr commented Jan 13, 2012

Related: #1050

@hoodie
Copy link
Author

hoodie commented Jan 15, 2012

what I actually meant whats that, in order to get the first block I wrote you need to write the third one
but it would be nice if coffee-script would turn a leading "#" within a block comment into a "".
This is also because vim for example automatically writes a # at a new line within a block comment, so you always have the second kind of block in there. but after that has been turned into javascript it will look like this
/
*
# inconsistent comment style
*/

that is just not pretty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants