Remove span tag duplication in retrieved web pages.

This commit is contained in:
Bartosz Taudul
2026-01-25 20:12:34 +01:00
parent 0a58d88be2
commit daef2f4c6b
+2
View File
@@ -704,6 +704,8 @@ std::string TracyLlmTools::GetWebpage( const std::string& url )
response = RemoveNewline( response );
ReplaceAll( response, "<div><div>", "<div>" );
ReplaceAll( response, "</div></div>", "</div>" );
ReplaceAll( response, "<span><span>", "<span>" );
ReplaceAll( response, "</span></span>", "</span>" );
auto it = std::ranges::unique( response, []( char a, char b ) { return ( a == ' ' || a == '\t' ) && ( b == ' ' || b == '\t' ); } );
response.erase( it.begin(), it.end() );