--- burst.pl 2001/05/05 19:20:27 1.7
+++ burst.pl 2001/05/05 19:43:52 1.8
@@ -278,15 +278,13 @@
## need to check if the title contains any anchor
## if so it needs to be removed
## because the title is being used in the table of content to link to the corresponding slide
- $table[0] =~ s/(.*)]*>(.*)<\/A>(.*)/$1$2$3/i;
+ $table[0] = remove_anchor($table[0]);
## grab next slide title $table[2] (if there's a next slide)
## to be able to use in the 'next' navigation button
## keep in mind that $table[1] contains the slide corresponding to the title $table[0]
if ($table[2]) {
- $next_title= $table[2];
- ## remove any anchor from the next slide title
- $next_title =~ s/(.*)]*>(.*)<\/A>(.*)/$1$2$3/i;
+ $next_title= remove_anchor($table[2]);
}
## the current slide content is stored $table[1]
@@ -297,8 +295,8 @@
## extract slide Sub Title
undef $slideSubTitle;
- if ($slideContent =~ s/<[hH]2[^>]*>([^<]+)<\/[hH]2[^>]*>//) {
- $slideSubTitle=$1;
+ if ($slideContent =~ s/<[hH]2[^>]*>(.+)<\/[hH]2[^>]*>//sm) {
+ $slideSubTitle=remove_anchor($1);
}
## add the title of the current slide to the table of content
@@ -310,7 +308,7 @@
&createSlide($slideTitle,$slideSubTitle,$slideContent ,$slideCount++,$prev_title,$next_title);
## save the title of the previous slide to be displayed in the 'previous' navigation button
- $prev_title="$table[0]";
+ $prev_title=remove_anchor($table[0]);
}
## process the next slide
while (shift(@table));
@@ -671,3 +669,10 @@
return $html;
}
+##############################################################################
+# make slide progress bar
+sub remove_anchor {
+ my $foo = $_[0];
+ $foo=~s/(.*)]*>(.*)<\/A>(.*)/$1$2$3/ig;
+ return $foo;
+}