Skip to content
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

Strip tab indentation in clean utility method #883

Merged
merged 1 commit into from
Jun 13, 2013

Conversation

jugglinmike
Copy link
Contributor

The clean method is intended to normalize function body indentation to
be relative to the first line. Update the implementation to support
tab-indented function bodies (in addition to space-indented bodies).

@bitwiseman
Copy link
Contributor

It doesn't look like you test actually covers the tab case (the description says it does, but i don't see \t in there anywhere.

@jugglinmike
Copy link
Contributor Author

It does, but I'm using literal tab characters. I'm assuming you're looking at the diff on GitHub, which doesn't take any steps to ensure tabs render correctly in HTML. If you look at the patch file for the commit, you'll have an easier time seeing the tabs.

Having said that, your confusion makes me wonder if using \t would make the test more readable...

@bitwiseman
Copy link
Contributor

Yeah, might be a good thing.

The `clean` method is intended to normalize function body indentation to
be relative to the first line. Update the implementation to support
tab-indented function bodies (in addition to space-indented bodies).
@jugglinmike
Copy link
Contributor Author

Happy to oblige, @bitwiseman

@bitwiseman
Copy link
Contributor

tj added a commit that referenced this pull request Jun 13, 2013
Strip tab indentation in `clean` utility method
@tj tj merged commit d66d6f6 into mochajs:master Jun 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants