diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-12-30 01:50:08 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-12-30 01:50:08 +0100 |
commit | 6f98b4dfb2b80e3eb3072dd3f140351581746db2 (patch) | |
tree | 3504d7481f617648637af7e3209bb32f45e605c0 /mediawiki-blockquote | |
parent | 5b493a9bf8356bce9472256a3a2a16c3b7ab2643 (diff) |
Move mediawiki tweaks to separate scripts.
Diffstat (limited to 'mediawiki-blockquote')
-rwxr-xr-x | mediawiki-blockquote | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mediawiki-blockquote b/mediawiki-blockquote new file mode 100755 index 0000000..46de0cd --- /dev/null +++ b/mediawiki-blockquote @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +# work around in mediawiki bug parsing blockquote tags on same line + +use warnings; +use strict; + +use Path::Tiny; + +my $infile = shift; +my $outfile = shift || $infile; + +$_ = path($infile)->slurp_utf8; + +s!\n*(</?blockquote>)\n*!\n$1\n!g; + +path($outfile)->spew_utf8($_); + +1; |