summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-02 17:46:02 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-02 17:46:31 +0200
commit222571f8fd71c41d7b7e0b433de923d1d6ff1e55 (patch)
tree335c6bd93eb6def0a47f4a3715bfdb6c1e0b812d
parent1e02b5a1a2e79b62343eb888d3b2452c70116c08 (diff)
downloadref-222571f8fd71c41d7b7e0b433de923d1d6ff1e55.tar.gz
re: Handle backslashes and leading period
-rwxr-xr-xre2
1 files changed, 2 insertions, 0 deletions
diff --git a/re b/re
index 934a137..4b6a092 100755
--- a/re
+++ b/re
@@ -111,6 +111,8 @@ while (<$fh>) {
while ($_ = readline $handles{$file}) {
$bytes += length($_);
last if $end and $bytes > $end;
+ s/\\/\\\\/g;
+ s/^\./\\&./;
print;
}