instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.62k stars 2.49k forks source link

SpeedGrader only previews files with CRLF line terminators #1503

Open bsa020 opened 5 years ago

bsa020 commented 5 years ago

Summary:

Steps to reproduce:

  1. Hand in a file with LF or CR line breaks as test student.
  2. As a TA, open the assignment in SpeedGrader.
  3. Try to preview the file.

Expected behavior:

Both files with CRLF (Windows), LF (Unix) and CR (Mac) line breaks should be previewed.

Actual behavior:

Only files with CRLF line breaks are previewed.

Additional notes:

Tested with .py files

kalzun commented 5 years ago

MacOSX also use LF. Pre-MacOSX was CR.

Line Feed (Linux, MAC OSX) LF \n ASCII code 10

Carriage Return and Line Feed (Windows) CRLF \r\n ASCII code 13 and then ASCII code 10

https://stackoverflow.com/a/39259747/6383431

stale[bot] commented 2 years ago

Thanks for contributing to this issue. As it has been 2 years since the last activity, we are automatically closing the issue in 30 days. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed, or post a message on the mailing list. We'll gladly take a look again!