tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

Line breaks should be preserved with `setCodeBlock` & `toggleCodeBlock`

Open rfgamaral opened this issue 3 years ago • 2 comments

What’s the bug you are facing?

When we attempt to convert a paragraph with multiple lines (i.e. with line breaks created with Shift + Enter) to a code block, the multiple lines are not preserved.

https://user-images.githubusercontent.com/96476/169887950-bdf9213a-93c5-43e6-9096-f7945a19bba9.mp4

Which browser was this experienced in? Are any special extensions installed?

Any browser. No, special extensions.

How can we reproduce the bug on our side?

With the default example editor, type:

Line 1<Shift + Enter>
Line 2

And then use the Mod + Alt + C shortcut to convert the paragraph into a code block (or use the code block toolbar button).

Can you provide a CodeSandbox?

n/a

What did you expect to happen?

Line breaks should be preserved: the code block should have multiple lines.

Anything to add? (optional)

No response

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [X] Yes, I’m a sponsor. 💖 (on behalf of Doist)

rfgamaral avatar May 23 '22 18:05 rfgamaral

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 22 '22 21:07 stale[bot]

@bdbch This issue still exists, do you think this could be reopened, and possibly some attention?

rfgamaral avatar Sep 10 '22 20:09 rfgamaral

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Feb 19 '23 00:02 github-actions[bot]

bump

bdbch avatar Feb 19 '23 00:02 bdbch

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 06 '23 00:06 github-actions[bot]

@bdbch This is still happening.

Can we have a label that prevents github-actions from closing an issue that represents a real valid bug?

rfgamaral avatar Jun 23 '23 08:06 rfgamaral