Skip to content

Commit

Permalink
Merge pull request #1119 from Alex-Jordan/hotfix/bad-ptx-p
Browse files Browse the repository at this point in the history
prevent extra p surrounding multiple choice ul in PTX (hotfix for #1118)
  • Loading branch information
drgrice1 authored Sep 17, 2024
2 parents 3f6c018 + 727efdb commit 1931eef
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 1931eef

Please sign in to comment.