Skip to content

fix(config): only strip comments on json files #611

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

Merged
merged 2 commits into from
Nov 21, 2016

Conversation

dignifiedquire
Copy link
Contributor

Fixes #608

@@ -15,11 +16,17 @@ var yaml = require('js-yaml'),
* @throws {Error} if the file cannot be read.
*/
function loadConfig(filePath) {
var ext = _.last(filePath.split('.'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have the path module available - can this use path.extname instead, to more directly use a method designed for the purpose of getting extensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah of course, not sure how I could forgot about that :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmcw fixed

@tmcw
Copy link
Member

tmcw commented Nov 21, 2016

Awesome, thanks Friedel!

@tmcw tmcw merged commit 70c081f into documentationjs:master Nov 21, 2016
@dignifiedquire dignifiedquire deleted the fix/links-in-notes branch November 21, 2016 18:29
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.

2 participants