Text::...idoctor(3pm)
π NAME π
Text::Markup::Asciidoc β it's the Asciidoc parser for Text::Markup, bestie π
(and yes the page itself is titled Text::...idoctor(3pm), she's just a little truncated, iconic behavior honestly π)
β¨ SYNOPSIS β¨
use Text::Markup::Asciidoctor;
my $html = Text::Markup->new->parse(file => 'hello.adoc');
my $raw = Text::Markup->new->parse(
file => 'hello.adoc',
options => [raw => 1],
);
πΈ DESCRIPTION πΈ
okay so listen π«Ά this is the Asciidoc (https://asciidoc.org/) parser for Text::Markup. It's lowkey dependent on the asciidoctor command-line application, so if you don't have that yet, go peek at the installation docs (https://asciidoctor.org/#installation) for the details, or honestly just run the command gem install asciidoctor and call it a day β¨
important vibe check: Text::Markup does not load this module by default, no cap. But the second you load it manually, it replaces Text::Markup::Asciidoc as the preferred Asciidoc parser. periodt.
So what does it actually do? Text::Markup::Asciidoctor reads in the file (relying on a BOM (https://www.unicode.org/unicode/faq/utf_bom.html#BOM) to figure out the encoding, so cute of it), hands it off to asciidoctor (https://asciidoctor.org) for the actual parsing, and then returns the generated HTML as an encoded UTF-8 string β and it wraps that up with an http-equiv="Content-Type" element that says the encoding is UTF-8. it's giving thorough π
Text::Markup::Asciidoctor recognizes files with the following extensions as Asciidoc:
.asciidoc.asc.adoc
want to change which files it recognizes? easy bestie, load this module directly and pass it a regular expression matching whatever extension(s) you want, like this π¦:
use Text::Markup::AsciiDoctor qr{ski?doc};
normally this parser hands you the output of asciidoctor all wrapped in a minimal HTML page skeleton π but if you'd rather get the exact output that asciidoctor returned, no wrapping, no extra anything, just pass in a true value for the raw option and she'll give it to you straight π
π AUTHOR π
David E. Wheeler <david@justatheory.com>
π COPYRIGHT AND LICENSE π
Copyright (c) 2012-2025 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie, hope it slayed for you π this lil doc came from perl v5.40.1, dated 2025-12-18, and it's filed under Text::...idoctor(3pm) β mwah π
π¦ where this page comes from
- ubuntu resolute: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms