 this file to name it for gitweb.</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-css/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-local/local.css'/>
<script type='text/javascript' src='/cgit.js'></script>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://source.jones.dk/ikiwiki-upstream/atom/IkiWiki/Plugin/textile.pm?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='https://source.jones.dk/ikiwiki-upstream' title='ikiwiki-upstream Git repository'/>
<link rel='vcs-git' href='user@source.jones.dk:ikiwiki-upstream' title='ikiwiki-upstream Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/cgit-css/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/ikiwiki-upstream/'>ikiwiki-upstream</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'/><select name='h' onchange='this.form.submit();'>
<option value='layoutgala'>layoutgala</option>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Unnamed repository; edit this file to name it for gitweb.</td><td class='sub right'>Jonas Smedegaard</td></tr></table>
<table class='tabs'><tr><td>
<a href='/ikiwiki-upstream/'>summary</a><a href='/ikiwiki-upstream/refs/?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>refs</a><a href='/ikiwiki-upstream/log/IkiWiki/Plugin/textile.pm'>log</a><a class='active' href='/ikiwiki-upstream/tree/IkiWiki/Plugin/textile.pm?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>tree</a><a href='/ikiwiki-upstream/commit/IkiWiki/Plugin/textile.pm?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>commit</a><a href='/ikiwiki-upstream/diff/IkiWiki/Plugin/textile.pm?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>diff</a></td><td class='form'><form class='right' method='get' action='/ikiwiki-upstream/log/IkiWiki/Plugin/textile.pm'>
<input type='hidden' name='id' value='d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/ikiwiki-upstream/tree/?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>root</a>/<a href='/ikiwiki-upstream/tree/IkiWiki?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>IkiWiki</a>/<a href='/ikiwiki-upstream/tree/IkiWiki/Plugin?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>Plugin</a>/<a href='/ikiwiki-upstream/tree/IkiWiki/Plugin/textile.pm?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>textile.pm</a></div><div class='content'>blob: bbd282f0c8dd09035f03eadc85fbd3ea0823cf7a (<a href='/ikiwiki-upstream/plain/IkiWiki/Plugin/textile.pm?id=d6b87bd25ec6f466c6d3c486b4e923377ad8ee2a'>plain</a>)
<table summary='blob content' class='blob'>
<tr>
<td class='lines'><pre><code><ol class="hl">
<li id="n_1" class="hl"><span class="hl slc">#!/usr/bin/perl</span></li>
<li id="n_2" class="hl"><span class="hl slc">#&nbsp;By mazirian; GPL license</span></li>
<li id="n_3" class="hl"><span class="hl slc"># Textile markup</span></li>
<li id="n_4" class="hl"></li>
<li id="n_5" class="hl"><span class="hl kwa">package </span>IkiWiki<span class="hl opt">::</span>Plugin<span class="hl opt">::</span>textile<span class="hl opt">;</span></li>
<li id="n_6" class="hl"></li>
<li id="n_7" class="hl"><span class="hl kwa">use </span>warnings<span class="hl opt">;</span></li>
<li id="n_8" class="hl"><span class="hl kwa">use </span>strict<span class="hl opt">;</span></li>
<li id="n_9" class="hl"><span class="hl kwa">use </span>IkiWiki <span class="hl num">2.00</span><span class="hl opt">;</span></li>
<li id="n_10" class="hl"><span class="hl kwa">use </span>Encode<span class="hl opt">;</span></li>
<li id="n_11" class="hl"></li>
<li id="n_12" class="hl"><span class="hl kwa">sub </span>import <span class="hl opt">{ </span><span class="hl slc">#{{{</span></li>
<li id="n_13" class="hl">    hook<span class="hl opt">(</span>type <span class="hl opt">=&gt; </span><span class="hl sng">&quot;getsetup&quot;</span><span class="hl opt">, </span>id <span class="hl opt">=&gt; </span><span class="hl sng">&quot;textile&quot;</span><span class="hl opt">, </span>call <span class="hl opt">=&gt; </span>\<span class="hl opt">&amp;</span>getsetup<span class="hl opt">);</span></li>
<li id="n_14" class="hl">    hook<span class="hl opt">(</span>type <span class="hl opt">=&gt; </span><span class="hl sng">&quot;htmlize&quot;</span><span class="hl opt">, </span>id <span class="hl opt">=&gt; </span><span class="hl sng">&quot;txtl&quot;</span><span class="hl opt">, </span>call <span class="hl opt">=&gt; </span>\<span class="hl opt">&amp;</span>htmlize<span class="hl opt">);</span></li>
<li id="n_15" class="hl"><span class="hl opt">} </span><span class="hl slc"># }}}</span></li>
<li id="n_16" class="hl"></li>
<li id="n_17" class="hl"><span class="hl kwa">sub </span>getsetup <span class="hl opt">() { </span><span class="hl slc">#{{{</span></li>
<li id="n_18" class="hl">    <span class="hl kwa">return</span></li>
<li id="n_19" class="hl">        plugin <span class="hl opt">=&gt; {</span></li>
<li id="n_20" class="hl">            safe <span class="hl opt">=&gt; </span><span class="hl num">1</span><span class="hl opt">,</span></li>
<li id="n_21" class="hl">            rebuild <span class="hl opt">=&gt; </span><span class="hl num">1</span><span class="hl opt">, </span><span class="hl slc"># format plugin</span></li>
<li id="n_22" class="hl">        <span class="hl opt">},</span></li>
<li id="n_23" class="hl"><span class="hl opt">} </span><span class="hl slc">#}}}</span></li>
<li id="n_24" class="hl"></li>
<li id="n_25" class="hl"><span class="hl kwa">sub </span>htmlize <span class="hl opt">(&#64;) { </span><span class="hl slc">#{{{</span></li>
<li id="n_26" class="hl">    <span class="hl kwc">my </span><span class="hl kwb">%params</span><span class="hl opt">=</span><span class="hl kwb">&#64;_</span><span class="hl opt">;</span></li>
<li id="n_27" class="hl">    <span class="hl kwc">my </span><span class="hl kwb">$content </span><span class="hl opt">= </span>decode_utf8<span class="hl opt">(</span>encode_utf8<span class="hl opt">(</span><span class="hl kwb">$params</span><span class="hl opt">{</span>content<span class="hl opt">}));</span></li>
<li id="n_28" class="hl"></li>
<li id="n_29" class="hl">    <span class="hl kwc">eval </span><span class="hl sng">q{use Text::Textile}</span><span class="hl opt">;</span></li>
<li id="n_30" class="hl">    <span class="hl kwa">return </span><span class="hl kwb">$content </span><span class="hl kwa">if </span><span class="hl kwb">$&#64;</span><span class="hl opt">;</span></li>
<li id="n_31" class="hl">    <span class="hl kwa">return </span>Text<span class="hl opt">::</span>Textile<span class="hl opt">::</span>textile<span class="hl opt">(</span><span class="hl kwb">$content</span><span class="hl opt">);</span></li>
<li id="n_32" class="hl"><span class="hl opt">} </span><span class="hl slc"># }}}</span></li>
<li id="n_33" class="hl"></li>
<li id="n_34" class="hl"><span class="hl num">1</span></li>
</ol></code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.46.0</a>) at 2025-06-21 08:31:15 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
