mirror of
https://github.com/quitesimpleorg/qsmaddy.git
synced 2025-06-26 21:22:05 +02:00
fixed inline code for bold, em and s
In inline code the markdown for bold , emphasized and strike trhough is not parsed anymore. Additionally the linker might be now faster on Linux.
This commit is contained in:
@ -41,7 +41,7 @@ public:
|
||||
void
|
||||
Parse(std::string& line) override
|
||||
{
|
||||
static std::regex re("\\*([^\\*]*)\\*");
|
||||
static std::regex re("(?!`|<code>)\\*(?!`|</code>)([^\\*]*)\\*(?!`|</code>)");
|
||||
static std::string replacement = "<em>$1</em>";
|
||||
|
||||
line = std::regex_replace(line, re, replacement);
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
void
|
||||
Parse(std::string& line) override
|
||||
{
|
||||
static std::regex re("\\~\\~([^\\~]*)\\~\\~");
|
||||
static std::regex re("(?!`|<code>)\\~\\~(?!`|</code>)([^\\~]*)\\~\\~(?!`|</code>)");
|
||||
static std::string replacement = "<s>$1</s>";
|
||||
|
||||
line = std::regex_replace(line, re, replacement);
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
void
|
||||
Parse(std::string& line) override
|
||||
{
|
||||
static std::regex re("\\*\\*([^\\*\\*]*)\\*\\*");
|
||||
static std::regex re("(?!`|<code>)\\*\\*(?!`|</code>)([^\\*\\*]*)\\*\\*(?!`|</code>)");
|
||||
static std::string replacement = "<strong>$1</strong>";
|
||||
|
||||
line = std::regex_replace(line, re, replacement);
|
||||
|
Reference in New Issue
Block a user