Преглед изворни кода

LibMarkdown: Ignore backslash on non-punctuation characters

Peter Elliott пре 3 година
родитељ
комит
5ad44ac2e5
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Userland/Libraries/LibMarkdown/Text.cpp

+ 1 - 1
Userland/Libraries/LibMarkdown/Text.cpp

@@ -327,7 +327,7 @@ Vector<Text::Token> Text::tokenize(StringView str)
             in_space = false;
             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]);
             current_token.append(str[offset + 1]);
             ++offset;
             ++offset;
         } else if (ch == '*' || ch == '_' || ch == '`') {
         } else if (ch == '*' || ch == '_' || ch == '`') {