From cc70d0da5dd780e2b7b97672cc0638fd91196ee3 Mon Sep 17 00:00:00 2001 From: b Date: Sun, 24 Sep 2023 13:22:31 +0000 Subject: [PATCH] Allow whitespace before ':' --- configure.1.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.1.pl b/configure.1.pl index 806f3cc..6a150cf 100755 --- a/configure.1.pl +++ b/configure.1.pl @@ -146,9 +146,10 @@ # line2 # The name consists of the characters A-Z, a-z, 0-9, '-', '_', and '.'. # -# In the first format (name: value) the ':' must be immediately after the name. -# The value starts immediately after the first whitespace and is taken directly -# without any processing. +# In the first format (name: value): +# - Any amount (including 0) of whitespace is allowed before the ':'. +# - The value starts immediately after the first whitespace after the ':' +# and is taken directly without any processing. # # In the second format (name = value) some processing is performed: # - Any amount (including 0) of whitespace is allowed before and @@ -1014,7 +1015,7 @@ sub parse_file { print_debug($depth, "LINE $line"); # new definition name: value - if ($line =~ /^([A-Za-z0-9_\-\.]+):[ \t](.*)$/) { + if ($line =~ /^([A-Za-z0-9_\-\.]+)[ \t]*:[ \t](.*)$/) { $parse_mode = 0; unless ($if_block) { $name = $1; -- 2.30.2