鏡像自
https://github.com/quitesimpleorg/qsmaddy.git
已同步 2025-06-26 21:22:05 +02:00
fixed the inline code now also for not directly following letters
* em * s * strong updated regex
此提交包含在:
@ -23,8 +23,8 @@ TEST(MADDY_EMPHASIZEDPARSER, ItReplacesMarkdownWithEmphasizedHTML)
|
||||
|
||||
TEST(MADDY_EMPHASIZEDPARSER, ItDoesNotParseInsideInlineCode)
|
||||
{
|
||||
std::string text = "some text `*bla*` text testing *it* out";
|
||||
std::string expected = "some text `*bla*` text testing <em>it</em> out";
|
||||
std::string text = "some text `*bla*` `/**text*/` testing *it* out";
|
||||
std::string expected = "some text `*bla*` `/**text*/` testing <em>it</em> out";
|
||||
auto emphasizedParser = std::make_shared<maddy::EmphasizedParser>();
|
||||
|
||||
emphasizedParser->Parse(text);
|
||||
|
@ -23,8 +23,8 @@ TEST(MADDY_STRIKETHROUGHPARSER, ItReplacesMarkdownWithStrikeThroughHTML)
|
||||
|
||||
TEST(MADDY_STRIKETHROUGHPARSER, ItDoesNotParseInsideInlineCode)
|
||||
{
|
||||
std::string text = "some text `~~bla~~` text testing <code>~~it~~</code> out";
|
||||
std::string expected = "some text `~~bla~~` text testing <code>~~it~~</code> out";
|
||||
std::string text = "some text `~~bla~~` ` ~~text~~ ` testing <code>~~it~~</code> out";
|
||||
std::string expected = "some text `~~bla~~` ` ~~text~~ ` testing <code>~~it~~</code> out";
|
||||
auto strikeThroughParser = std::make_shared<maddy::StrikeThroughParser>();
|
||||
|
||||
strikeThroughParser->Parse(text);
|
||||
|
@ -34,8 +34,8 @@ TEST(MADDY_STRONGPARSER, ItReplacesEmphasizedMarkdownNotWithStrongHTML)
|
||||
|
||||
TEST(MADDY_STRONGPARSER, ItDoesNotParseInsideInlineCode)
|
||||
{
|
||||
std::string text = "some text *bla* text testing `**it**` out";
|
||||
std::string expected = "some text *bla* text testing `**it**` out";
|
||||
std::string text = "some text **bla** `/**text**/` testing `**it**` out";
|
||||
std::string expected = "some text **bla** `/**text**/` testing `**it**` out";
|
||||
auto strongParser = std::make_shared<maddy::StrongParser>();
|
||||
|
||||
strongParser->Parse(text);
|
||||
|
新增問題並參考
封鎖使用者