PCM: fix url detection in pkg description

This commit is contained in:
qu1ck 2023-01-04 12:56:18 -08:00 committed by Seth Hillbrand
parent 0e2943d781
commit 50582232ea
1 changed files with 8 additions and 2 deletions

View File

@ -182,12 +182,15 @@ void PANEL_PACKAGES_VIEW::setPackageDetails( const PACKAGE_VIEW_DATA& aPackageDa
if( inURL ) if( inURL )
{ {
if( c == ' ' ) if( c == ' ' || c == '\n')
{ {
result += wxString::Format( wxT( "<a href='%s'>%s</a>" ), url, url ); result += wxString::Format( wxT( "<a href='%s'>%s</a>" ), url, url );
inURL = false; inURL = false;
result += c; if( c == '\n' )
result += wxT( "</p><p>" );
else
result += c;
} }
else else
{ {
@ -210,6 +213,9 @@ void PANEL_PACKAGES_VIEW::setPackageDetails( const PACKAGE_VIEW_DATA& aPackageDa
} }
} }
if( inURL )
result += wxString::Format( wxT( "<a href='%s'>%s</a>" ), url, url );
return result; return result;
}; };