]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Be consistent about escaping names of code gallery programs. 17986/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 10 Jan 2025 17:53:22 +0000 (10:53 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 10 Jan 2025 17:53:22 +0000 (10:53 -0700)
doc/doxygen/scripts/code-gallery.pl
doc/doxygen/scripts/make_gallery.pl
doc/doxygen/scripts/steps.pl

index d7a4397e75fd11c52598e40d7c5fbdf0acb6e786..79312a1779b21a615487e7b491313614c4bef30c 100644 (file)
@@ -60,7 +60,7 @@ foreach my $gallery (@ARGV)
     chop $authors;
     $authors =~ s/,$//;
 
-    $gallery_underscore    =~ s/-/_/;
+    $gallery_underscore    =~ s/-/_/g;
 
     my $description;
     $description = "  <dt><b>\@ref code_gallery_${gallery_underscore} \"$entryname\"</b> (by $authors)</dt>\n";
index 50ae0d7fa76f3a632063adc769f9628077b20efd..341c90be36f3c06f24e615d21ceaecb8f82c32e3 100644 (file)
@@ -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);
 
index 3b19bb0c8231673f0633e2a27bf1b1c5fbc3631e..f36263113f89e316dc78f974bfbe9bdf6cbe1e3c 100644 (file)
@@ -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\",";

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.