mirror of
https://github.com/penpot/penpot.git
synced 2025-03-26 06:31:26 -05: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]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.main.ui.context :as ctx]
|
||||
[app.util.dom :as dom]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
|
@ -19,8 +20,10 @@
|
|||
(let [new-css-system (mf/use-ctx ctx/new-css-system)
|
||||
block-ref (mf/use-ref)
|
||||
code (str/trim code)]
|
||||
(mf/with-effect [code type]
|
||||
(mf/with-effect
|
||||
[code type]
|
||||
(when-let [node (mf/ref-val block-ref)]
|
||||
(dom/set-data! node "highlighted" nil)
|
||||
(hljs/highlightElement node)))
|
||||
|
||||
(if new-css-system
|
||||
|
|
Loading…
Add table
Reference in a new issue