Merge pull request #259 from wakatime/fix-235
fix: return entire url when loggingType is `entire url` issue #235
This commit is contained in:
@@ -237,15 +237,6 @@ class WakaTimeCore {
|
|||||||
.replace(cleanLine.substring(projectIndicatorIndex), '')
|
.replace(cleanLine.substring(projectIndicatorIndex), '')
|
||||||
.replace(/\/$/, '');
|
.replace(/\/$/, '');
|
||||||
}
|
}
|
||||||
const schemaHttpExists = url.match(/^http:\/\//i);
|
|
||||||
const schemaHttpsExists = url.match(/^https:\/\//i);
|
|
||||||
let schema = '';
|
|
||||||
if (schemaHttpExists) {
|
|
||||||
schema = 'http://';
|
|
||||||
}
|
|
||||||
if (schemaHttpsExists) {
|
|
||||||
schema = 'https://';
|
|
||||||
}
|
|
||||||
const cleanUrl = url
|
const cleanUrl = url
|
||||||
.trim()
|
.trim()
|
||||||
.replace(/(\/|@@)$/, '')
|
.replace(/(\/|@@)$/, '')
|
||||||
@@ -254,7 +245,7 @@ class WakaTimeCore {
|
|||||||
if (startsWithUrl) {
|
if (startsWithUrl) {
|
||||||
return {
|
return {
|
||||||
project: projectName,
|
project: projectName,
|
||||||
url: schema + urlFromLine,
|
url,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +255,7 @@ class WakaTimeCore {
|
|||||||
if (lineRe.test(url)) {
|
if (lineRe.test(url)) {
|
||||||
return {
|
return {
|
||||||
project: null,
|
project: null,
|
||||||
url: schema + urlFromLine,
|
url,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user