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 40a8a08 commit 821caefCopy full SHA for 821caef
src/main/resources/embedding/assets/entry.js
@@ -23,10 +23,9 @@ $(function(){
23
return url.replace("/blob/", "/raw/");
24
};
25
26
- function getCommitUrl(x){
27
- let url = x[0]
+ function getCommitUrl(url, filename){
28
url = url.replace("/blob/", "/commit/")
29
- reg = new RegExp('/' + x[4] + '#L\\d+(-L\\d+)?$')
+ reg = new RegExp('/' + filename + '#L\\d+(-L\\d+)?$')
30
return url.replace(reg, "")
31
32
@@ -65,7 +64,7 @@ $(function(){
65
64
if(typeof mat[7] !== "undefined"){
66
endLine = Number(mat[7].replace("-L", ""));
67
68
- let commitUrl = getCommitUrl(mat)
+ let commitUrl = getCommitUrl(url, filename)
69
try{
70
let content = getContent(url);
71
let linesAll = content.split("\n");
0 commit comments