nextcloud / nextcloud/text

Newlines not handled properly when inserted through a smart picker

Open
#6,497 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: formatting format: markdown low
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:

  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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.