This PR changes formatted_grader_comment on the StudentClassSiteAssignment (again!) to catch and remove leading instances of \r (common in Windows environments) as part of the replacement of newline literals with break HTML tags. I accomplished this by using a regular expression that optionally allows for \r before \n. It made sense to use this regular expression approach because I found some other occurrences of the sequence \r (not intended as a carriage return, but part of some other string, I think) which we would not want to be affected via a simple replacement. I updated the fixture .sql file with an instance of \\r\\n and the test with an additional assertion. I also decided to rename the test case to be more specifically about newlines. The PR aims to resolve issue #224.
This PR changes
formatted_grader_comment
on theStudentClassSiteAssignment
(again!) to catch and remove leading instances of\r
(common in Windows environments) as part of the replacement of newline literals with break HTML tags. I accomplished this by using a regular expression that optionally allows for\r
before\n
. It made sense to use this regular expression approach because I found some other occurrences of the sequence\r
(not intended as a carriage return, but part of some other string, I think) which we would not want to be affected via a simple replacement. I updated the fixture.sql
file with an instance of\\r\\n
and the test with an additional assertion. I also decided to rename the test case to be more specifically about newlines. The PR aims to resolve issue #224.