aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/filecheck.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-17 15:22:16 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-17 15:22:16 -0500
commitbb93fccf0690344aa77f9538a508959a6de09847 (patch)
tree2381c9c097e553f384b6136be1322ec205695119 /IkiWiki/Plugin/filecheck.pm
parent985b229be632126f376aaad7bd354d0d7d014464 (diff)
downloadikiwiki-bb93fccf0690344aa77f9538a508959a6de09847.tar
ikiwiki-bb93fccf0690344aa77f9538a508959a6de09847.tar.gz
Coding style change: Remove explcit vim folding markers.
Diffstat (limited to 'IkiWiki/Plugin/filecheck.pm')
-rw-r--r--IkiWiki/Plugin/filecheck.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm
index 27f764e3b..5040a185c 100644
--- a/IkiWiki/Plugin/filecheck.pm
+++ b/IkiWiki/Plugin/filecheck.pm
@@ -37,9 +37,9 @@ my %units=( #{{{ # size in bytes
# ikiwiki, if you find you need larger data quantities, either modify
# yourself to add them, or travel back in time to 2008 and kill me.
# -- Joey
-); #}}}
+);
-sub parsesize ($) { #{{{
+sub parsesize ($) {
my $size=shift;
no warnings;
@@ -51,10 +51,10 @@ sub parsesize ($) { #{{{
}
}
return $base;
-} #}}}
+}
# This is provided for other plugins that want to convert back the other way.
-sub humansize ($) { #{{{
+sub humansize ($) {
my $size=shift;
foreach my $unit (reverse sort { $units{$a} <=> $units{$b} || $b cmp $a } keys %units) {
@@ -63,11 +63,11 @@ sub humansize ($) { #{{{
}
}
return $size; # near zero, or negative
-} #}}}
+}
package IkiWiki::PageSpec;
-sub match_maxsize ($$;@) { #{{{
+sub match_maxsize ($$;@) {
my $page=shift;
my $maxsize=eval{IkiWiki::Plugin::filecheck::parsesize(shift)};
if ($@) {
@@ -86,9 +86,9 @@ sub match_maxsize ($$;@) { #{{{
else {
return IkiWiki::SuccessReason->new("file not too large");
}
-} #}}}
+}
-sub match_minsize ($$;@) { #{{{
+sub match_minsize ($$;@) {
my $page=shift;
my $minsize=eval{IkiWiki::Plugin::filecheck::parsesize(shift)};
if ($@) {
@@ -107,9 +107,9 @@ sub match_minsize ($$;@) { #{{{
else {
return IkiWiki::SuccessReason->new("file not too small");
}
-} #}}}
+}
-sub match_mimetype ($$;@) { #{{{
+sub match_mimetype ($$;@) {
my $page=shift;
my $wanted=shift;
@@ -140,9 +140,9 @@ sub match_mimetype ($$;@) { #{{{
else {
return IkiWiki::SuccessReason->new("file MIME type is $mimetype");
}
-} #}}}
+}
-sub match_virusfree ($$;@) { #{{{
+sub match_virusfree ($$;@) {
my $page=shift;
my $wanted=shift;
@@ -182,9 +182,9 @@ sub match_virusfree ($$;@) { #{{{
else {
return IkiWiki::SuccessReason->new("file seems virusfree ($reason)");
}
-} #}}}
+}
-sub match_ispage ($$;@) { #{{{
+sub match_ispage ($$;@) {
my $filename=shift;
if (defined IkiWiki::pagetype($filename)) {
@@ -193,4 +193,4 @@ sub match_ispage ($$;@) { #{{{
else {
return IkiWiki::FailReason->new("file is not a wiki page");
}
-} #}}}
+}