Changeset - 3c53e19719cd
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 6 years ago 2020-04-23 11:02:07
mads@kiilerich.com
Grafted from: f753bcc21c0d
inifile: strip trailing spaces consistently
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/inifile.py
Show inline comments
 
@@ -94,13 +94,13 @@ def expand(template, mako_variable_value
 
    <BLANKLINE>
 
    variable=VALUE
 
    #variable2  =    value after tab
 
    variable2 = VAL2
 
    <BLANKLINE>
 
    first_extra = EXTRA
 
    spacey =  
 
    spacey =
 
    <BLANKLINE>
 
    <BLANKLINE>
 
    # FUNCTION RESULT
 
    [second-section]
 
    # option a was chosen
 
    <BLANKLINE>
 
@@ -188,13 +188,13 @@ def expand(template, mako_variable_value
 

	
 
            # 3rd pass:
 
            # settings that haven't been consumed yet at is appended to section
 
            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'''^
 
        (\[.*\])\n
 
        # after the section name, a number of chunks with:
 
        (
0 comments (0 inline, 0 general)