Open phast184 opened 4 years ago
lineWithURLArray = lineArray.filter(line => line.includes("https:") || line.includes("http:") || line.includes("HTTPS:") || line.includes("HTTP:"));
Line 46, you want to find which line contains the URL by checking if that line includes "http", "https", "HTTP", "HTTPS". However, if that line contains only "https" which is not a valid URL, the result would be wrong.
Good catch! I'll change it so that it includes the :// after
lineWithURLArray = lineArray.filter(line => line.includes("https:") || line.includes("http:") || line.includes("HTTPS:") || line.includes("HTTP:"));
Line 46, you want to find which line contains the URL by checking if that line includes "http", "https", "HTTP", "HTTPS". However, if that line contains only "https" which is not a valid URL, the result would be wrong.