summaryrefslogtreecommitdiff
path: root/native-hacks
blob: dca1520bdaf04e1cbc68e49ea7404100e09d391c (plain)
  1. #!/usr/bin/perl
  2. # work around smart quote handling not smart enough
  3. use warnings;
  4. use strict;
  5. use Path::Tiny;
  6. use Regexp::Common qw(net);
  7. my $infile = shift;
  8. my $outfile = shift || $infile;
  9. $_ = path($infile)->slurp_utf8;
  10. # "pandoc --smart" apparently ignores en- and em-dashes with mediawiki.
  11. s/Space,Str "--",Space/Space,Str "\\8212",Space/g;
  12. path($outfile)->spew_utf8($_);
  13. 1;