summaryrefslogtreecommitdiff
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
parent222571f8fd71c41d7b7e0b433de923d1d6ff1e55 (diff)
downloadref-c4082d824547f116b03b5f9e62aa376bff1ddb1e.tar.gz
re: Wrap lines longer than 60 characters
-rwxr-xr-xre5
-rw-r--r--re.tmac2
2 files changed, 5 insertions, 2 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;
}
diff --git a/re.tmac b/re.tmac
index a896f9e..08b9920 100644
--- a/re.tmac
+++ b/re.tmac
@@ -6,7 +6,7 @@
. if !(\nz = 1) .if (\np > 0) .if (\n% > \np) .sp -(\nbu - \ncu - 1.5v)
. nf
. ft C
-. ps -1p
+. ps -2p
. vs -1p
. ta 8n +8n +8n +8n +8n
. in 2.2i