From e1c2fae24842e4235ab0df23344fdea90132f16f Mon Sep 17 00:00:00 2001 From: jpirnay Date: Wed, 29 Apr 2026 12:19:35 +0200 Subject: [PATCH] Fix trailing ~~ handling --- lib/Md/MdParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Md/MdParser.cpp b/lib/Md/MdParser.cpp index 8d7d7a5f..2dc61592 100644 --- a/lib/Md/MdParser.cpp +++ b/lib/Md/MdParser.cpp @@ -93,6 +93,11 @@ std::vector parseInline(const std::string& text) { // Escaped character if (c == '\\' && i + 1 < text.size()) { char next = text[i + 1]; + if (next == '~' && i + 2 < text.size() && text[i + 2] == '~') { + current.append("~~"); + i += 3; + continue; + } if (next == '*' || next == '_' || next == '`' || next == '[' || next == '!' || next == '~' || next == '\\') { current += next; i += 2;