Skip to content

Commit

Permalink
don't remove excess whitespace from student answers
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan authored and drgrice1 committed May 17, 2024
1 parent 5b19c59 commit ab41355
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions macros/core/PGbasicmacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,13 @@ sub NAMED_ANS_RULE {
$rh_sticky_answers->{$name} = \@answers; # Store the rest.
}

$answer_value =~ s/\s+/ /g; # Remove excessive whitespace from student answer.
$name = RECORD_ANS_NAME($name, $answer_value);
my $previous_name = "previous_$name";
$name = ($envir{use_opaque_prefix}) ? "%%IDPREFIX%%$name" : $name;
$previous_name = ($envir{use_opaque_prefix}) ? "%%IDPREFIX%%$previous_name" : $previous_name;

my $tcol = $col / 2 > 3 ? $col / 2 : 3; # get max
$tcol = $tcol < 40 ? $tcol : 40; # get min
my $tcol = $col / 2 > 3 ? $col / 2 : 3; # get max
$tcol = $tcol < 40 ? $tcol : 40; # get min

return MODES(
TeX => "{\\answerRule[$name]{$tcol}}",
Expand Down

0 comments on commit ab41355

Please sign in to comment.