Skip to content

Commit

Permalink
prevent extra p surrounding multiple choice ul in PTX
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Sep 12, 2024
1 parent ab2499e commit 30fca38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion macros/core/PGbasicmacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,10 @@ sub PTX_cleanup {
if ($displayMode eq 'PTX') {
#encase entire string in <p>
#except not for certain "sub" structures that are also passed through EV3
$string = "<p>" . $string . "</p>" unless (($string =~ /^<fillin[^>]*\/>$/) or ($string =~ /^<var.*<\/var>$/s));
$string = "<p>" . $string . "</p>"
unless (($string =~ /^<fillin[^>]*\/>$/)
|| ($string =~ /^<var.*<\/var>$/s)
|| ($string =~ /^<ul[^>]*form=[^>]*>/s));

#inside a li, the only permissible children are title, p, image, video, and tabular
#insert opening and closing p, to be removed later if they enclose a title, image, video or tabular
Expand Down

0 comments on commit 30fca38

Please sign in to comment.