#pragma once #include #include #include #include namespace Markdown { enum class NodeType { Document, Paragraph, Text, Link, Heading, LineBreak, Strong, Emphasis, Strikethrough, Underline, Code, Image, Blockquote, UnorderedList, OrderedList, ListItem, CodeBlock, ThematicBreak, Table, TableHead, TableBody, TableRow, TableHeaderCell, TableCell, LatexMathInline, LatexMathDisplay, Spoiler, Superscript, Subscript, Highlight, SoftBreak, BlankLine, Admonition, Video }; struct MarkdownASTNode { NodeType type; std::string content; std::unordered_map attributes; std::vector> children; explicit MarkdownASTNode(NodeType t) : type(t) {} void addChild(std::shared_ptr child) { if (child) { children.push_back(std::move(child)); } } void setAttribute(const std::string& key, const std::string& value) { attributes[key] = value; } }; } // namespace Markdown