feat: add org link id support

Resolved #659
This commit is contained in:
Tienson Qin
2020-11-16 14:27:28 +08:00
parent 09be59337a
commit 6edb36a090
5 changed files with 10 additions and 8 deletions

View File

@@ -137,7 +137,7 @@
;; Save it so it'll be parsed correctly in the future
(editor-handler/set-block-property! (:block/uuid chosen)
"CUSTOM_ID"
"ID"
uuid-string)
(when-let [input (gdom/getElement id)]
@@ -180,7 +180,7 @@
(:block/uuid block)
(fn [{:block/keys [level content properties] :as block}]
(let [new-level (+ new-level (- level template-parent-level))
properties' (dissoc (into {} properties) "custom_id" "template")]
properties' (dissoc (into {} properties) "id" "custom_id" "template")]
(-> content
(string/replace-first (apply str (repeat level pattern))
(apply str (repeat new-level pattern)))