From 5f4883f858098c92188b5afcf8029a195c94a6d6 Mon Sep 17 00:00:00 2001 From: xonix Date: Wed, 8 Dec 2021 19:55:37 +0200 Subject: [PATCH] Diminish the notion of prelude #84 : fix regex --- Makesurefile | 1 + makesure.awk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makesurefile b/Makesurefile index 9ba4654..e4d70a3 100644 --- a/Makesurefile +++ b/Makesurefile @@ -46,6 +46,7 @@ @goal debug @private @doc shows software versions AWK="${AWK:-awk}" + printf "%s: " "$AWK" case "$AWK" in *mawk*) "$AWK" -W version 2>&1 | head -n 1 ;; diff --git a/makesure.awk b/makesure.awk index b3a3f30..90001e2 100755 --- a/makesure.awk +++ b/makesure.awk @@ -541,7 +541,7 @@ function getMyDir(makesurefilePath) { } function handleCodeLine(line) { - if (isPrelude() && line !~ /^\s*#/ && trim(line) != "" && !ShellInPreludeErrorShown++) + if (isPrelude() && line !~ /^[ \t]*#/ && trim(line) != "" && !ShellInPreludeErrorShown++) addError("Shell code is not allowed in prelude area") else addCodeLine(line)