From 4fd983277e36e323675e2d77048fb3daaa016dc6 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 03 Apr 2022 00:38:39 +0000
Subject: [PATCH] fix: cjk support + demo page

---
 assets/js/graph.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/assets/js/graph.js b/assets/js/graph.js
index 6a63024..f0b1f7f 100644
--- a/assets/js/graph.js
+++ b/assets/js/graph.js
@@ -185,7 +185,7 @@
   const labels = graphNode.append("text")
     .attr("dx", 12)
     .attr("dy", ".35em")
-    .text((d) => content[decodeURI(d.id).replace(/\s+/g, '-')]?.title || d.id.replace("-", " "))
+    .text((d) => content[d.id]?.title || d.id.replace("-", " "))
     .style("opacity", 0)
     .style("pointer-events", "none")
     .call(drag(simulation));

--
Gitblit v1.10.0