Fix line break in richTextV2 field workflow editor (#16462)

Api expect markdown format where '\n' is escape (but not '  \n')

fixes https://github.com/twentyhq/twenty/issues/14976
This commit is contained in:
Etienne
2025-12-10 15:08:08 +01:00
committed by GitHub
parent 89cc59d8ab
commit 5e44781be1
3 changed files with 3 additions and 3 deletions
@@ -90,7 +90,7 @@ export const WithVariable: Story = {
await waitFor(() => {
expect(args.onChange).toHaveBeenCalledWith({
blocknote: null,
markdown: `## Title\nVariable: {{${MOCKED_STEP_ID}.name}}`,
markdown: `## Title \nVariable: {{${MOCKED_STEP_ID}.name}}`,
});
});
expect(args.onChange).toHaveBeenCalledTimes(1);
@@ -265,7 +265,7 @@ describe('parseEditorContent', () => {
],
};
expect(parseEditorContent(input)).toBe('First line\nSecond line');
expect(parseEditorContent(input)).toBe('First line \nSecond line');
});
it('should handle spaces between variables correctly', () => {
@@ -16,7 +16,7 @@ export const parseEditorContent = (json: JSONContent): string => {
}
if (node.type === 'hardBreak') {
return '\n';
return ' \n';
}
if (node.type === 'variableTag') {