Fix trailing ~~ handling

This commit is contained in:
jpirnay
2026-04-29 12:19:35 +02:00
parent d5c397c677
commit e1c2fae248
+5
View File
@@ -93,6 +93,11 @@ std::vector<Span> 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;