compile: allow "#" in *simple* strings
like: config notify.ircChannel = "#foo" (thanks, jhelwig)
This commit is contained in:
parent
e68d76f127
commit
c8d4aef460
|
@ -162,13 +162,13 @@ sub parse_conf_file
|
||||||
my @repos;
|
my @repos;
|
||||||
while (<$conf_fh>)
|
while (<$conf_fh>)
|
||||||
{
|
{
|
||||||
|
# kill comments, but take care of "#" inside *simple* strings
|
||||||
|
s/^((".*?"|[^#"])*)#.*/$1/;
|
||||||
# normalise whitespace; keeps later regexes very simple
|
# normalise whitespace; keeps later regexes very simple
|
||||||
s/=/ = /;
|
s/=/ = /;
|
||||||
s/\s+/ /g;
|
s/\s+/ /g;
|
||||||
s/^ //;
|
s/^ //;
|
||||||
s/ $//;
|
s/ $//;
|
||||||
# kill comments
|
|
||||||
s/\s*#.*//;
|
|
||||||
# and blank lines
|
# and blank lines
|
||||||
next unless /\S/;
|
next unless /\S/;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue