mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 05:33:02 -05:00
parent
35d9d47e2a
commit
044b09207b
2 changed files with 17 additions and 10 deletions
5
.changeset/gorgeous-rings-compete.md
Normal file
5
.changeset/gorgeous-rings-compete.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"penpot-exporter": patch
|
||||
---
|
||||
|
||||
Fix text layers without text content
|
|
@ -22,19 +22,21 @@ export const transformText = async (node: TextNode): Promise<Partial<TextShape>>
|
|||
content: {
|
||||
type: 'root',
|
||||
verticalAlign: translateVerticalAlign(node.textAlignVertical),
|
||||
children: [
|
||||
{
|
||||
type: 'paragraph-set',
|
||||
children: [
|
||||
children: styledTextSegments.length
|
||||
? [
|
||||
{
|
||||
type: 'paragraph',
|
||||
children: await translateStyleTextSegments(node, styledTextSegments),
|
||||
...(styledTextSegments.length ? transformTextStyle(node, styledTextSegments[0]) : {}),
|
||||
...(await transformFills(node))
|
||||
type: 'paragraph-set',
|
||||
children: [
|
||||
{
|
||||
type: 'paragraph',
|
||||
children: await translateStyleTextSegments(node, styledTextSegments),
|
||||
...transformTextStyle(node, styledTextSegments[0]),
|
||||
...(await transformFills(node))
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
: undefined
|
||||
},
|
||||
growType: translateGrowType(node)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue