]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/googlecalendar.pm
Coding style change: Remove explcit vim folding markers.
[ikiwiki.git] / IkiWiki / Plugin / googlecalendar.pm
index 81a3ad677fa9d1d2b7ab66d6b2792e3130f158f1..9e09d7dbbf2906e32084edd4af0e16a379cde1ce 100644 (file)
@@ -5,24 +5,24 @@ use warnings;
 use strict;
 use IkiWiki 2.00;
 
-sub import { #{{{
+sub import {
        hook(type => "getsetup", id => "googlecalendar",
                call => \&getsetup);
        hook(type => "preprocess", id => "googlecalendar",
                call => \&preprocess);
        hook(type => "format", id => "googlecalendar",
                call => \&format);
-} # }}}
+}
 
-sub getsetup () { #{{{
+sub getsetup () {
        return
                plugin => {
                        safe => 1,
                        rebuild => undef,
                },
-} #}}}
+}
 
-sub preprocess (@) { #{{{
+sub preprocess (@) {
        my %params=@_;
 
        # Parse the html, looking for the url to embed for the calendar.
@@ -35,21 +35,21 @@ sub preprocess (@) { #{{{
        my ($width)=$params{html}=~m#width="(\d+)"#;
 
        return "<div class=\"googlecalendar\" src=\"$url\" height=\"$height\" width=\"$width\"></div>";
-} # }}}
+}
 
-sub format (@) { #{{{
+sub format (@) {
         my %params=@_;
 
        $params{content}=~s/<div class=\"googlecalendar" src="([^"]+)" height="([^"]+)" width="([^"]+)"><\/div>/gencal($1,$2,$3)/eg;
 
         return $params{content};
-} # }}}
+}
 
-sub gencal ($$$) { #{{{
+sub gencal ($$$) {
        my $url=shift;
        my $height=shift;
        my $width=shift;
        return qq{<iframe src="http://www.google.com/calendar/embed?$url" style=" border-width:0 " width="$width" frameborder="0" height="$height"></iframe>};
-} #}}}
+}
 
 1