Skip to content

Block comments break flow of object assignment #3717

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

Closed
MaffooBristol opened this issue Nov 10, 2014 · 3 comments
Closed

Block comments break flow of object assignment #3717

MaffooBristol opened this issue Nov 10, 2014 · 3 comments

Comments

@MaffooBristol
Copy link

Consider this- it compiles fine:

module.exports = FileSchema.extend
  url:
    type: String
    match: /.*\.[wav,mp3,mp4,aif,aiff]/
    required: true
  meta:
    type: mongoose.Schema.Types.Mixed
# something: true
, {collection: 'audios'}

However, this doesn't- and it throws an error (Error on line 11: unexpected ,):

module.exports = FileSchema.extend
  url:
    type: String
    match: /.*\.[wav,mp3,mp4,aif,aiff]/
    required: true
  meta:
    type: mongoose.Schema.Types.Mixed
###
  something: true
###
, {collection: 'audios'}

Should it not just ignore everything that's within the block comment and compile it as if it weren't there?

@vendethiel
Copy link
Collaborator

#2805, #1559, #2973, #2025, #2445, #1925, #2344, #1375, #3159.

@MaffooBristol
Copy link
Author

Wow. That's an impressive amount of duplicates! 😳

I did do a search for 'block comment', clearly didn't delve deeply enough. Sorry!

@GeoffreyBooth
Copy link
Collaborator

This is fixed via #4572. Sorry it took awhile.

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