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 7 years ago
parent
commit
8e2b89704b
  1. 14
      Markdown.pl

14
Markdown.pl

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

Loading…
Cancel
Save