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:
+1
-1
@@ -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);
|
||||
|
||||
+1
-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', () => {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ export const parseEditorContent = (json: JSONContent): string => {
|
||||
}
|
||||
|
||||
if (node.type === 'hardBreak') {
|
||||
return '\n';
|
||||
return ' \n';
|
||||
}
|
||||
|
||||
if (node.type === 'variableTag') {
|
||||
|
||||
Reference in New Issue
Block a user