diff --git a/1-base/lace/source/text/lace-text-forge.adb b/1-base/lace/source/text/lace-text-forge.adb index 6fa5473..d15bc3a 100644 --- a/1-base/lace/source/text/lace-text-forge.adb +++ b/1-base/lace/source/text/lace-text-forge.adb @@ -22,8 +22,17 @@ is while not end_of_File (the_File) loop - append (Pad, get_Line (the_File) - & ada.Characters.Latin_1.LF); + declare + use ada.Characters; + Line : constant String := get_Line (the_File); + begin + if Line (Line'Last) = latin_1.CR + then + append (Pad, Line (Line'First .. Line'Last - 1) & latin_1.LF); + else + append (Pad, Line & latin_1.LF); + end if; + end; end loop; close (the_File); diff --git a/1-base/lace/source/text/lace-text-forge.ads b/1-base/lace/source/text/lace-text-forge.ads index 40fa40f..a3c5dc2 100644 --- a/1-base/lace/source/text/lace-text-forge.ads +++ b/1-base/lace/source/text/lace-text-forge.ads @@ -10,8 +10,8 @@ is type Filename is new String; - function to_String (Filename : in forge.Filename) return String; - function to_Text (Filename : in forge.Filename) return Item; + function to_String (Filename : in forge.Filename) return String; -- Converts 'CR & LF' to 'LF' at the end of a line. + function to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line. --------------