Standardize text/uri-list handling (#152756)

This creates a common set of functions for creating and parsing the `text/uri-list` mime type. As part of this, I also aligned us with the standard, which uses `\r\n` between lines instead of just `\n`
This commit is contained in:
Matt Bierner
2022-06-22 04:53:37 -07:00
committed by GitHub
parent 09fa37468c
commit 321423db2b
5 changed files with 19 additions and 15 deletions

View File

@@ -44,7 +44,7 @@ export async function tryGetUriListSnippet(document: vscode.TextDocument, dataTr
}
const uris: vscode.Uri[] = [];
for (const resource of urlList.split('\n')) {
for (const resource of urlList.split('\r\n')) {
try {
uris.push(vscode.Uri.parse(resource));
} catch {