<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# CamelCase links
package IkiWiki::Plugin::camelcase;

use warnings;
use strict;
use IkiWiki 2.00;

sub import { #{{{
	hook(type =&gt; "filter", id =&gt; "camelcase", call =&gt; \&amp;filter);
} # }}}

sub filter (@) { #{{{
	my %params=@_;

	# Make CamelCase links work by promoting them to fullfledged
	# WikiLinks. This regexp is based on the one in Text::WikiFormat.
	$params{content}=~s#(?&lt;![[|"/&gt;=])\b((?:[A-Z][a-z0-9]\w*){2,})#[[$1]]#g;

	return $params{content};
} #}}}

1
</pre></body></html>