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

Blank lines not displayed in message reply #252

Open
progfolio opened this issue Jan 11, 2024 · 3 comments
Open

Blank lines not displayed in message reply #252

progfolio opened this issue Jan 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working priority:B
Milestone

Comments

@progfolio
Copy link
Contributor

progfolio commented Jan 11, 2024

OS/platform

Arch Linux

Emacs version and provenance

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.39, cairo version 1.18.0) of 2024-01-04

Emacs command

emacs

Emacs frame type

GUI

Ement package version and provenance

version: c8fa944 0.14-pre installed via Elpaca

Actions taken

ement-reply-formatting-bug

  1. Send a message with blank lines. It is displayed properly.
  2. Reply to the first message. The reply has blank lines in it. They are not displayed in the reply. The formatting of the original message is altered as well.
  3. Note that when editing the message, the lines are preserved.

Android Element display for comparison:

image

Observed results

The reply should be formatted as I wrote it.

Expected results

The reply's formatting elides newlines.

Backtrace

No response

Etc.

No response

@progfolio progfolio added the bug Something isn't working label Jan 11, 2024
@alphapapa
Copy link
Owner

Likely caused by using shr to render the reply inside an HTML blockquote tag. Maybe we need to duplicate newlines, or replace them with br tags. What do you think?

@alphapapa alphapapa added this to the 0.14 milestone Jan 12, 2024
@progfolio
Copy link
Contributor Author

progfolio commented Jan 12, 2024

Replacing newlines with "<br>" gets us part of the way there in ement-room--render-html:

-  (insert string))
+ (insert (replace-regexp-in-string "\n" "<br>" string))

But that will also replace newlines in a reply's already formatted HTML, so it doesn't seem like the right solution to me.
Haven't had much time to dig into the source, but is there a way to separate the quoted portion of a reply from the body of the actual reply?

@alphapapa
Copy link
Owner

Haven't had much time to dig into the source, but is there a way to separate the quoted portion of a reply from the body of the actual reply?

Yes, but that is more easily handled by #150, which I want to merge soon, but haven't had time to test. If anyone wants to test that and provide feedback, it would help.

@alphapapa alphapapa modified the milestones: 0.14, 0.15 Jan 25, 2024
@alphapapa alphapapa modified the milestones: 0.15, 0.16 Mar 31, 2024
@alphapapa alphapapa modified the milestones: v0.16, v0.17 Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:B
Projects
None yet
Development

No branches or pull requests

2 participants