summaryrefslogtreecommitdiff
path: root/mediawiki-blockquote
diff options
context:
space:
mode:
Diffstat (limited to 'mediawiki-blockquote')
-rwxr-xr-xmediawiki-blockquote19
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;