You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<iostream>
#include<string>
#include<maddy/parser.h>intmain(int argc, char* argv[])
{
(void)argc;
(void)argv;
// Parser is not giving expected output
std::string bad =
"**Some Title**\n""- List element 1\n""- List element 2";
std::stringstream badInput(bad);
// Parser works as expected
std::string good =
"**Some Title**\n""\n""- List element 1\n""- List element 2";
std::stringstream goodInput(good);
auto parser = std::make_shared<maddy::Parser>();
std::cout << "Bad: " << parser->Parse(badInput) << std::endl;
std::cout << "Good: " << parser->Parse(goodInput) << std::endl;
}
Output
Bad: <p><strong>Some Title</strong> - List element 1 - List element 2 </p>
Good: <p><strong>Some Title</strong> </p><ul><li>List element 1</li><li>List element 2</li></ul>
I don't think it is a platform issue, just filling for the sake of completeness
Description
The parser doesn't recognise the list if there is not a empty line before it. It feels a bit weird as most other parsers/viewer handles it.
I'll have a deeper look at the code and try to make a pull request.
The text was updated successfully, but these errors were encountered:
The problem with it is that maddy ends blocks usually only at empty lines. I consider rewriting maddy at some point, that it doesn't use regex anymore, but a lexer. Just have to find the time for it.
Minimal Code Example
Output
Conditions
clang++ -std=c++17 -Imaddy/include -o maddy_test main.cpp
I don't think it is a platform issue, just filling for the sake of completeness
Description
The parser doesn't recognise the list if there is not a empty line before it. It feels a bit weird as most other parsers/viewer handles it.
I'll have a deeper look at the code and try to make a pull request.
The text was updated successfully, but these errors were encountered: