summaryrefslogtreecommitdiff
path: root/re
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-02 21:44:00 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-06-02 21:44:00 +0200
commitc4082d824547f116b03b5f9e62aa376bff1ddb1e (patch)
tree73eea258b848b5a64f2f751811bf302deb1cd66b /re
parent222571f8fd71c41d7b7e0b433de923d1d6ff1e55 (diff)
downloadref-c4082d824547f116b03b5f9e62aa376bff1ddb1e.tar.gz
re: Wrap lines longer than 60 characters
Diffstat (limited to 're')
-rwxr-xr-xre5
1 files changed, 4 insertions, 1 deletions
diff --git a/re b/re
index 4b6a092..51e400e 100755
--- a/re
+++ b/re
@@ -111,8 +111,11 @@ while (<$fh>) {
while ($_ = readline $handles{$file}) {
$bytes += length($_);
last if $end and $bytes > $end;
+ /^(\s+)/; my $indent = $1;
+ s/(.{60})(.)/$1\\fR...\\fP\n$indent\t$2/g;
s/\\/\\\\/g;
- s/^\./\\&./;
+ s/\\\\fR...\\\\fP/\\fR...\\fP/g;
+ s/^\./\\&./m;
print;
}