App-md2html

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for App-md2html

0.01.1  2026-04-16 06:59:37 PDT
        - Add MD2HTML_EMBEDDED/MD2HTML_FRAGMENT environment variables and
        --embedded|fragment CLI options for embedding output in existing HTML
        documents, for example the cgit about-filter output

        - Fix main package main so it indexes on CPAN properly/can be seen by cpanm,
        carton, carmel, cpm, etc.

        - Update author/fatpack.pl for latest version of IPC::Nosh

0.01  2026-04-13 13:45:38 PDT
        - Initial release

lib/App/md2html.pm  view on Meta::CPAN

use Syntax::Keyword::Dynamically;
use IPC::Nosh::Common;

const our $CHARSET_DEFAULT => 'UTF-8';
const our %HTMLOPT_DEFAULT => (
    doctype => '<!DOCTYPE html>',
    head    => [ '<head>', qq!<meta charset="$CHARSET_DEFAULT">!, '</head>' ]
);

field $embedded : param : accessor //=
  first { $_ } @ENV{ ( map { "MD2HTML_$_" } qw'EMBEDDED FRAGMENT' ) };

field $doctype : param : accessor { $HTMLOPT_DEFAULT{doctype} };

field $htmlopt : param : accessor = { %HTMLOPT_DEFAULT, doctype => $doctype };

#ield $encodeopt :param : accessor = { in => $App:: out => $encoding_in}

field $encoding_in  : param : accessor { $App::md2html::CHARSET_DEFAULT };
field $encoding_out : param : accessor { $encoding_in };



( run in 0.508 second using v1.01-cache-2.11-cpan-71847e10f99 )