contrib/dump-asy.pl: Fix $ and & in window titles

These would produce asy/LaTeX parse errors before.
This commit is contained in:
Diego Ongaro 2013-04-30 22:12:33 -07:00 committed by Michael Stapelberg
parent 0f6b5fe8da
commit 22ca203b80
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ sub dump_node {
my $w = (defined($n->{window}) ? $n->{window} : "N"); my $w = (defined($n->{window}) ? $n->{window} : "N");
my $na = $n->{name}; my $na = $n->{name};
$na =~ s/#/\\#/g; $na =~ s/#/\\#/g;
$na =~ s/\$/\\\$/g;
$na =~ s/&/\\&/g;
$na =~ s/_/\\_/g; $na =~ s/_/\\_/g;
$na =~ s/~/\\textasciitilde{}/g; $na =~ s/~/\\textasciitilde{}/g;
my $type = 'leaf'; my $type = 'leaf';