From e81d870756bccbb2b5da52673d52a6bfd93f7b3d Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sun, 12 Apr 2026 04:22:01 +0800 Subject: feat: implement link extraction and interactive navigation via numbered tags in the browser --- ricochet/include/ricochet/render/renderer.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ricochet/include') diff --git a/ricochet/include/ricochet/render/renderer.hh b/ricochet/include/ricochet/render/renderer.hh index f26a788..2a9acae 100644 --- a/ricochet/include/ricochet/render/renderer.hh +++ b/ricochet/include/ricochet/render/renderer.hh @@ -22,6 +22,12 @@ namespace ricochet::render { +struct RenderResult +{ + std::string text {}; + std::vector 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 -- cgit v1.2.3