summaryrefslogtreecommitdiff
path: root/fixupdiff.pl
blob: 70d4e301f7c6d668ef6d0aa7f87cdd700f7e5510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
	}
}