Skip to content

Commit

Permalink
merge pull request #89 (after modification)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftilmann committed Mar 10, 2017
2 parents 9feb46f + 82b6425 commit 14fcddf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions latexdiff
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
### - move --show-xxx options so that they are also capable of showing preamble (and commands) after all modificationsbased on source file packages
#
# Version 1.2.1a
# - bug fix: when deleted \item commands are followed immediately by unsafe commands, they were not restored properly
# (thanks to J. Protze for pull request) (pull request #89)
# - treat lstlisting and comment as equivalent to verbatim environment
# make environments that are treated like verbatim environments configurable (config variable VERBATIMENV)
# treat lstinlne as equivalent to verb command
Expand Down Expand Up @@ -2819,7 +2821,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 +2830,8 @@ sub restore_item_commands {
} else {
$itemarg="";
}
"$1$2$3$itemarg$AUXCMD\n"/sge;
"$1$2$3$itemarg$AUXCMD\n"; ###.((length($5)>0) ? "%DIFDELCMD $5 $DELCMDCLOSE\n" : "")
/sge;
return($string);
}
Expand Down
5 changes: 5 additions & 0 deletions testsuite/lists-old.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
%opening
%\title{}
%\author{}
\newcommand{\vc}[1]{\mbox{$#1$}}

\begin{document}
Some text here common to both documents
Expand All @@ -12,6 +13,10 @@
\item The first item
\item Der zweite Punkt
\item Y el tercero
\item \vc{G} is a test matrix
\item \vc{G} \vc{m} We multiply by the model vector
\item And the vector \vc{m} comes later
\item \vc{F} \vc{m'}
\end{itemize}
and the same as enumerate environment
\begin{enumerate}
Expand Down

0 comments on commit 14fcddf

Please sign in to comment.