Browse Source

Markdown.pl: process all file arguments

The Markdown function can be called repeatedly, so
stop ignoring file arguments after the first one and
process them all just like the docs claim.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
master
Kyle J. McKay 9 years ago
parent
commit
8e2b89704b
  1. 10
      Markdown.pl

10
Markdown.pl

@ -248,12 +248,16 @@ elsif (!caller) {
#### Process incoming text: ###########################
my $text;
for (;;) {
local $_;
{
local $/; # Slurp the whole file
$text = <>;
$_ = <>;
}
print Markdown($text, \%options);
defined($_) or last;
print Markdown($_, \%options);
}
exit 0;
}
}

Loading…
Cancel
Save