casperin / web-indent

Automatically exported from code.google.com/p/web-indent
0 stars 0 forks source link

Parsing keywords out of comments #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Following .js code:

function foo() {
  if (true) {
    // comment
  }
  if (true) {
// comment with a keyword else
  }
}

Comments with keywords inside get wrongly indented.

Original issue reported on code.google.com by trojh...@gmail.com on 8 May 2010 at 12:58

GoogleCodeExporter commented 9 years ago
Thanks for the feedback.  I have tentatively fixed this bug by anchoring lines 
at the 
beginning.  So to be a keyword line, the line must begin with said keyword.  I 
will 
produce a more permanent fix by using the syntax ID on commented lines. 

Original comment by pkopr...@gmail.com on 14 May 2010 at 10:28