summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2022-04-21 23:41:18 -0600
committerAndreas Kling <kling@serenityos.org>2022-04-26 15:02:26 +0200
commit5ad44ac2e5c40e7a7a8a724de4b983a2149d678c (patch)
tree9715d0edcbe232efcf8791686aa38d07fb9bb923
parent0270e2399781d885744c06ef72b069300f0d8828 (diff)
downloadserenity-5ad44ac2e5c40e7a7a8a724de4b983a2149d678c.zip
LibMarkdown: Ignore backslash on non-punctuation characters
-rw-r--r--Userland/Libraries/LibMarkdown/Text.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMarkdown/Text.cpp b/Userland/Libraries/LibMarkdown/Text.cpp
index 1d91ebf648..54d78ffb69 100644
--- a/Userland/Libraries/LibMarkdown/Text.cpp
+++ b/Userland/Libraries/LibMarkdown/Text.cpp
@@ -327,7 +327,7 @@ Vector<Text::Token> Text::tokenize(StringView str)
in_space = false;
}
- if (ch == '\\' && offset + 1 < str.length()) {
+ if (ch == '\\' && offset + 1 < str.length() && ispunct(str[offset + 1])) {
current_token.append(str[offset + 1]);
++offset;
} else if (ch == '*' || ch == '_' || ch == '`') {