From 601882e8907263e0d16cafd934ade9fe6e20f80f Mon Sep 17 00:00:00 2001 From: mstsirkin Date: Thu, 21 May 2015 10:13:40 +0000 Subject: fixupdiff: better diff for lstlisting Actually strike out deleted text. Signed-off-by: Michael S. Tsirkin git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@535 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- fixupdiff.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fixupdiff.pl b/fixupdiff.pl index 94c5112..e557e2b 100644 --- a/fixupdiff.pl +++ b/fixupdiff.pl @@ -1,14 +1,18 @@ my $bufferdiff=""; my $diff=""; my $buffer=""; -my $lstlisting=0; while (<>) { my $line = $_; if (m/%DIFDELCMD\s+<\s+\\begin{lstlisting}/) { $lstlisting=1; + $line =~s/%DIFDELCMD\s+) { } print $line; if (m/%DIFDELCMD\s+<\s+\\end{lstlisting}/) { + print "}\n"; $lstlisting=0; } } -- cgit v1.2.3