Skip to content

Newlines aren't properly trimmed #2858

@u9000-Nine

Description

@u9000-Nine

Describe the bug

When there is more than one trailing/leading newline in a message, only the last/first one is removed before sending the message. This also occurs with multiple blank lines in the middle of a message.

Reproduction

  1. Send the following message (line numbers added for clarity. remove before sending):
1
2
3 foo
4
5
6 bar
7
8
  1. Observe that it sends the following:
1
2 foo
3
4
5 bar
6

Expected behavior

Newlines would be trimmed properly:

1 foo
2
3 bar

System info

OS: Windows 10
Browser: Helium version 0.9.4.1
Cinny version: v1.11.1 PWA

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: room-inputcontributor friendlyfor issue that are good for newcomers.type: bugfor issues where it's clear the feature is not working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions