diff --git a/public/index.html b/public/index.html index e453566..36a9d9a 100644 --- a/public/index.html +++ b/public/index.html @@ -95,8 +95,6 @@

Hello, this is Haxe dependency viewer. Have fun.

- - diff --git a/src/createGraph.mjs b/src/createGraph.mjs index 18349d2..6ecb69b 100644 --- a/src/createGraph.mjs +++ b/src/createGraph.mjs @@ -75,7 +75,7 @@ export default function createGraph(deps, config) { if (dep.label) continue; if (prefix === null) prefix = dep.path; else while (!dep.path.startsWith(prefix)) { - const parts = prefix.split(/(?!\/)/g); // Split by, but keep `/`. + const parts = prefix.match(/[^\/]+\/?|\//g); // Split by, but keep `/`. parts.pop(); prefix = parts.join(''); if (prefix === "") break;