From 8b9a6b274d2347f990bf8e59429d2599bc56f19f Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 5 Jun 2022 13:44:00 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20source-ref-open-vscode=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9windows=E5=B9=B3=E5=8F=B0=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/source-ref-open-vscode/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/source-ref-open-vscode/index.js b/packages/source-ref-open-vscode/index.js index f083fe2c..1219dae9 100644 --- a/packages/source-ref-open-vscode/index.js +++ b/packages/source-ref-open-vscode/index.js @@ -20,7 +20,11 @@ function sourceToId(node) { if (!node.dataset.source) return; const source = node.dataset.source; - const [file, row, column] = source.split(':'); + const splits = source.split(':'); + const column = splits.pop(); + const row = splits.pop(); + const file = splits.join(':'); + if (!sourceMap[file]) { cursor++; sourceMap[file] = cursor;