Fix drag and drop escaping (#18965)

This commit is contained in:
Tommaso Sciortino
2026-02-12 18:27:56 -08:00
committed by GitHub
parent 00f73b73bc
commit d82f66973f
8 changed files with 492 additions and 399 deletions

View File

@@ -2814,15 +2814,7 @@ export function useTextBuffer({
paste &&
escapePastedPaths
) {
let potentialPath = ch.trim();
const quoteMatch = potentialPath.match(/^'(.*)'$/);
if (quoteMatch) {
potentialPath = quoteMatch[1];
}
potentialPath = potentialPath.trim();
const processed = parsePastedPaths(potentialPath);
const processed = parsePastedPaths(ch.trim());
if (processed) {
textToInsert = processed;
}