etab
etab copied to clipboard
Add support for all repositories (regardless of code style)
This PR fixes this list of issues I found in the script:
- Doesn't work license headers and code documentation, which are written like so:
This should render as:/** * The following object does stuff * @type Object */ var obj = { longValueName: "This string is long", foo: "foo", bar: "bar", getBaz = function getBaz() { return bar; } }
But because of the does line start with a space check in/** * The following object does stuff * @type Object */ var obj = { longValueName: "This string is long", foo: "foo", bar: "bar", getBaz = function getBaz() { return bar; } }index.js#41, this doesn't happen, because the second line of this file turns elastic tabstops off. - Fixes broken tab size:
This is done by using the
chunit instead of theemunit - Fixes broken tab alignment:
This is done by ensuring that the
wrapAllTabs()function doesn't try to wrap a tab multiple times. - Moves the custom CSS into
github.user.cssto be loaded by Stylus or Stylish. This makes it an optional feature rather than something that users are forced to use.
Thank you for the PR. It would be better if you could separate it to multiple PRs for each feature/bugfix.
@hax I have split off this PR into #4, #5 and #6. #4 and #6 are ready to be merged.