bugs
parent
fb796fa725
commit
e7ddbb822a
|
@ -113,7 +113,7 @@ sub preprocess_inline (@) { #{{{
|
||||||
my $file = $pagesources{$page};
|
my $file = $pagesources{$page};
|
||||||
my $type = pagetype($file);
|
my $type = pagetype($file);
|
||||||
if (! $raw || ($raw && ! defined $type)) {
|
if (! $raw || ($raw && ! defined $type)) {
|
||||||
if (! $archive && $quick) {
|
unless ($archive && $quick) {
|
||||||
# Get the content before populating the
|
# Get the content before populating the
|
||||||
# template, since getting the content uses
|
# template, since getting the content uses
|
||||||
# the same template if inlines are nested.
|
# the same template if inlines are nested.
|
||||||
|
|
|
@ -45,7 +45,7 @@ sub preprocess (@) { #{{{
|
||||||
|
|
||||||
my $ret="";
|
my $ret="";
|
||||||
foreach my $choice (@choices) {
|
foreach my $choice (@choices) {
|
||||||
my $percent=int($choices{$choice} / $total * 100);
|
my $percent=$total > 0 ? int($choices{$choice} / $total * 100) : 0;
|
||||||
if ($percent) {
|
if ($percent) {
|
||||||
$ret.="$choice ($percent%) ";
|
$ret.="$choice ($percent%) ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue