summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/unrest.pl
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-10 22:12:33 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-10 22:12:33 +0200
commit1430cb589b43c5b74ac592dff09e369880d2f026 (patch)
tree7233b4ee7f9cb2cf410becc7135ca7f5f6afc0a0 /crawl-ref/source/util/unrest.pl
parentfb03cd1a7cfab95c8747680fc48ca5c1279e304e (diff)
downloadcrawl-ref-1430cb589b43c5b74ac592dff09e369880d2f026.tar.gz
crawl-ref-1430cb589b43c5b74ac592dff09e369880d2f026.zip
Fix ? shortcuts not working when built from \r\n sources.
The latter can happen in specific git configurations when building on Windows.
Diffstat (limited to 'crawl-ref/source/util/unrest.pl')
-rwxr-xr-xcrawl-ref/source/util/unrest.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/util/unrest.pl b/crawl-ref/source/util/unrest.pl
index d36e8a00ae..0d68a7aeba 100755
--- a/crawl-ref/source/util/unrest.pl
+++ b/crawl-ref/source/util/unrest.pl
@@ -4,6 +4,9 @@ use warnings;
undef $/;
$_=<>;
+# Undo Windows newlines.
+s/\r\n/\n/sg;
+
# URLs have damn inconsistent handling in reST.
s|:http: ``(.+)``|$1|g;
s|:telnet: ``(.+)``|telnet: $1|g;