diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-31 12:48:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 16:48:18 +0000 |
commit | 87ccd4bcd14bd67037c709829575f62caf8251bb (patch) | |
tree | d63616c9754a0d50e168d6da0f12140a8cfd1b78 /cli/tsc | |
parent | aa9b94a80eadde7737417eb7d412559bc567c77c (diff) |
fix(lsp): better handling of `data:` urls (#18527)
1. Log instead of error when the referrer can't be found
2. Fixes typescript to resolve data urls correctly. Properly documented
here:
https://github.com/denoland/TypeScript/pull/4/files#diff-180da7c288743d11d8590d30f0c07c48e5dcf291aa671bbea0dd520a9a1359d2
Closes #18524
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/00_typescript.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tsc/00_typescript.js b/cli/tsc/00_typescript.js index 6bbd968a9..bae91eee2 100644 --- a/cli/tsc/00_typescript.js +++ b/cli/tsc/00_typescript.js @@ -6712,6 +6712,9 @@ ${lanes.join("\n")} } return ~path.length; } + if (path.startsWith("data:")) { + return ~path.length; + } return 0; } function getRootLength(path) { @@ -6870,6 +6873,9 @@ ${lanes.join("\n")} } function ensureTrailingDirectorySeparator(path) { if (!hasTrailingDirectorySeparator(path)) { + if (path.startsWith("data:")) { + return path; + } return path + directorySeparator; } return path; |