From c42fee89493e06b35c7a5873e93b0b8734da6dd7 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 9 Jul 2025 11:39:00 +0200 Subject: Better de-hyphentation --- convert2.awk | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'convert2.awk') diff --git a/convert2.awk b/convert2.awk index 9ca0dd4..b801ef1 100644 --- a/convert2.awk +++ b/convert2.awk @@ -1,6 +1,6 @@ # awk { - if (match($0, /-$/)) { + while (match($0, /-$/)) { # Drop line continuation gsub(/-$/, "") @@ -18,10 +18,7 @@ # Drop the first word, remove leading whitespace $1="" sub(/^[ \t]+/, "") - print - - next - } else { - print } + + print } -- cgit v1.2.3