Convert to PGML: add the ability to parse loadMacros if the arguments are in a qw#1425
Convert to PGML: add the ability to parse loadMacros if the arguments are in a qw#1425pstaabp wants to merge 3 commits into
Conversation
block. Also, removes empty macros and duplicate macros. In addition, if it appears that the problem is already in PGML mode, then return the file without changes.
| sub convertToPGML { | ||
| my ($pg_source) = @_; | ||
|
|
||
| print dumper ($pg_source); |
There was a problem hiding this comment.
Did you forget to remove this?
|
There are some outlier cases that are doing some weird things with this. These cases probably are not worth putting much effort into, but they could happen, and are valid Perl, and this turns them into invalid Perl. Either loadMacros(qw{
PGstandard.pl
PGML.pl
draggableProof.pl
PGcourse.pl
');The second case is probably more of an issue, because that is probably not that unlikely. Closely related and more serious though is the following. loadMacros(qw{
PGstandard.pl
PGML.pl
draggableProof.pl}
PGcourse.pl
);This needs to handle the possibility of white space between the |
1db3b80 to
ba081b2
Compare
|
This addresses the cases of @drgrice1. I also tried to format the output on a single line if the input was on a single line and multiple lines if the input was that way. |
Add the ability to parse loadMacros if the arguments are in a qw block. Also, removes empty macros and duplicate macros.
In addition, if it appears that the problem is already in PGML mode, then return the file without changes.
This is in response to openwebwork/webwork2#2908