summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnative-hacks2
1 files changed, 2 insertions, 0 deletions
diff --git a/native-hacks b/native-hacks
index dca1520..e0f2318 100755
--- a/native-hacks
+++ b/native-hacks
@@ -14,7 +14,9 @@ my $outfile = shift || $infile;
$_ = path($infile)->slurp_utf8;
# "pandoc --smart" apparently ignores en- and em-dashes with mediawiki.
+# TODO: handle more ranges (e.g. roman numbers or single letters as first part)
s/Space,Str "--",Space/Space,Str "\\8212",Space/g;
+s/(Str "\d+)-(\d+")/$1", Str "\\8211", Str "$2/g;
path($outfile)->spew_utf8($_);