aboutsummaryrefslogtreecommitdiff
path: root/include/ricochet/render
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-04-12 04:22:01 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-04-12 04:22:01 +0800
commitc6d7e532c4e010f55ab8c6b7cfd8b36d44779725 (patch)
treee7cea779501de91299161da5321e83852780ac58 /include/ricochet/render
parent72e4e43b1fc1743dc3e9dae70682f2945eeba45d (diff)
downloadrwebbrowser-c6d7e532c4e010f55ab8c6b7cfd8b36d44779725.tar.gz
rwebbrowser-c6d7e532c4e010f55ab8c6b7cfd8b36d44779725.tar.xz
feat: implement link extraction and interactive navigation via numbered tags in the browser
Diffstat (limited to 'include/ricochet/render')
-rw-r--r--include/ricochet/render/renderer.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ricochet/render/renderer.hh b/include/ricochet/render/renderer.hh
index f26a788..2a9acae 100644
--- a/include/ricochet/render/renderer.hh
+++ b/include/ricochet/render/renderer.hh
@@ -22,6 +22,12 @@
namespace ricochet::render {
+struct RenderResult
+{
+ std::string text {};
+ std::vector<std::string> links {};
+};
+
class Renderer
{
public:
@@ -37,7 +43,7 @@ public:
* @brief Traverse the DOM tree and output the formatted result to the terminal using ANSI escape codes
* @param node The root node of the DOM tree
*/
- std::string render( const parser::DomNode& node ) const;
+ RenderResult render( const parser::DomNode& node ) const;
};
} // namespace ricochet::render \ No newline at end of file