From e513970d1cf700ab320b5dbeafb28bd1302b2333 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 31 May 2019 15:16:44 +0000 Subject: [PATCH] jvcllaz: Fix incomplete handling of Windows line ending in JvHTControls in Linux. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6986 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/jvcllaz/examples/JvHTControls/unit1.lfm | 4 ++-- components/jvcllaz/run/JvCore/jvjvclutils.pas | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/jvcllaz/examples/JvHTControls/unit1.lfm b/components/jvcllaz/examples/JvHTControls/unit1.lfm index a1018c26c..7ceb2baa4 100644 --- a/components/jvcllaz/examples/JvHTControls/unit1.lfm +++ b/components/jvcllaz/examples/JvHTControls/unit1.lfm @@ -24,8 +24,8 @@ object MainForm: TMainForm ClientWidth = 567 object JvHTLabel1: TJvHTLabel Left = 8 - Height = 196 - Hint = 'HTLabel with:
'#13#10'bold
'#13#10'italic
'#13#10'underline
'#13#10'strikeout
'#13#10'color
'#13#10'Links and custom links' + Height = 106 + Hint = 'HTLabel with:
'#13#10'bold
'#13#10'italic
'#13#10'underline
'#13#10'strikeout
'#13#10'color
'#13#10'Links and custom links' Top = 8 Width = 120 Caption = 'HTLabel with:
'#13#10'bold
'#13#10'italic
'#13#10'underline
'#13#10'strikeout
'#13#10'color
'#13#10'Links and custom links' diff --git a/components/jvcllaz/run/JvCore/jvjvclutils.pas b/components/jvcllaz/run/JvCore/jvjvclutils.pas index d93ccda0c..b0e52f707 100644 --- a/components/jvcllaz/run/JvCore/jvjvclutils.pas +++ b/components/jvcllaz/run/JvCore/jvjvclutils.pas @@ -7121,7 +7121,8 @@ begin Result := Text; for I := Low(Conversions) to High(Conversions) do Result := StringReplace(Result, Conversions[I].Html, Utf8ToAnsi(Conversions[I].Text), [rfReplaceAll, rfIgnoreCase]); - Result := StringReplace(Result, sLineBreak, '', [rfReplaceAll, rfIgnoreCase]); // only
can be new line + Result := StringReplace(Result, #13, '', [rfReplaceAll]); // only
can be new line + Result := StringReplace(Result, #10, '', [rfReplaceAll]); // only
can be new line Result := StringReplace(Result, cBR, sLineBreak, [rfReplaceAll, rfIgnoreCase]); Result := StringReplace(Result, cBR2, sLineBreak, [rfReplaceAll, rfIgnoreCase]); // Fixes
, but not
! Result := StringReplace(Result, cHR, cHR + sLineBreak, [rfReplaceAll, rfIgnoreCase]); // fixed