Skip to content

Commit

Permalink
restore \item, even if there is an unsafe command after the item
Browse files Browse the repository at this point in the history
  • Loading branch information
jprotze committed Mar 9, 2017
1 parent 9feb46f commit 0577ed7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions latexdiff
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@ sub postprocess {
sub restore_item_commands {
my ($string)=@_ ;
my ($itemarg,@itemargs);
$string =~ s/(\%DIFDELCMD < \s*(\\$ITEMCMD)((?:<$abrat0>)?)((?:\[$brat0\])?)\s*?(?:\n|$DELCMDCLOSE))/
$string =~ s/(\%DIFDELCMD < \s*(\\$ITEMCMD)((?:<$abrat0>)?)((?:\[$brat0\])?)\s*((?:$cmdoptseq)?)\s*?(?:\n|$DELCMDCLOSE))/
# if \item has an []argument, then mark up the argument as deleted)
if (length($4)>0) {
# use substr to exclude square brackets at end points
Expand All @@ -2828,7 +2828,8 @@ sub restore_item_commands {
} else {
$itemarg="";
}
"$1$2$3$itemarg$AUXCMD\n"/sge;
"$2$3$itemarg$AUXCMD\n".((length($5)>0) ? "%DIFDELCMD $5 $DELCMDCLOSE\n" : "")
/sge;
return($string);
}
Expand Down

0 comments on commit 0577ed7

Please sign in to comment.