Text::...diawiki(3pm)
β¨ NAME β¨
Text::Markup::Mediawiki β it's the MediaWiki syntax parser for Text::Markup, bestie π (the manual header calls it Text::...diawiki(3pm) because apparently even manpages get name-shy, but we know who she is π)
πΈ SYNOPSIS πΈ
my $html = Text::Markup->new->parse(file => 'README.mediawiki');
my $raw = Text::Markup->new->parse(
file => 'README.mediawiki',
options => [ {}, { raw => 1 } ],
);
π¦ DESCRIPTION π¦
Okay so this is the MediaWiki syntax parser β the [MediaWiki syntax](https://en.wikipedia.org/wiki/Help:Contents/Editing_Wikipedia) parser, specifically β for Text::Markup. Here's the whole glow-up: it reads in the file (and yeah, it's relying on a BOM, the [BOM](https://www.unicode.org/unicode/faq/utf_bom.html#BOM), no cap), hands it off to Text::MediawikiFormat for 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. She's tidy like that π
It recognizes files with the following extensions as MediaWiki:
.mediawiki.mwiki.wiki
Want to change the files it recognizes? Lowkey easy. Load this module directly and pass a regular expression matching the extension(s) you actually want, like so:
use Text::Markup::Mediawiki qr{kwiki?};
Text::Markup::Mediawiki supports the two Text::MediawikiFormat arguments: a hash reference for tags and a hash reference of options. The supported options include:
"prefix""extended""implicit_links""absolute_links""process_html"
Normally this module returns the output wrapped in a minimal HTML document skeleton. But if you want the raw output without the skeleton β just the vibes, no packaging β you can pass the "raw" option via that second hash reference of options. Iconic π
π AUTHOR π
David E. Wheeler <david@justatheory.com>
π COPYRIGHT AND LICENSE π
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.
fr fr, that's the whole page π«Ά go parse something gorgeous, bestie
And a lil sign-off for the footer girlies: this page is served up by perl v5.40.1, dated 2025-12-18 β Text::...diawiki(3pm), still slaying, still parsing MediaWiki πβ¨π
π¦ 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