This page exercises `markdown_to_ast()` and `markdown_to_html()` with component hooks for `:::warning` directives and fenced code blocks.
{"children": [{"children": [{"text": "Markdown Demo", "type": "text"}], "level": 1.000000, "text": "Markdown Demo", "type": "heading"}, {"children": [{"text": "This page exercises ", "type": "text"}, {"children": [{"text": "strong", "type": "text"}], "type": "strong"}, {"text": ", ", "type": "text"}, {"children": [{"text": "emphasis", "type": "text"}], "type": "em"}, {"text": ", ", "type": "text"}, {"children": [{"text": "strikethrough", "type": "text"}], "type": "strike"}, {"text": ", ", "type": "text"}, {"text": "code spans", "type": "code"}, {"text": ", and a bare URL: ", "type": "text"}, {"children": [{"text": "https://example.com/doc/index.uce", "type": "text"}], "href": "https://example.com/doc/index.uce", "title": "", "type": "link"}], "text": "This page exercises **strong**, *emphasis*, ~~strikethrough~~, `code spans`, and a bare URL: https://example.com/doc/index.uce", "type": "paragraph"}, {"children": [{"text": "Task List", "type": "text"}], "level": 2.000000, "text": "Task List", "type": "heading"}, {"children": [{"checked": true, "children": [{"children": [{"text": "Parse markdown into an AST", "type": "text"}], "text": "Parse markdown into an AST", "type": "paragraph"}], "task": true, "type": "list_item"}, {"checked": true, "children": [{"children": [{"text": "Render markdown into HTML", "type": "text"}], "text": "Render markdown into HTML", "type": "paragraph"}], "task": true, "type": "list_item"}, {"checked": false, "children": [{"children": [{"text": "Add even more extensions later", "type": "text"}], "text": "Add even more extensions later", "type": "paragraph"}], "task": true, "type": "list_item"}], "ordered": false, "start": 1.000000, "type": "list"}, {"children": [{"text": "Table", "type": "text"}], "level": 2.000000, "text": "Table", "type": "heading"}, {"align": ["left", "center", "right"], "header": [{"children": [{"text": "Feature", "type": "text"}], "text": "Feature", "type": "table_cell"}, {"children": [{"text": "Status", "type": "text"}], "text": "Status", "type": "table_cell"}, {"children": [{"text": "Notes", "type": "text"}], "text": "Notes", "type": "table_cell"}], "rows": [[{"children": [{"text": "Headings", "type": "text"}], "text": "Headings", "type": "table_cell"}, {"children": [{"text": "Ready", "type": "text"}], "text": "Ready", "type": "table_cell"}, {"children": [{"text": "1", "type": "text"}], "text": "1", "type": "table_cell"}], [{"children": [{"text": "Tables", "type": "text"}], "text": "Tables", "type": "table_cell"}, {"children": [{"text": "Ready", "type": "text"}], "text": "Ready", "type": "table_cell"}, {"children": [{"text": "2", "type": "text"}], "text": "2", "type": "table_cell"}], [{"children": [{"text": "Components", "type": "text"}], "text": "Components", "type": "table_cell"}, {"children": [{"text": "Ready", "type": "text"}], "text": "Ready", "type": "table_cell"}, {"children": [{"text": "3", "type": "text"}], "text": "3", "type": "table_cell"}]], "type": "table"}, {"children": [{"text": "Quote", "type": "text"}], "level": 2.000000, "text": "Quote", "type": "heading"}, {"children": [{"children": [{"text": "Markdown in UCE should be composable.", "type": "text"}], "text": "Markdown in UCE should be composable.", "type": "paragraph"}, {"children": [{"text": "Components make that much more interesting.", "type": "text"}], "text": "Components make that much more interesting.", "type": "paragraph"}], "type": "blockquote"}, {"argument": "", "attrs": {"title": "Component-backed directive"}, "body_source": "This `:::warning` block is rendered through a normal UCE component selected from `options[\"components\"]`.", "children": [{"children": [{"text": "This ", "type": "text"}, {"text": ":::warning", "type": "code"}, {"text": " block is rendered through a normal UCE component selected from ", "type": "text"}, {"text": "options[\"components\"]", "type": "code"}, {"text": ".", "type": "text"}], "text": "This `:::warning` block is rendered through a normal UCE component selected from `options[\"components\"]`.", "type": "paragraph"}], "name": "warning", "type": "directive"}, {"children": [{"text": "Code", "type": "text"}], "level": 2.000000, "text": "Code", "type": "heading"}, {"lang": "cpp", "meta": "", "text": "RENDER(Request& context)\n{\n\tprint(markdown_to_html(\"# hello\"));\n}", "type": "code_block"}], "source": "# Markdown Demo\n\nThis page exercises **strong**, *emphasis*, ~~strikethrough~~, `code spans`, and a bare URL: https://example.com/doc/index.uce\n\n## Task List\n\n- [x] Parse markdown into an AST\n- [x] Render markdown into HTML\n- [ ] Add even more extensions later\n\n## Table\n\n| Feature | Status | Notes |\n| :--- | :---: | ---: |\n| Headings | Ready | 1 |\n| Tables | Ready | 2 |\n| Components | Ready | 3 |\n\n## Quote\n\n> Markdown in UCE should be composable.\n>\n> Components make that much more interesting.\n\n:::warning title=\"Component-backed directive\"\nThis `:::warning` block is rendered through a normal UCE component selected from `options[\"components\"]`.\n:::\n\n## Code\n\n```cpp\nRENDER(Request& context)\n{\n\tprint(markdown_to_html(\"# hello\"));\n}\n```\n", "type": "document"}