From cdfb76e5ae4819eca5a95fb2a35a7ddabebef768 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 25 Mar 2015 04:16:34 +0100 Subject: Use en-dash with simple number ranges. --- native-hacks | 2 ++ 1 file changed, 2 insertions(+) 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($_); -- cgit v1.2.3