Bug 414038

Summary: Whitespace in quoted lines not preserved, so some ASCII drawings are messed up.
Product: [Applications] kmail2 Reporter: David Hurka <david.hurka>
Component: UIAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: david.hurka, gtwilliams, jerome.pouiller, montel
Priority: NOR    
Version: 5.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Text Messed Up In Message Viewer

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.