# HG changeset patch # User Mads Kiilerich # Date 2020-04-23 11:02:07 # Node ID 3c53e19719cd4072595d270d0e82ff80e5d25ed4 # Parent 201135e6548b552a1dd45dcec909f8ecb6400e56 inifile: strip trailing spaces consistently diff --git a/kallithea/lib/inifile.py b/kallithea/lib/inifile.py --- a/kallithea/lib/inifile.py +++ b/kallithea/lib/inifile.py @@ -97,7 +97,7 @@ def expand(template, mako_variable_value variable2 = VAL2 first_extra = EXTRA - spacey = + spacey = # FUNCTION RESULT @@ -191,7 +191,7 @@ def expand(template, mako_variable_value if section_settings: lines += '\n' + ''.join('%s = %s\n' % (key, value) for key, value in sorted(section_settings.items())) - return sectionname + '\n' + lines + return sectionname + '\n' + re.sub('[ \t]+\n', '\n', lines) # process sections until comments before next section or end ini_lines = re.sub(r'''^