From ef2586c51a46e35fc3ff29c930f38fe68a98444c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 10 Jan 2025 10:53:22 -0700 Subject: [PATCH] Be consistent about escaping names of code gallery programs. --- doc/doxygen/scripts/code-gallery.pl | 2 +- doc/doxygen/scripts/make_gallery.pl | 2 +- doc/doxygen/scripts/steps.pl | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/doxygen/scripts/code-gallery.pl b/doc/doxygen/scripts/code-gallery.pl index d7a4397e75..79312a1779 100644 --- a/doc/doxygen/scripts/code-gallery.pl +++ b/doc/doxygen/scripts/code-gallery.pl @@ -60,7 +60,7 @@ foreach my $gallery (@ARGV) chop $authors; $authors =~ s/,$//; - $gallery_underscore =~ s/-/_/; + $gallery_underscore =~ s/-/_/g; my $description; $description = "
\@ref code_gallery_${gallery_underscore} \"$entryname\" (by $authors)
\n"; diff --git a/doc/doxygen/scripts/make_gallery.pl b/doc/doxygen/scripts/make_gallery.pl index 50ae0d7fa7..341c90be36 100644 --- a/doc/doxygen/scripts/make_gallery.pl +++ b/doc/doxygen/scripts/make_gallery.pl @@ -21,7 +21,7 @@ my $cmake_source_dir = shift(@ARGV); my $gallery = shift(@ARGV); my $gallery_underscore = $gallery; -$gallery_underscore =~ s/-/_/; +$gallery_underscore =~ s/-/_/g; my $gallery_dir = shift(@ARGV); diff --git a/doc/doxygen/scripts/steps.pl b/doc/doxygen/scripts/steps.pl index 3b19bb0c82..f36263113f 100644 --- a/doc/doxygen/scripts/steps.pl +++ b/doc/doxygen/scripts/steps.pl @@ -118,7 +118,7 @@ foreach $step (@ARGV) my $name = $step; $name =~ s/^.*code-gallery\///; my $tag = $name; - $tag =~ s/[^a-zA-Z]/_/g; + $tag =~ s/[^a-zA-Z_0-9]/_/g; $kind_map{"code_gallery_$tag"} = "code-gallery"; @@ -157,7 +157,7 @@ foreach $step (@ARGV) my $name = $step; $name =~ s/^.*code-gallery\///; my $tag = $name; - $tag =~ s/[^a-zA-Z]/_/g; + $tag =~ s/[^a-zA-Z_0-9]/_/g; $destination = "code_gallery_$tag"; } @@ -274,7 +274,7 @@ foreach $step (@ARGV) } } - # If the destination is a code gallery program, used a dashed line + # If the destination is a code gallery program, use a dashed line if ($kind_map{$destination} eq "code-gallery") { $edge_attributes .= "style=\"dashed\", arrowhead=\"empty\", color=\"gray\","; -- 2.39.5