Newlines not handled properly when inserted through a smart picker
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Describe the bug
Text inserted from a smart picker that contains multiple newlines is not handled properly.
See original issue: https://github.com/nextcloud/text_templates/issues/13
Related issue: https://github.com/nextcloud/text/issues/593
To Reproduce
Steps to reproduce the behavior:
- Insert text from smart picker that has multiple newlines, eg. using the
text_templatesapp - Try to delete one newline from the bunch of consecutive newlines
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the smart-picker insertion case in the editor with text containing multiple consecutive newlines, then delete one newline and observe how the document changes. Done means deleting one newline leaves the other newlines intact instead of condensing all newlines in the document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100