diff --git a/include/maddy/emphasizedparser.h b/include/maddy/emphasizedparser.h index 56d43dc..6838d83 100644 --- a/include/maddy/emphasizedparser.h +++ b/include/maddy/emphasizedparser.h @@ -41,7 +41,7 @@ public: void Parse(std::string& line) override { - static std::regex re("(?!.*`.*|.*.*)\\_(?!.*`.*|.*<\\/code>.*)([^\\_]*)\\_(?!.*`.*|.*<\\/code>.*)"); + static std::regex re("(?!.*`.*|.*.*)_(?!.*`.*|.*<\\/code>.*)([^_]*)_(?!.*`.*|.*<\\/code>.*)"); static std::string replacement = "$1"; line = std::regex_replace(line, re, replacement);