Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (19 sloc) 425 Bytes
#!/usr/bin/env perl
use strict;
use warnings;
use bytes;
while (<>) {
s{\s\[ ( [^\[\s]+ ) \]\s }{" `[`$1`]` "}gixe;
s{ \[\[ ( [^\]\|]+ ) \| ([^\]]*) \]\] }{"[$1 $2]"}gixe;
s{'''(.*?)'''}{"`$1`"}ge;
s{''(.*?)''}{"_$1_"}ge;
s{^\s*<[^/>]+>\s*$}{\{\{\{\n};
s{^\s*</[^/]+>\s*$}{\}\}\}};
if (/^\s*$/) {
print "\n";
next;
}
s{^\*}{ \*};
s{^\#}{ \#};
print $_;
}
Something went wrong with that request. Please try again.