0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00

Avoid adding indentation for texts with no indent (#156)

* Avoid adding indentation for texts with no indent

* fix previous changelog
This commit is contained in:
Jordi Sala Morales 2024-06-13 10:06:44 +02:00 committed by GitHub
parent 342ab90e69
commit 6fc812a08f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,5 @@
---
"penpot-exporter": minor
"penpot-exporter": patch
---
Translate line endings done with shift+Enter in Figma

View file

@ -0,0 +1,5 @@
---
"penpot-exporter": patch
---
Do not apply indentation to texts with indent zero

View file

@ -63,7 +63,9 @@ export class Paragraph {
return false;
}
private segmentIndent(indent: number): PenpotTextNode {
private segmentIndent(indent: number): PenpotTextNode | undefined {
if (indent === 0) return;
return {
text: ' '.repeat(indent),
fontId: 'sourcesanspro',