jacobrask / styledocco

Automatically generate a style guide from your stylesheets.
http://jacobrask.github.com/styledocco/
MIT License
1.07k stars 119 forks source link

Allow whitespace before single-line comments #107

Closed philschatz closed 10 years ago

philschatz commented 10 years ago

useful for LESS/SCSS which allow scoped selectors and namespaces

For example:

// # Util mixins
// Various mixins that are sprinkled into other selectors
#utils {

  // ## Page Breaks
  #pb {

    // Break before the current element
    .before(@avoid) {
      /* Some rules ... */
    }
  }  
}
marrs commented 10 years ago

Thanks for this patch. I hadn't spotted this edge case yet. Can you do the following before I merge:

  1. Apply it to the dev0.7 branch instead. That branch has much better code coverage.
  2. Provide a test to cover this spec. This may mean modifying an existing spec and/or adding a new one.
  3. Make sure that all the tests pass. This patch actually breaks the CI build as it stands.

You can run the current test suite from the terminal with npm test. All the new tests are written in Mocha/Chai so please use these unless you have a very good reason not to.

philschatz commented 10 years ago

Thanks! I'll add a test and resubmit to the dev0.7 branch. The CI tests pass except for one case which seems to be an intermittent error (Error: SSL Error: CERT_UNTRUSTED)