Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newlines not handled properly when inserted through a smart picker #6497

Open
kyteinsky opened this issue Oct 4, 2024 · 1 comment
Open
Labels
1. to develop bug Something isn't working feature: formatting Features related to text formatting and node types format: markdown low

Comments

@kyteinsky
Copy link

kyteinsky commented Oct 4, 2024

Describe the bug
Text inserted from a smart picker that contains multiple newlines is not handled properly.
See original issue: nextcloud/text_templates#13
Related issue: #593

To Reproduce
Steps to reproduce the behavior:

  1. Insert text from smart picker that has multiple newlines, eg. using the text_templates app
  2. Try to delete one newline from the bunch of consecutive newlines
  3. See issue that all newlines in the document are condensed

Expected behavior
Newlines remain intact on modification.

Screenshots
Courtesy @sptcguy
https://github.com/user-attachments/assets/270c6819-235a-4015-984e-31fc3f458237

Server details:

  • Nextcloud version: 31.0.0
  • PHP Version: 8.1
  • Database: MariaDB 10.5

Client details:

  • OS: Linux
  • Browser: Chromium/Firefox
  • Browser version: 128
  • Device: desktop
@kyteinsky kyteinsky added bug Something isn't working feature: formatting Features related to text formatting and node types format: markdown low labels Oct 4, 2024
@juliusknorr
Copy link
Member

juliusknorr commented Nov 6, 2024

Code that is handling this is in

const content = isMarkdown ? markdownit.render(link) : link
I think with the shown example text template we do not detect this as markdown and therefore just insert as plain text so maybe that has an issue with newlines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working feature: formatting Features related to text formatting and node types format: markdown low
Projects
None yet
Development

No branches or pull requests

2 participants