mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 12:58:55 +00:00
🐛 Add missing styles to the empty node on editor-v1
This commit is contained in:
parent
e1c5a32fcb
commit
7fde1436e1
@ -292,7 +292,7 @@
|
|||||||
(fix-gradients)
|
(fix-gradients)
|
||||||
(assoc :text text))))
|
(assoc :text text))))
|
||||||
|
|
||||||
(split-texts [text styles]
|
(split-texts [text styles data]
|
||||||
(let [cpoints (text->code-points text)
|
(let [cpoints (text->code-points text)
|
||||||
children (->> (parse-draft-styles styles)
|
children (->> (parse-draft-styles styles)
|
||||||
(build-style-index (count cpoints))
|
(build-style-index (count cpoints))
|
||||||
@ -301,7 +301,7 @@
|
|||||||
(mapv #(extract-text cpoints %)))]
|
(mapv #(extract-text cpoints %)))]
|
||||||
(cond-> children
|
(cond-> children
|
||||||
(empty? children)
|
(empty? children)
|
||||||
(conj {:text ""}))))
|
(conj (assoc data :text "")))))
|
||||||
|
|
||||||
(build-paragraph [block]
|
(build-paragraph [block]
|
||||||
(let [key (get block :key)
|
(let [key (get block :key)
|
||||||
@ -312,7 +312,7 @@
|
|||||||
(-> data
|
(-> data
|
||||||
(assoc :key key)
|
(assoc :key key)
|
||||||
(assoc :type "paragraph")
|
(assoc :type "paragraph")
|
||||||
(assoc :children (split-texts text styles)))))]
|
(assoc :children (split-texts text styles data)))))]
|
||||||
|
|
||||||
{:type "root"
|
{:type "root"
|
||||||
:children
|
:children
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user