Skip to content

Commit

Permalink
Fix end of line handling
Browse files Browse the repository at this point in the history
  • Loading branch information
leppie committed Oct 1, 2019
1 parent 747e077 commit af28d19
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions IronScheme/IronScheme/Runtime/R6RS/IO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,21 +672,27 @@ Encoding ParsePreamble(Stream port)
public override string ReadToEnd()
{
string value = base.ReadToEnd();
value = IO.eoltx.Replace(value, delegate(Match m)
if (value != null)
{
return IO.GetNewline(tc.eolstyle, "\n");
});
value = IO.eoltx.Replace(value, delegate (Match m)
{
return IO.GetNewline(tc.eolstyle, "\n");
});
}
return value;
}


public override string ReadLine()
{
string value = base.ReadLine();
value = IO.eoltx.Replace(value, delegate(Match m)
if (value != null)
{
return IO.GetNewline(tc.eolstyle, "\n");
});
value = IO.eoltx.Replace(value, delegate (Match m)
{
return IO.GetNewline(tc.eolstyle, "\n");
});
}
return value;
}

Expand Down

0 comments on commit af28d19

Please sign in to comment.