mirror of
https://github.com/wahyd4/gitolite.git
synced 2026-08-09 04:55:55 +10:00
compile: allow "#" in *simple* strings
like: config notify.ircChannel = "#foo" (thanks, jhelwig)
This commit is contained in:
+2
-2
@@ -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/;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user