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

Merge branch 'main' into feature/autolayout

This commit is contained in:
Alex Sánchez 2024-06-13 10:03:09 +02:00
commit d2ab27b887
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
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

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

View file

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