diff --git a/kallithea/lib/inifile.py b/kallithea/lib/inifile.py --- a/kallithea/lib/inifile.py +++ b/kallithea/lib/inifile.py @@ -61,7 +61,8 @@ def expand(template, desc, selected_mako [first-section] variable=VALUE - variable2 = value after tab + #variable2 = value after tab + variable2 = VAL2 ## This section had some whitespace and stuff @@ -117,7 +118,7 @@ def expand(template, desc, selected_mako if '$' not in value: line = '#%s = %s\n%s' % (key, value, line) return line.rstrip() - lines = re.sub(r'^([^#\n].*) = ?(.*)', process_line, lines, flags=re.MULTILINE) + lines = re.sub(r'^([^#\n\s]*)[ \t]*=[ \t]*(.*)$', process_line, lines, flags=re.MULTILINE) return sectionname + '\n' + lines ini_lines = re.sub(r'^(\[.*\])\n((?:(?:[^[\n].*)?\n)*)', process_section, ini_lines, flags=re.MULTILINE)