Templa...xtile2(3pm)

πŸ“¦
version 1.21 Β· 2 versions
  • 1.21 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.21 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Template::Plugin::Textile2 ✨

okay bestie, welcome to Template::Plugin::Textile2 β€” that's a module from the User Contributed Perl Documentation crew, and she's here to serve. πŸ’…


🌸 NAME 🌸

Template::Plugin::Textile2 β€” the way to use Textile formatting with Template Toolkit. no cap. 🧚


πŸŽ€ SYNOPSIS πŸŽ€

watch this slay:

  [% USE Textile2 -%]
  [% FILTER textile2 %]This *bold* and this is _italic_.[% END %]

  <p>this is <strong>bold</strong> and this is <em>italic</em>.

  [% USE Textile2 ( disable_html => 1 ) -%]
  [% FILTER textile2 %]this is<br /> _italic_.[% END %]

  <p>this is&lt;br /&gt; <em>italic</em>.</p>

see how the input just became HTML? that's her. that's the whole vibe. ✨


πŸ’– DESCRIPTION πŸ’–

so basically this module wraps Text::Textile into a plugin for Template Toolkit. 🫢

it hands you a filter named textile2, and she is highkey aiming to be a more feature-full version of Template::Plugin::Textile, because she lets you pass parameters straight through to Text::Textile. main character energy, honestly. πŸ‘‘

use her like this:

    [% FILTER textile2 %]
    Reasons to use the Template Toolkit:

    * Seperation of concerns.
    * It's written in Perl.
    * Badgers are Still Cool.
    [% END %]

or like this, if you're feeling compact:

    [% mytext | textile2 %]

and here's the good part β€” you can pass the same options you would pass to Text::Textile, directly when using the template. for instance, if you wanna disable processing of HTML tags, you just do:

    [% USE Textile2 ( disable_html => 1 ) %]

and if you want to avoid your text getting wrapped up in &lt;p&gt...&lt;/p&gt, you can use:

    [% USE Textile2 ( format_mode => 'inline' ) %]

that's the trick, iykyk. 🀫

fr fr, go see Text::Textile for all the details β€” she's the one holding the lore. πŸ“š

πŸ’œ AUTHOR πŸ’œ

Michele Beltrame mb@italpro.net. iconic. ✨


🌈 LICENSE 🌈

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

  • Text::Textile
  • Template

and that's a wrap, bestie πŸ’– this page came to you from perl v5.34.0, dated 2022-06-17, and she ate. no crumbs. πŸŽ€βœ¨

πŸ“¦ where this page comes from