From c4082d824547f116b03b5f9e62aa376bff1ddb1e Mon Sep 17 00:00:00 2001 From: "John Ankarstr\\xf6m" Date: Wed, 2 Jun 2021 21:44:00 +0200 Subject: re: Wrap lines longer than 60 characters --- re | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 're') 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; } -- cgit v1.2.3