From 72d74ac59fa6c5c26b738b8eeefff319c249780f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 24 Apr 2021 14:31:59 +0200 Subject: [PATCH] Fix rendering issues with ) in links --- src/Config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Config.h b/src/Config.h index 97669822..88452935 100644 --- a/src/Config.h +++ b/src/Config.h @@ -59,7 +59,7 @@ const QRegularExpression url_regex( // match an URL, that is not quoted, i.e. // vvvvvv match quote via negative lookahead/lookbehind vv // vvvv atomic match url -> fail if there is a " before or after vvv - R"((?((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!["']))"); + R"(\b(?((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s'"]+[^!,\.\s'"\]\)\:]))(?!["'])\b)"); // match any markdown matrix.to link. Capture group 1 is the link name, group 2 is the target. static const QRegularExpression matrixToMarkdownLink( R"(\[(.*?)(?