documentation/test/normalize.js
Tom MacWright 25152edeb9 style(prettier): Use prettier for code formatting (#710)
* style(prettier): Use prettier for code formatting

This saves us style issues. Also adds husky and lint-staged for pre-commit testing

Refs https://github.com/documentationjs/documentation/issues/709
2017-04-10 14:25:45 -04:00

19 lines
413 B
JavaScript

'use strict';
var walk = require('../lib/walk');
module.exports = function(comments) {
return walk(comments, function(comment) {
var hasGithub = !!comment.context.github;
var path = comment.context.path;
comment.context = {
loc: comment.context.loc
};
if (hasGithub) {
comment.context.github = '[github]';
}
if (path) {
comment.context.path = path;
}
});
};