diff --git a/include/maddy/emphasizedparser.h b/include/maddy/emphasizedparser.h index 65cf11b..56d43dc 100644 --- a/include/maddy/emphasizedparser.h +++ b/include/maddy/emphasizedparser.h @@ -30,7 +30,7 @@ public: /** * Parse * - * From Markdown: `text *text*` + * From Markdown: `text _text_` * * To HTML: `text text` * @@ -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);