Bug 456856 - NeoChat generating quotes when message get sent without spaces.
Summary: NeoChat generating quotes when message get sent without spaces.
Status: RESOLVED INTENTIONAL
Alias: None
Product: NeoChat
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-18 13:45 UTC by Jan Bidler
Modified: 2022-10-26 10:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 `>_be me\n>try to send greentext\n>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