25 lines
582 B
C++
25 lines
582 B
C++
#include "MarkdownParser.h"
|
|
#include "File.h"
|
|
#include "HtmlWriter.h"
|
|
|
|
int main()
|
|
{
|
|
File md_file("/home/jmsgrogan/code/MediaTool/test/data/sample_markdown.md");
|
|
md_file.Open();
|
|
const auto md_content = md_file.ReadText();
|
|
|
|
MarkdownParser parser;
|
|
parser.Run(md_content);
|
|
|
|
auto html = parser.GetHtml();
|
|
|
|
HtmlWriter writer;
|
|
const auto html_string = writer.ToString(html);
|
|
|
|
File html_file("TestMarkdownParserOut.html");
|
|
html_file.SetAccessMode(File::AccessMode::Write);
|
|
html_file.Open();
|
|
html_file.WriteText(html_string);
|
|
return 0;
|
|
|
|
}
|