Mirror von
https://github.com/quitesimpleorg/qsmaddy.git
synchronisiert 2024-11-21 15:17:52 +01:00
emphasizedparser: Move from *this* to _this_
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
e8ba8f661a
Commit
ee42f7eae9
@ -30,7 +30,7 @@ public:
|
||||
/**
|
||||
* Parse
|
||||
*
|
||||
* From Markdown: `text *text*`
|
||||
* From Markdown: `text _text_`
|
||||
*
|
||||
* To HTML: `text <em>text</em>`
|
||||
*
|
||||
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren