emphasizedparser: Underscore does not need backslash

Signed-off-by: Patrick José Pereira <[email protected]>
This commit is contained in:
Patrick José Pereira
2018-10-25 14:51:50 -03:00
parent 7c26aa0431
commit a84da9de61
+1 -1
View File
@@ -41,7 +41,7 @@ public:
void
Parse(std::string& line) override
{
static std::regex re("(?!.*`.*|.*<code>.*)\\_(?!.*`.*|.*<\\/code>.*)([^\\_]*)\\_(?!.*`.*|.*<\\/code>.*)");
static std::regex re("(?!.*`.*|.*<code>.*)_(?!.*`.*|.*<\\/code>.*)([^_]*)_(?!.*`.*|.*<\\/code>.*)");
static std::string replacement = "<em>$1</em>";
line = std::regex_replace(line, re, replacement);