瀏覽代碼

Merge pull request #10244 from overleaf/ii-jump-to-error

[web] Jump to error on files with double slash

GitOrigin-RevId: eec2ac6ba7a34d32f757f5e3a088e92d0d494422
Brian Gough 4 年之前
父節點
當前提交
db15c83c35
共有 1 個文件被更改,包括 1 次插入 和 0 次删除
  1. 1 0
      services/web/frontend/js/features/pdf-preview/util/output-files.js

+ 1 - 0
services/web/frontend/js/features/pdf-preview/util/output-files.js

@@ -167,6 +167,7 @@ function buildURL(file, pdfDownloadDomain) {
 }
 }
 
 
 function normalizeFilePath(path, rootDocDirname) {
 function normalizeFilePath(path, rootDocDirname) {
+  path = path.replace(/\/\//g, '/')
   path = path.replace(
   path = path.replace(
     /^.*\/compiles\/[0-9a-f]{24}(-[0-9a-f]{24})?\/(\.\/)?/,
     /^.*\/compiles\/[0-9a-f]{24}(-[0-9a-f]{24})?\/(\.\/)?/,
     ''
     ''