From c91e24b39a24c9efb81be93d7568f6213b2a0293 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 14 Oct 2009 08:32:53 +0000 Subject: [PATCH] ide: fix TSimpleHTMLControl: - don't place new spaces after new lines, tabs and spaces - use 4px border around git-svn-id: trunk@22164 - --- ide/helpmanager.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ide/helpmanager.pas b/ide/helpmanager.pas index 4447114252..61f81f9d44 100644 --- a/ide/helpmanager.pas +++ b/ide/helpmanager.pas @@ -297,12 +297,17 @@ begin inc(p,length(NewTag)); end; end else if Result[p] in [' ',#9,#10,#13] then begin - // replace spaces and newline characters with single space + // replace spaces and newline characters with a single space EndPos:=p+1; while (EndPos<=length(Result)) and (Result[EndPos] in [' ',#9,#10,#13]) do inc(EndPos); - Result:=copy(Result,1,p-1)+' '+copy(Result,EndPos,length(Result)); - inc(p); + if (p > 1) and not (Result[p-1] in [' ',#9,#10,#13]) then + begin + Result:=copy(Result,1,p-1)+' '+copy(Result,EndPos,length(Result)); + inc(p); + end + else + Result:=copy(Result,1,p-1)+copy(Result,EndPos,length(Result)); end else inc(p); end; @@ -316,6 +321,7 @@ begin Layout := tlCenter; Alignment := taLeftJustify; Font.Color := clInfoText; + BorderSpacing.Around := 4; end; function TSimpleHTMLControl.GetURL: string;