mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
20 lines
483 B
JavaScript
20 lines
483 B
JavaScript
var walk = require('../lib/walk'),
|
|
traverse = require('babel-traverse').default;
|
|
|
|
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,
|
|
code: comment.context.code
|
|
};
|
|
if (hasGithub) {
|
|
comment.context.github = '[github]';
|
|
}
|
|
if (path) {
|
|
comment.context.path = path;
|
|
}
|
|
});
|
|
};
|