Skip to content

Commit

Permalink
fix: renderer not rendering in property
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 authored and tiensonqin committed Mar 28, 2022
1 parent fc17f57 commit 8e2e837
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/frontend/components/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,12 @@
(util/format "((%s))" id)]))))

(defn inline-text
[format v]
(when (string? v)
(let [inline-list (mldoc/inline->edn v (mldoc/default-config format))]
[:div.inline.mr-1 (map-inline {} inline-list)])))
([format v]
(inline-text {} format v))
([config format v]
(when (string? v)
(let [inline-list (mldoc/inline->edn v (mldoc/default-config format))]
[:div.inline.mr-1 (map-inline config inline-list)]))))

(defn- render-macro
[config name arguments macro-content format]
Expand Down Expand Up @@ -1680,7 +1682,7 @@
(util/unquote-string v)

:else
(inline-text (:block/format block) (str v)))]))
(inline-text config (:block/format block) (str v)))]))

(rum/defc properties-cp
[config block]
Expand Down
5 changes: 5 additions & 0 deletions src/main/logseq/api.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
[frontend.handler.notification :as notification]
[frontend.handler.page :as page-handler]
[frontend.handler.plugin :as plugin-handler]
[frontend.handler.ui :as ui-handler]
[frontend.modules.outliner.core :as outliner]
[frontend.modules.outliner.tree :as outliner-tree]
[frontend.handler.command-palette :as palette-handler]
Expand Down Expand Up @@ -640,3 +641,7 @@
(get @state/state (keyword path))
@state/state)
(bean/->js)))

(defn ^:export __re_render_root
[]
(ui-handler/re-render-root!))

0 comments on commit 8e2e837

Please sign in to comment.