8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9f63b61 + 81ff705 commit 69a0fdcCopy full SHA for 69a0fdc
lib/github.js
@@ -18,10 +18,14 @@ function getFileRoot(file) {
18
module.exports = function (comment) {
19
var root = getFileRoot(comment.context.file);
20
var urlPrefix = getGithubURLPrefix(root);
21
+ var fileRelativePath = comment.context.file.replace(root + path.sep, '')
22
+ .split(path.sep)
23
+ .join('/');
24
+
25
if (urlPrefix) {
- comment.context.path = comment.context.file.replace(root + '/', '');
26
+ comment.context.path = fileRelativePath;
27
comment.context.github = urlPrefix +
- comment.context.file.replace(root + '/', '') +
28
+ fileRelativePath +
29
'#L' + comment.context.loc.start.line + '-' +
30
'L' + comment.context.loc.end.line;
31
}
0 commit comments