mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-07 16:12:53 +01:00
ESlint no-cond-assign, no-void, valid-jsdoc
This commit is contained in:
@@ -49,10 +49,10 @@ module.exports = function (Posts) {
|
||||
Posts.relativeToAbsolute = function (content) {
|
||||
// Turns relative links in post body to absolute urls
|
||||
var parsed;
|
||||
var current;
|
||||
var current = urlRegex.exec(content);
|
||||
var absolute;
|
||||
|
||||
while ((current = urlRegex.exec(content)) !== null) {
|
||||
while (current !== null) {
|
||||
if (current[1]) {
|
||||
try {
|
||||
parsed = url.parse(current[1]);
|
||||
@@ -71,6 +71,7 @@ module.exports = function (Posts) {
|
||||
winston.verbose(err.messsage);
|
||||
}
|
||||
}
|
||||
current = urlRegex.exec(content);
|
||||
}
|
||||
|
||||
return content;
|
||||
|
||||
Reference in New Issue
Block a user