]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug in this script: the regex 1004/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Jun 2015 22:17:54 +0000 (17:17 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Jun 2015 22:17:54 +0000 (17:17 -0500)
  ([abc])(,[abc])*
matches the text
  a,b,c
but while $1=="a", we get $2=",c", not ",b,c" as expected. Another parenthesis is required.

doc/doxygen/scripts/filter

index 4444568b97440208202c9fc42393cd98391e50dd..0f48f8f1a17993981ad5dfe06e39ebea1b5f0b24 100755 (executable)
@@ -70,7 +70,7 @@ s#file:[ \t]*$#file :#g;
 
 # Handle commands such as @dealiiVideoLecture{20.5,33} by expanding it
 # into a note with some text
-if (m/(\@dealiiVideoLecture\{([0-9\.]+)(, *[0-9\.]+ *)*\})/)
+if (m/(\@dealiiVideoLecture\{([0-9\.]+)((, *[0-9\.]+ *)*)\})/)
 {
     $substext = $1;
 
@@ -81,6 +81,7 @@ if (m/(\@dealiiVideoLecture\{([0-9\.]+)(, *[0-9\.]+ *)*\})/)
     
     if (length($3) > 0)
     {
+        # if it is a list of lectures, also list the others.
        $x = $3;
        $x =~ s/^, *//g;
        @otherlectures = split (',', "$x");
@@ -92,13 +93,13 @@ if (m/(\@dealiiVideoLecture\{([0-9\.]+)(, *[0-9\.]+ *)*\})/)
     }
 
     $text = $text . ". (All video lectures are also available <a href=\"http://www.math.tamu.edu/~bangerth/videos.html\">here</a>.)";
-    s/(\@dealiiVideoLecture\{([0-9\.]+)(, *[0-9\.]+ *)*\})/$text/;
+    s/(\@dealiiVideoLecture\{([0-9\.]+)((, *[0-9\.]+ *)*)\})/$text/;
 }
 
 
 # @dealiiVideoLectureSeeAlso works as above, but just expands into
 # regular text, no @note
-if (m/(\@dealiiVideoLectureSeeAlso\{([0-9\.]+)(, *[0-9\.]+ *)*\})/)
+if (m/(\@dealiiVideoLectureSeeAlso\{([0-9\.]+)((, *[0-9\.]+ *)*)\})/)
 {
     $substext = $1;
 
@@ -120,5 +121,5 @@ if (m/(\@dealiiVideoLectureSeeAlso\{([0-9\.]+)(, *[0-9\.]+ *)*\})/)
     }
 
     $text = $text . ".";
-    s/(\@dealiiVideoLectureSeeAlso\{([0-9\.]+)(, *[0-9\.]+ *)*\})/$text/;
+    s/(\@dealiiVideoLectureSeeAlso\{([0-9\.]+)((, *[0-9\.]+ *)*)\})/$text/;
 }

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.