NAME
Text::MarkdownAdoc - Convert Markdown (GFM + kramdown) to AsciiDoc
SYNOPSIS
use Text::MarkdownAdoc;
my $converter = Text::MarkdownAdoc->new(
attributes => { 'toc' => 'auto' },
);
my $asciidoc = $converter->convert($markdown_text, {
attributes => { 'imagesdir' => 'img' },
});
DESCRIPTION
Text::MarkdownAdoc is a pure Perl converter that transforms Markdown documents into clean AsciiDoc output suitable for use with Asciidoctor.
The primary target dialect is GitHub-Flavored Markdown (GFM) plus kramdown extensions (definition lists, footnotes). Pure CommonMark is also supported as a subset.
CONSTRUCTOR
new(%options)
Creates a new converter instance. Options provided to the constructor become defaults for all subsequent convert calls.
Options:
attributes-
A hashref of AsciiDoc attributes to inject into the output document header. Attributes from the constructor and per-call options are merged key-by-key.
METHODS
convert($text, \%per_call_opts)
Converts Markdown text to AsciiDoc. Returns the converted string.
Per-call options are merged with constructor defaults. The attributes hash is merged key-by-key; all other options are overridden by the per-call value.
VERSION
0.1.0
AUTHOR
Sandor Patocs
LICENSE
This module is licensed under the same terms as Perl itself.
SEE ALSO
Text::MarkdownAdoc::Parser, Text::MarkdownAdoc::Inline, Text::MarkdownAdoc::Refs