summaryrefslogtreecommitdiff
path: root/fixupdiff.pl
diff options
context:
space:
mode:
Diffstat (limited to 'fixupdiff.pl')
-rw-r--r--fixupdiff.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/fixupdiff.pl b/fixupdiff.pl
new file mode 100644
index 0000000..70d4e30
--- /dev/null
+++ b/fixupdiff.pl
@@ -0,0 +1,14 @@
+my $lstlisting=0;
+while (<>) {
+ my $line = $_;
+ if (m/%DIFDELCMD\s+<\s+\\begin{lstlisting}/) {
+ $lstlisting=1;
+ }
+ if ($lstlisting) {
+ $line =~ s/%DIFDELCMD\s+<\s+//;
+ }
+ print $line;
+ if (m/%DIFDELCMD\s+<\s+\\end{lstlisting}/) {
+ $lstlisting=0;
+ }
+}