mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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 = "";
|
||||
for (let url of urls) {
|
||||
// Chrome likes to give us the URL twice with a \n
|
||||
const lines = url.split("\n");
|
||||
url = lines[0];
|
||||
url = url.split("\n")[0].trim();
|
||||
text += await urlToLink(url, allowedSuffixes);
|
||||
}
|
||||
return text;
|
||||
|
|
Loading…
Reference in a new issue