Open
Description
What is the issue?
Why this not work and not return table?
#include <iostream>
//#include <memory>
#include <string>
#include "maddy/parser.h"
std::string ConvertMarkdownToHTML(const std::string& markdownInput) {
// Configurazione opzionale
std::shared_ptr<maddy::ParserConfig> config = std::make_shared<maddy::ParserConfig>();
//config->enabledParsers &= ~maddy::types::EMPHASIZED_PARSER;
//config->enabledParsers |= maddy::types::TABLE_PARSER;
//config->enabledParsers |= maddy::types::HTML_PARSER;
//config->enabledParsers &= ~maddy::types::ALL;
std::istringstream markdownStream(markdownInput);
std::shared_ptr<maddy::Parser> parser = std::make_shared<maddy::Parser>(config);
std::string htmlOutput = parser->Parse(markdownStream);
return htmlOutput;
}
int main(int argc, char** argv)
{
const std::string markdownInput = "##TEST \nColumn One | Column Two \n---------- | ---------- \nRow Text 1 | Row Text 2 \nRow Text 3 | Row Text 4\n";//argv[1]
std::string htmlOutput = ConvertMarkdownToHTML(markdownInput);
std::cout << htmlOutput << "\n";
return 0;
}