You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Snekbox !eval output of exactly 11 lines is truncated #709
If snekbox would return an output of exactly 11 lines, with 10 newline characters, it will truncate the final returning line without sending the output to be uploaded.
The source is a mismatch in the snekbox cog, within format_output--the number of lines to output is set to output.count("\n")and checked against > 10 but later output is sliced with output.split("\n")[:10].
.split() returns up to 11 items if there are exactly 10 \n's which results in the loss of the final line of output.
Testcase:
!e ```py
print(*range(11), sep="\n")
```
The final element (10) is missing.
Activity
Akarys42 commentedon Dec 25, 2019
Hi, can I work on this?