Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Word "for" in comment breaks indentation #46

Closed
dgreensp opened this Issue May 9, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

dgreensp commented May 9, 2012

I ran into this bizarre case today:

function() {
  return [
    function() {
      // the word for affects indentation even in a comment
    },

                  function() {}
                  ];
}

Digging through the source a bit, I think the code under ";; not inside a string literal" needs another case for skipping comments.

Note I have the language set to 150, so I'm not even using array comprehensions! Maybe this array comprehension heuristic should be guarded on language version.

@dgutov dgutov closed this in 39dd8a3 May 10, 2012

Collaborator

dgutov commented May 10, 2012

Thanks for the report.

Contributor

dgreensp commented May 10, 2012

Incredible, thanks for the fast fix!

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