From c8d4aef460e84bfd90e12a9c3f741065f030d2ca Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sat, 23 Jan 2010 14:57:22 +0530 Subject: [PATCH] compile: allow "#" in *simple* strings like: config notify.ircChannel = "#foo" (thanks, jhelwig) --- src/gl-compile-conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl-compile-conf b/src/gl-compile-conf index 141f7d7..e88819a 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -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/;