Bug 414038 - Whitespace in quoted lines not preserved, so some ASCII drawings are messed up.
Summary: Whitespace in quoted lines not preserved, so some ASCII drawings are messed up.
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 5.12.3
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-11 19:39 UTC by David Hurka
Modified: 2021-11-08 16:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Text Messed Up In Message Viewer (16.01 KB, image/png)
2020-08-21 20:10 UTC, Garry Williams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Hurka 2019-11-11 19:39:39 UTC
SUMMARY
KMail’s message viewer detects quote markers > and |, but simplifies all following whitespace to a single space, so ASCII drawings are messed up when they contain > or |.

So, KMail simplifies some whitespace in quotes. Is that neccessary? It doesn’t simplify whitespace outside quotes.

STEPS TO REPRODUCE
1. Create a message like:
>                  ________________
>                 /  ____________  \
>           Rope /  /            \  \
>               /  /              \  \
>              /  /       __       \  \
>              |  \      Wheel     /  |
>            a |   \              /   | a
>              A    \____________/    V

2. Open in message viewer.

OBSERVED RESULT
Whitespace after quote markers simplified:
> ________________
> /  ____________  \
> Rope /  /            \  \
> /  /              \  \
> /  /       __       \  \
> | \      Wheel     /  |
> a |   \              /   | a
> A    \____________/    V
> | 

EXPECTED RESULT
Whitespace within quote preserved

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.17
KDE Plasma Version: 5.17.2
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Detecting quote markers after some whitespace was already topic in Bug 403976.
Comment 1 David Hurka 2019-11-11 20:21:55 UTC
BONUS
When replying to such a message, whitespace after the quote markers is preserved, but additional lines with the same indentation level (?) are inserted.

> >                  ________________
> >                 
> >                 /  ____________  \
> >                
> >           Rope /  /            \  \
> >               
> >               /  /              \  \
> >              
> >              /  /       __       \  \
> >              
> >              |  \      Wheel     /  |
> >            
> >            a |   \              /   | a
> >            
> >              A    \____________/    V
Comment 2 Laurent Montel 2020-03-22 09:41:41 UTC
Hi,
it's how works all browser. It compress all space
I will to look at how to workaround it
Comment 3 Garry Williams 2020-08-21 20:10:39 UTC
Created attachment 131081 [details]
Text Messed Up In Message Viewer

There used to be an option to display messages without HTML trying to be helpful.  I wonder if that option could be restored.  It would also fix the attached problem.

Actual text behind attached screen shot:
>
> So it is fixed ?

Is not the first time that we need [1] , specially when rawhide bump
the number (f33 -> f34), I guess , is one thing that maybe fedora-
review should take care ... or mock itself :)

[1]
mock -r fedora-rawhide-x86_64 --scrub all

>
> --
Comment 4 Jerôme Pouiller 2021-11-08 15:49:36 UTC
This bug also mess up indentation when you review code.
Comment 5 Garry Williams 2021-11-08 16:09:04 UTC
(In reply to Laurent Montel from comment #2)
> it's how works all browser. It compress all space

Can we keep browser away from text E-mail?  There never has been a need to use a browser on text.

That would fix this bug.