Skip to content

Commit

Permalink
fix: only apply limit when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
RobynLlama committed Dec 9, 2024
1 parent 239a793 commit f78a385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MuncherLib/Muncher/LineData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public string ToStringLimited(int limit)
builder.Append('`');

//remove interpolation
if (limit > 0)
if (limit > 0 && Contents.Length >= limit)
builder.AppendLine($"\n```{Contents[..limit].Replace(LogMuncher.RETURN_CHAR, '\n')}```");
else
builder.AppendLine($"\n```{Contents.Replace(LogMuncher.RETURN_CHAR, '\n')}```");
Expand Down

0 comments on commit f78a385

Please sign in to comment.