mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 21:22:15 +02:00
🐛 Fix problem with highlight and fonts
This commit is contained in:
parent
c609d2dec6
commit
aab53b40bd
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
["highlight.js" :as hljs]
|
["highlight.js" :as hljs]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.main.ui.context :as ctx]
|
[app.main.ui.context :as ctx]
|
||||||
|
[app.util.dom :as dom]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
|
@ -19,8 +20,10 @@
|
||||||
(let [new-css-system (mf/use-ctx ctx/new-css-system)
|
(let [new-css-system (mf/use-ctx ctx/new-css-system)
|
||||||
block-ref (mf/use-ref)
|
block-ref (mf/use-ref)
|
||||||
code (str/trim code)]
|
code (str/trim code)]
|
||||||
(mf/with-effect [code type]
|
(mf/with-effect
|
||||||
|
[code type]
|
||||||
(when-let [node (mf/ref-val block-ref)]
|
(when-let [node (mf/ref-val block-ref)]
|
||||||
|
(dom/set-data! node "highlighted" nil)
|
||||||
(hljs/highlightElement node)))
|
(hljs/highlightElement node)))
|
||||||
|
|
||||||
(if new-css-system
|
(if new-css-system
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue