mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-30 20:45:26 +00:00
Remove span tag duplication in retrieved web pages.
This commit is contained in:
@@ -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() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user