summary refs log tree commit diff
path: root/src/CommandCompleter.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-01-31 18:22:12 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-01-31 18:22:12 +0100
commit0c3d46795b589d9dfb2e6caa7f94db77fd5371bd (patch)
tree4d3bdc9cee84be37f51465e49ec38a9055452dd0 /src/CommandCompleter.cpp
parentUncoditionally request keyframes (diff)
downloadnheko-0c3d46795b589d9dfb2e6caa7f94db77fd5371bd.tar.xz
Make single newlines cause a <br> by default
This should match what people expect from a chat application much
better. The biggest reason not to do this, is because some people might
paste markdown documents. For those people there is now a /cmark
command, which disables most of our extensions to cmark, including the
newline behaviour. There is a long discussion on the Fediverse and on
Github linked below.

Mastodon https://fosstodon.org/@deepbluev7/109771668066978726
fixes #757
Diffstat (limited to '')
-rw-r--r--src/CommandCompleter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CommandCompleter.cpp b/src/CommandCompleter.cpp

index 4cc61291..51eef4f5 100644 --- a/src/CommandCompleter.cpp +++ b/src/CommandCompleter.cpp
@@ -73,6 +73,8 @@ CommandCompleter::data(const QModelIndex &index, int role) const return QString("/rotate-megolm-session"); case Md: return QString("/md "); + case Cmark: + return QString("/cmark "); case Plain: return QString("/plain "); case Rainbow: @@ -140,6 +142,8 @@ CommandCompleter::data(const QModelIndex &index, int role) const return tr("/rotate-megolm-session"); case Md: return tr("/md [message]"); + case Cmark: + return tr("/cmark [message]"); case Plain: return tr("/plain [message]"); case Rainbow: @@ -206,6 +210,9 @@ CommandCompleter::data(const QModelIndex &index, int role) const return tr("Rotate the current symmetric encryption key."); case Md: return tr("Send a markdown formatted message (ignoring the global setting)."); + case Cmark: + return tr( + "Send a commonmark formatted message disabling most extensions compared to /md."); case Plain: return tr("Send an unformatted message (ignoring the global setting)."); case Rainbow: