mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
Allow comments on continued lines
This commit is contained in:
parent
cf9bb616b8
commit
b03d502bbb
@ -1592,11 +1592,16 @@ sub read_a_line() {
|
||||
#
|
||||
s/^\s*// if $currentline =~ /[,:]$/;
|
||||
#
|
||||
# If this isn't a continued line, remove trailing comments. Note that
|
||||
# the result may now end in '\'.
|
||||
#
|
||||
s/\s*#.*$// unless /\\$/;
|
||||
#
|
||||
# Continuation
|
||||
#
|
||||
chop $currentline, next if substr( ( $currentline .= $_ ), -1, 1 ) eq '\\';
|
||||
#
|
||||
# Remove Trailing Comments -- result might be a blank line
|
||||
# Now remove contatinated comments
|
||||
#
|
||||
$currentline =~ s/#.*$//;
|
||||
#
|
||||
|
@ -9,7 +9,9 @@ Changes in Shorewall 4.4.2
|
||||
4) Let the Actions module add the builtin actions to
|
||||
%Shorewall::Chains::targets. Much better modularization that way.
|
||||
|
||||
5) Some changes to mmake Lenny->Squeeze less painful.
|
||||
5) Some changes to make Lenny->Squeeze less painful.
|
||||
|
||||
6) Allow comments at the end of continued lines.
|
||||
|
||||
Changes in Shorewall 4.4.1
|
||||
|
||||
|
@ -194,7 +194,17 @@ None.
|
||||
N E W F E A T U R E S I N 4 . 4 . 2
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
None.
|
||||
1) Prior to this release, line continuation has taken precedence over
|
||||
#-style comments. This prevents one from doing the following:
|
||||
|
||||
ACCEPT net:206.124.146.176,\ #Gateway
|
||||
206.124.146.177,\ #Mail
|
||||
206.124.146.178\ #Server
|
||||
...
|
||||
|
||||
Now, unless a line ends with '\', any trailing comment is stripped
|
||||
off (including any white-space preceding the '#'). Then if the line
|
||||
ends with '\', it is treated as a continuation line as normal.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
N E W F E A T U R E S I N 4 . 4 . 0
|
||||
|
Loading…
Reference in New Issue
Block a user