LibMarkdown: Ignore backslash on non-punctuation characters

This commit is contained in:
Peter Elliott 2022-04-21 23:41:18 -06:00 committed by Andreas Kling
parent 0270e23997
commit 5ad44ac2e5
Notes: sideshowbarker 2024-07-17 11:32:10 +09:00

View File

@ -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 == '`') {