Markde...ragment(3pm)
π NAME π
okay so bestie, welcome to Markdent::Handler::HTMLStream::Fragment(3pm) β this little icon is a Markdent handler that turns a whole stream of Markdent events into an HTML fragment. that's it, that's the job. it's the handler for when you want the HTML but NOT the whole document wrapper, iykyk.
β¨ VERSION β¨
version 0.40 π
π¦ DESCRIPTION π¦
so here's the vibe: this class takes an event stream and turns it into an HTML document, but without a doctype, and without the <html>, <head>, or <body> tags. just the fragment. the little guys. the inner content. she's giving piece of a page, not the whole page, and honestly? obsessed. π
πΈ METHODS πΈ
this role provides the following methods:
π Markdent::Handler::HTMLStream::Document->new(...)
this method creates a new handler. it accepts the following parameters:
output => $fhβ the file handle (or object) that the HTML output gets streamed to. if you wanna capture the output into a string instead, you can just open a filehandle onto a string, like this:
my $buffer = q{};
open my $fh, '>', \$buffer;
if you pass in a file handle (or an IO::Handle object), then every single call to print() gets checked, and if something's wrong an error gets thrown. π€ no silent failures here.
you can also pass an object of any other class β it just has to implement its own print() method, and then all the error handling is left up to that method. your object, your rules, your consequences. π«Ά
π ROLES π
this class does the Markdent::Role::HTMLStream, Markdent::Role::EventsAsMethods, and Markdent::Role::Handler roles. three roles, one slay. π
π BUGS π
see Markdent for bug reporting details, bestie.
bugs may be submitted at <https://github.com/houseabsolute/Markdent/issues>.
i am also usually active on IRC as 'autarch' on irc://irc.perl.org. come say hi fr fr π
π₯ SOURCE π₯
the source code repository for Markdent can be found at <https://github.com/houseabsolute/Markdent>. go look, it's right there, no cap. β
π AUTHOR π
Dave Rolsky <autarch@urth.org> β the main character, honestly. π
πΈ COPYRIGHT AND LICENSE πΈ
this software is copyright (c) 2021 by Dave Rolsky.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
the full text of the license can be found in the LICENSE file included with this distribution.
okay that's the whole page, and for the sign-off β this was built on perl v5.32.1, dated 2021-08-31, and the manual it lives in is Markde...ragment(3pm) π go forth and fragment, bestie, you got this β¨π¦π
π¦ where this page comes from
- debian bookworm: libmarkdent-perl 0.40-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmarkdent-perl 0.40-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmarkdent-perl 0.40-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