diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2022-04-21 23:41:18 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-26 15:02:26 +0200 |
commit | 5ad44ac2e5c40e7a7a8a724de4b983a2149d678c (patch) | |
tree | 9715d0edcbe232efcf8791686aa38d07fb9bb923 /Userland/Libraries/LibMarkdown/Text.cpp | |
parent | 0270e2399781d885744c06ef72b069300f0d8828 (diff) | |
download | serenity-5ad44ac2e5c40e7a7a8a724de4b983a2149d678c.zip |
LibMarkdown: Ignore backslash on non-punctuation characters
Diffstat (limited to 'Userland/Libraries/LibMarkdown/Text.cpp')
-rw-r--r-- | Userland/Libraries/LibMarkdown/Text.cpp | 2 |
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 == '`') { |