Bug 456856

Summary: NeoChat generating quotes when message get sent without spaces.
Product: [Applications] NeoChat Reporter: Jan Bidler <janbidler00>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: carl, james.h.graham
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Bidler 2022-07-18 13:45:51 UTC
SUMMARY
When sending "greentext-like" messages (aka ">" immediately followed by words), NeoChat generates quotes for them instead.

STEPS TO REPRODUCE
1. Send something like the following text in a room:
```
>be me
>try to send greentext
>NeoChat scrambles it
```

OBSERVED RESULT
NeoChat generates a quoteblock for the whole thing

EXPECTED RESULT
As there are no spaces after the ">", it should not generate a quoteblock for them. formatted_body should just be `&gt;_be me\n&gt;try to send greentext\n&gt;NeoChat scrambles it`

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
NeoChat: 22.06

ADDITIONAL INFORMATION
Fixing this, would also fix the scrambled ascii emoticons (https://invent.kde.org/network/neochat/-/issues/532)
Comment 1 James Graham 2022-10-23 16:55:40 UTC
So this is intentional. We use cmark for the conversions which follows the commonMark standard which still counts no spaces after the > as a quote (see https://spec.commonmark.org/0.30/#block-quotes).

Checking other clients this behaviour is consistent. I tested Element, Nheko and Quaternion as well and only Quaternion doesn't treat your example text as a quote so the consensus is firmly on the side of treat like a quote.

I also think being permissive with the space is better for avoiding user frustrations typos.
Comment 2 Jan Bidler 2022-10-26 10:21:39 UTC
Potentially relevant, that element has this "issue" too:
https://github.com/vector-im/element-meta/issues/330