Kaynağa Gözat

fix: asset links with regex characters not getting updated

Fixes https://github.com/logseq/db-test/issues/358
Gabriel Horner 4 ay önce
ebeveyn
işleme
7968058d4b

+ 1 - 1
deps/graph-parser/src/logseq/graph_parser/exporter.cljs

@@ -993,7 +993,7 @@
   (reduce (fn [acc [asset-name asset-uuid]]
             (let [new-title (string/replace acc
                                             (re-pattern (str "!?\\[[^\\]]*?\\]\\([^\\)]*?"
-                                                             asset-name
+                                                             (common-util/escape-regex-chars asset-name)
                                                              "\\)(\\{[^}]*\\})?"))
                                             (page-ref/->page-ref asset-uuid))]
               (when (string/includes? new-title asset-name)