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.
1 parent 487336f commit 18ae9e6Copy full SHA for 18ae9e6
src/github.js
@@ -21,15 +21,20 @@ module.exports = function(comment: Comment) {
21
.join('/');
22
23
if (urlPrefix) {
24
+ let startLine;
25
+ let endLine;
26
+
27
+ if (comment.kind == 'typedef') {
28
+ startLine = comment.loc.start.line;
29
+ endLine = comment.loc.end.line;
30
+ } else {
31
+ startLine = comment.context.loc.start.line;
32
+ endLine = comment.context.loc.end.line;
33
+ }
34
35
comment.context.github = {
36
url:
- urlPrefix +
- fileRelativePath +
- '#L' +
- comment.context.loc.start.line +
- '-' +
- 'L' +
- comment.context.loc.end.line,
37
+ urlPrefix + fileRelativePath + '#L' + startLine + '-' + 'L' + endLine,
38
path: fileRelativePath
39
};
40
}
0 commit comments