From 0c3d46795b589d9dfb2e6caa7f94db77fd5371bd Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 31 Jan 2023 18:22:12 +0100 Subject: Make single newlines cause a
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 --- src/CommandCompleter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/CommandCompleter.cpp') 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: -- cgit 1.5.1