Index: src/natools-s_expressions-printers-pretty.adb ================================================================== --- src/natools-s_expressions-printers-pretty.adb +++ src/natools-s_expressions-printers-pretty.adb @@ -347,11 +347,17 @@ or else not Is_Newline (Data, I, Newline) then Size := Size + 2; Cursor := Cursor + 2; else - Size := Size + 1; + case Newline is + when LF | CR => + Size := Size + 1; + when CR_LF | LF_CR => + Size := Size + 2; + I := I + 1; + end case; Cursor := 1; end if; when 0 .. 7 | 14 .. 31 => Size := Size + 4; Cursor := Cursor + 4; @@ -628,10 +634,17 @@ Output.Cursor := Output.Cursor + 2; else Result (O) := Data (I); O := O + 1; Output.Cursor := 1; + if Output.Param.Newline = CR_LF + or Output.Param.Newline = LF_CR + then + I := I + 1; + Result (O) := Data (I); + O := O + 1; + end if; end if; when 11 => Result (O) := Encodings.Escape; Result (O + 1) := Character'Pos ('v'); O := O + 2; @@ -652,10 +665,17 @@ Output.Cursor := Output.Cursor + 2; else Result (O) := Data (I); O := O + 1; Output.Cursor := 1; + if Output.Param.Newline = CR_LF + or Output.Param.Newline = LF_CR + then + I := I + 1; + Result (O) := Data (I); + O := O + 1; + end if; end if; when Encodings.Quoted_Atom_End | Encodings.Escape => Result (O) := Encodings.Escape; Result (O + 1) := Data (I); O := O + 2;