summaryrefslogtreecommitdiff
path: root/docs-xml/scripts/neatquotes.pl
blob: 9d5aa6e9e36098b9a1cd53e72e19a9cd98dd34d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl

my $inprog = 0;

while(<STDIN>) {
	if(/<(programlisting|screen)>/) { $inprog = 1; }
	if(/<\/(programlisting|screen)>/) { $inprog = 0; }
	if(not /="(.*)"/ and not $inprog) {
		s/"(.*?)"/<quote>\1<\/quote>/g;
	}
	print $_;
}