From: b Date: Sun, 24 Sep 2023 13:22:31 +0000 (+0000) Subject: Allow whitespace before ':' X-Git-Tag: v1.2.1 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=cc70d0da5dd780e2b7b97672cc0638fd91196ee3;p=botm%2Fconfig Allow whitespace before ':' --- 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;