refactor: rename DTree to DValue
This commit is contained in:
@@ -16,11 +16,11 @@ RENDER(Request& context)
|
||||
};
|
||||
|
||||
String markdown_src = "# Site Test Heading\n\nParagraph with **bold** content.\n\n:::warning\nWatch the component hook\n:::\n\n```txt\ncode block\n```\n";
|
||||
DTree options;
|
||||
DValue options;
|
||||
options["components"][":::warning"] = "components/markdown/warning";
|
||||
options["components"]["node.code_block"] = "components/markdown/code_block";
|
||||
|
||||
DTree ast = markdown_to_ast(markdown_src, options);
|
||||
DValue ast = markdown_to_ast(markdown_src, options);
|
||||
String ast_json = json_encode(ast);
|
||||
String html = markdown_to_html(markdown_src, options);
|
||||
String ast_excerpt = ast_json.substr(0, ast_json.length() > 220 ? 220 : ast_json.length());
|
||||
|
||||
Reference in New Issue
Block a user