#!/usr/bin/perl

use strict;
use warnings;

use File::Slurp qw( read_file );
use HTML::Tidy;
use Markdent::Simple;

my $markdown = read_file(shift);

my $html = Markdent::Simple->new()->markdown_to_html(
    title    => 'Needs a Title',
    markdown => $markdown,
);

my $tidy = HTML::Tidy->new(
    {
        doctype => 'transitional',
        indent  => 1,
    }
);

print $tidy->clean($html);
