mirror of
https://github.com/progsource/maddy.git
synced 2026-03-26 00:10:37 +01:00
chore: Add clang-format
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <string>
|
||||
#include <regex>
|
||||
#include <string>
|
||||
|
||||
#include "maddy/lineparser.h"
|
||||
|
||||
@@ -36,10 +36,11 @@ public:
|
||||
* @param {std::string&} line The line to interpret
|
||||
* @return {void}
|
||||
*/
|
||||
void
|
||||
Parse(std::string& line) override
|
||||
void Parse(std::string& line) override
|
||||
{
|
||||
static std::regex re(R"((?!.*`.*|.*<code>.*)\*(?!.*`.*|.*<\/code>.*)([^\*]*)\*(?!.*`.*|.*<\/code>.*))");
|
||||
static std::regex re(
|
||||
R"((?!.*`.*|.*<code>.*)\*(?!.*`.*|.*<\/code>.*)([^\*]*)\*(?!.*`.*|.*<\/code>.*))"
|
||||
);
|
||||
static std::string replacement = "<i>$1</i>";
|
||||
line = std::regex_replace(line, re, replacement);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user