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

Translate line endings done with shift+Enter in Figma (#154)

* Translate line endings done with shift+Enter in Figma

* add changelog
This commit is contained in:
Jordi Sala Morales 2024-06-13 09:10:11 +02:00 committed by GitHub
parent e9fe86c43a
commit 342ab90e69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

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

View file

@ -27,7 +27,7 @@ export const transformInstanceNode = async (
}
if (isExternalComponent(mainComponent)) {
await registerExternalComponents(mainComponent);
registerExternalComponents(mainComponent);
}
return {
@ -50,7 +50,7 @@ export const transformInstanceNode = async (
};
};
const registerExternalComponents = async (mainComponent: ComponentNode): Promise<void> => {
const registerExternalComponents = (mainComponent: ComponentNode): void => {
let component: ComponentSetNode | ComponentNode = mainComponent;
if (component.parent?.type === 'COMPONENT_SET') {

View file

@ -45,7 +45,7 @@ const splitTextNodeByEOL = (node: PenpotTextNode): PenpotTextNode[] => {
return split.map(text => ({
...node,
text: text
text: text.replace(/\u2028/g, '\n')
}));
};