Text::...rkdown(3pm)

πŸ“¦
version 0.41 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Text::Markup::Markdown β€” the Markdown parser for Text::Markup, bestie πŸ’–

(also known as the manual page Text::...rkdown(3pm), from the User Contributed Perl Documentation collection, iykyk πŸŽ€)


🌸 SYNOPSIS 🌸

my $html = Text::Markup->new->parse(file => 'README.md');
my $raw  = Text::Markup->new->parse(
    file    => 'README.md',
    options => [ raw => 1 ],
);

πŸ’… DESCRIPTION πŸ’…

Okay so this is the Markdown parser for Text::Markup, and it's literally doing the most in the best way. Here's the tea: it reads in the file (relying on a BOM β€” like, it trusts the BOM to tell it what's what), hands it off to Text::Markdown::Discount for the actual parsing, and then returns the generated HTML as an encoded UTF-8 string with an "http-equiv="Content-Type"" element that identifies the encoding as UTF-8. Slay. πŸ”₯

The links in question, since you'll wanna peek:


πŸ¦‹ The Extensions It Recognizes πŸ¦‹

It recognizes files with the following extensions as Markdown, no cap:

  • .md
  • .mkd
  • .mkdn
  • .mdown
  • .markdown

πŸ’œ Want To Change Which Files It Claims? πŸ’œ

Say less. To change the files it recognizes, load this module directly and pass a regular expression matching the extension(s) you want, like so:

use Text::Markup::Markdown qr{markd?};

πŸŽ€ Skeleton Or No Skeleton πŸŽ€

Normally this module returns the output wrapped in a minimal HTML document skeleton β€” very demure, very put-together. But if you'd like the raw output without the skeleton, you can pass the raw parameter to parse. Main character choice honestly. ✨


πŸ‘‘ The flags Parameter πŸ‘‘

The Text::Markup::Markdown parse method supports an additional parameter, flags, which is a bitmask of Text::Markdown::Discount options. Here's that link, go look:

Use this parameter to replace the default, which is:

MKD_NOHEADER | MKD_TOC | MKD_DLEXTRA | MKD_FENCEDCODE | MKD_EXTRA_FOOTNOTE | MKD_IDANCHOR
fr fr, that's the default bitmask β€” don't forget it if you're swapping in your own. πŸ’€

🌈 SEE ALSO 🌈


🫢 AUTHOR 🫢

David E. Wheeler <david@justatheory.com> β€” king behavior πŸ‘‘


Copyright (c) 2011-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. Periodt. πŸ’–


And that's the whole page, bestie! This was rendered from perl v5.40.1, dated 2025-12-18, and yes it's still Text::...rkdown(3pm) in the corner πŸ¦‹ β€” go forth and parse, you absolute icon πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from