]> git.sur5r.net Git - i3/i3/commitdiff
contrib/dump-asy.pl: Fix $ and & in window titles
authorDiego Ongaro <ongardie@gmail.com>
Wed, 1 May 2013 05:12:33 +0000 (22:12 -0700)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 5 May 2013 10:55:54 +0000 (12:55 +0200)
These would produce asy/LaTeX parse errors before.

contrib/dump-asy.pl

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