mirror of
https://github.com/progsource/maddy.git
synced 2026-03-25 16:00:39 +01:00
Fix linkparser line handling with multiple parenthesis
This commit is contained in:
@@ -37,6 +37,22 @@ TEST(MADDY_LINKPARSER, ItReplacesMarkdownWithLinks)
|
||||
ASSERT_EQ(expected, text);
|
||||
}
|
||||
|
||||
TEST(
|
||||
MADDY_LINKPARSER, ItReplacesMarkdownProperlyEvenWithMultipleParenthesisInLine
|
||||
)
|
||||
{
|
||||
std::string text =
|
||||
"(This is a [link](/ABC/some file) (the URL will include this).)";
|
||||
std::string expected =
|
||||
"(This is a <a href=\"/ABC/some file\">link</a> (the URL will include "
|
||||
"this).)";
|
||||
auto linkParser = std::make_shared<maddy::LinkParser>();
|
||||
|
||||
linkParser->Parse(text);
|
||||
|
||||
ASSERT_EQ(expected, text);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
class DISABLED_MADDY_LINKPARSER : public ::testing::Test
|
||||
|
||||
Reference in New Issue
Block a user