mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Trim leading/trailing whitespace from URL
Windows likes to add extra newlines...
This commit is contained in:
parent
33fb6bf400
commit
0bdeab974f
1 changed files with 1 additions and 2 deletions
|
@ -244,8 +244,7 @@ async function processUrls(
|
||||||
let text = "";
|
let text = "";
|
||||||
for (let url of urls) {
|
for (let url of urls) {
|
||||||
// Chrome likes to give us the URL twice with a \n
|
// Chrome likes to give us the URL twice with a \n
|
||||||
const lines = url.split("\n");
|
url = url.split("\n")[0].trim();
|
||||||
url = lines[0];
|
|
||||||
text += await urlToLink(url, allowedSuffixes);
|
text += await urlToLink(url, allowedSuffixes);
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
|
Loading…
Reference in a new issue