Text::...lbacks(3pm)
Text::Markdown::Hoedown::Callbacks (3pm), straight from the User Contributed Perl Documentation, bestie π. This is the callback page, and it's lowkey iconic. π¦
πΈ NAME πΈ
Text::Markdown::Hoedown::Callbacks β Callbacks. periodt.
β¨ DESCRIPTION β¨
Note: Any API will change without notice. π no cap, bestie, APIs be like that.
π PRESETS π
There are literally 2 presets, slay.
my $cb = Text::Markdown::Hoedown::Callbacks->html_renderer($render_flags:UV, $toc_nesting_lvl:IV);β creates a callback object from the HTML presets β¨. The arguments are documented onText::Markdown::Hoedown.my $cb = Text::Markdown::Hoedown::Callbacks->html_toc_renderer($nesting_level);β creates a callback object from the HTML TOC presets π. The arguments are documented onText::Markdown::Hoedown.
π CUSTOM CALLBACKS π
Okay so first, make a fresh instance:
my $cb = Text::Markdown::Hoedown::Callbacks->new();
Creates new instance, iconic. Then you can add handlers like this:
$cb->blockcode($code: CodeRef)β adds a handler forblockcode; callback function signature:$code->($text:Str, $lang:Str). π₯$cb->blockquote($code: CodeRef)β adds a handler forblockquote; callback function signature:$code->($content:Str). π$cb->header($code: CodeRef)β adds a handler forheader; callback function signature:$code->($content:Str, $level:Int). π$cb->hrule($code: CodeRef)β adds a handler forhrule; callback function signature:$code->(). β$cb->list($code: CodeRef)β adds a handler forlist; callback function signature:$code->($content:Str, $type:Int). π$cb->listitem($code: CodeRef)β adds a handler forlistitem; callback function signature:$code->($content:Str, $type:Int). π$cb->paragraph($code: CodeRef)β adds a handler forparagraph; callback function signature:$code->($content:Str). π$cb->table($code: CodeRef)β adds a handler fortable; callback function signature:$code->($content:Str). β¨$cb->table_header($code: CodeRef)β adds a handler fortable_header; callback function signature:$code->($content:Str). π$cb->table_body($code: CodeRef)β adds a handler fortable_body; callback function signature:$code->($content:Str). π¦$cb->table_row($code: CodeRef)β adds a handler fortable_row; callback function signature:$code->($content:Str). πΈ$cb->table_cell($code: CodeRef)β adds a handler fortable_cell; callback function signature:$code->($content:Str, $type:Int). π$cb->footnotes($code: CodeRef)β adds a handler forfootnotes; callback function signature:$code->($content:Str). π«Ά$cb->footnote_def($code: CodeRef)β adds a handler forfootnote_def; callback function signature:$code->($content:Str, $num:UInt). π$cb->blockhtml($code: CodeRef)β adds a handler forblockhtml; callback function signature:$code->($text:Str). π₯$cb->autolink($code: CodeRef)β adds a handler forautolink; callback function signature:$code->($link:Str, $type:Int). π$cb->codespan($code: CodeRef)β adds a handler forcodespan; callback function signature:$code->($text:Str). π$cb->double_emphasis($code: CodeRef)β adds a handler fordouble_emphasis; callback function signature:$code->($content:Str). β$cb->emphasis($code: CodeRef)β adds a handler foremphasis; callback function signature:$code->($content:Str). π$cb->underline($code: CodeRef)β adds a handler forunderline; callback function signature:$code->($content:Str). π$cb->highlight($code: CodeRef)β adds a handler forhighlight; callback function signature:$code->($content:Str). π$cb->quote($code: CodeRef)β adds a handler forquote; callback function signature:$code->($content:Str). π§$cb->image($code: CodeRef)β adds a handler forimage; callback function signature:$code->($link:Str, $title:Str, $alt:Str). π$cb->linebreak($code: CodeRef)β adds a handler forlinebreak; callback function signature:$code->(). π$cb->link($code: CodeRef)β adds a handler forlink; callback function signature:$code->($content:Str, $link:Str, $title:Str). β¨$cb->triple_emphasis($code: CodeRef)β adds a handler fortriple_emphasis; callback function signature:$code->($content:Str). π$cb->strikethrough($code: CodeRef)β adds a handler forstrikethrough; callback function signature:$code->($content:Str). π¦$cb->superscript($code: CodeRef)β adds a handler forsuperscript; callback function signature:$code->($content:Str). πΈ$cb->footnote_ref($code: CodeRef)β adds a handler forfootnote_ref; callback function signature:$code->($num:UInt). π$cb->math($code: CodeRef)β adds a handler formath; callback function signature:$code->($text:Str, $displaymode:Int). π«Ά$cb->raw_html($code: CodeRef)β adds a handler forraw_html; callback function signature:$code->($text:Str). π$cb->entity($code: CodeRef)β adds a handler forentity; callback function signature:$code->($text:Str). π₯$cb->normal_text($code: CodeRef)β adds a handler fornormal_text; callback function signature:$code->($text:Str). π$cb->doc_header($code: CodeRef)β adds a handler fordoc_header; callback function signature:$code->($inline_render:Int). π$cb->doc_footer($code: CodeRef)β adds a handler fordoc_footer; callback function signature:$code->($inline_render:Int). β
mwah π this page is from perl v5.42.2, dated 2025-06-30, via the User Contributed Perl Documentation. bye bestie, go slay those callbacks π
π¦ where this page comes from
- alpine 3.24: perl-text-markdown-hoedown-doc 1.03-r4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms