Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod2md: Some fixes #730

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions support/pod2md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl
#!perl
# -*- indent-tabs-mode: nil; -*-
# vim:ft=perl:et:sw=4

Expand Down Expand Up @@ -27,10 +27,10 @@ use Encode qw();
use English qw(-no_match_vars);
use FindBin qw($Bin);
use Getopt::Long;
use Pod::Markdown;
use Pod::Markdown 3.000;
use Pod::Usage;

# Available options are "help" and "verbose".
# Available options are "help", "release" and "verbose".
# Others are there for compatibility to pod2man(1).
my %options;
GetOptions(
Expand All @@ -46,9 +46,12 @@ GetOptions(
) or exit 1;
pod2usage(0) if $options{help};
my $verbose = $options{verbose};
#my $release = $options{release};
my $release = $options{release};

my $parser = Pod::Markdown::Sympa->new(output_encoding => 'utf-8',);
my $parser = Pod::Markdown::Sympa->new(
output_encoding => 'utf-8',
html_encode_chars => '|',
);
do {
my ($ifile, $ofile) = splice @ARGV, 0, 2;
my $fname = [split m{/}, $ofile || $ifile || 'manual']->[-1];
Expand All @@ -73,7 +76,7 @@ do {
# Write preamble compatible to GHF Markdown.
print $ofh "---\n";
print $ofh "title: '$title'\n" if $title =~ /\S/;
#print $ofh "release: '$release'\n" if $release;
print $ofh "release: '$release'\n" if $release;
print $ofh "---\n\n";

$parser->output_fh($ofh);
Expand Down