From b062f5f99a34a9646e97c0f280e314cc3f8c9218 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 12 Jun 2015 17:17:54 -0500 Subject: [PATCH] Fix a bug in this script: the regex ([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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/doxygen/scripts/filter b/doc/doxygen/scripts/filter index 4444568b97..0f48f8f1a1 100755 --- a/doc/doxygen/scripts/filter +++ b/doc/doxygen/scripts/filter @@ -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 here.)"; - 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/; } -- 2.39.5