Small clean-up
parent
5d7f666103
commit
4d00c7bf05
|
@ -38,13 +38,12 @@ void MainWindow::setupParser()
|
|||
parser = new Parser();
|
||||
|
||||
std::string exePath = n_fs::current_path().string();
|
||||
std::string htmlOutput = "";
|
||||
std::string filePath = exePath.append("/../../test.md");
|
||||
printf("Path: %s\n", filePath.c_str());
|
||||
|
||||
cmark_node *root_node = parser->parseFile(filePath);
|
||||
if (root_node != NULL) {
|
||||
htmlOutput = parser->renderHTML(root_node);
|
||||
// For HTML: parser->renderHTML(root_node);
|
||||
// Render AST to drawing area
|
||||
m_renderArea.renderDocument(root_node);
|
||||
cmark_node_free(root_node);
|
||||
|
|
|
@ -38,13 +38,13 @@ cmark_node * Parser::parseFile(const std::string &filePath)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
std::string const Parser::renderHTML(cmark_node *node)
|
||||
/*std::string const Parser::renderHTML(cmark_node *node)
|
||||
{
|
||||
char *tmp = cmark_render_html(node, options, NULL);
|
||||
std::string output = std::string(tmp);
|
||||
free(tmp);
|
||||
return output;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* This is a function that will make enabling extensions easier
|
||||
|
|
|
@ -13,11 +13,9 @@ class Parser
|
|||
public:
|
||||
Parser();
|
||||
cmark_node * parseFile(const std::string &filePath);
|
||||
std::string const renderHTML(cmark_node *node);
|
||||
|
||||
private:
|
||||
int options;
|
||||
|
||||
void addMarkdownExtension(cmark_parser *parser, const char *extName);
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
missingIncludeSystem
|
||||
missingInclude:lib/*
|
||||
missingInclude:lib/*
|
||||
unusedFunction:src/render-area.cc:203
|
||||
|
|
Loading…
Reference in New Issue