-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
Description
Operating System
Windows
Compiler
MSVC (Visual Studio)
Compiler flags
/Zc:__cplusplus (very probably unrelated)
maddy version
1.6.0 (latest)
Minimal Mardown example
<!-- comment -->
HelloWhat is not working? What did you try?
std::shared_ptr<maddy::ParserConfig> mdConfig = std::make_shared<maddy::ParserConfig>();
mdConfig->enabledParsers |= maddy::types::ALL;
auto p = std::make_shared<maddy::Parser>(mdConfig);
{
std::stringstream stream("<!-- comment -->\n# Testing 1\n# Testing 2");
std::cout << p->Parse(stream) << std::endl; // Prints nothing
// It should've printed something similar, since the headings are
// treated as plaintext (the comment line is considered HTML), but it seems like the parser
// just ignores it
//
// <!-- comment -->
// # Testing 1
// # Testing 2
}
{
std::stringstream stream("# Testing 1\n<!-- comment -->\n# Testing 2");
std::cout << p->Parse(stream) << std::endl; // Only prints <h1>Testing 1</h1>
// Same issue here
}
{
std::stringstream stream("<!-- comment -->\n\n# Testing 1\n# Testing 2");
std::cout
<< p->Parse(stream)
<< std::endl; // Works properly: <!-- comment --><h1>Testing 1</h1><h1>Testing 2</h1>
}Reactions are currently unavailable