compile: allow "#" in *simple* strings

like: config notify.ircChannel = "#foo"

(thanks, jhelwig)
This commit is contained in:
Sitaram Chamarty 2010-01-23 14:57:22 +05:30
parent e68d76f127
commit c8d4aef460

View file

@ -162,13 +162,13 @@ sub parse_conf_file
my @repos;
while (<$conf_fh>)
{
# kill comments, but take care of "#" inside *simple* strings
s/^((".*?"|[^#"])*)#.*/$1/;
# normalise whitespace; keeps later regexes very simple
s/=/ = /;
s/\s+/ /g;
s/^ //;
s/ $//;
# kill comments
s/\s*#.*//;
# and blank lines
next unless /\S/;