Skip to content
  • Thomas Bellman's avatar
    31d202e2
    ini_file: Align = signs in generated file. · 31d202e2
    Thomas Bellman authored
    To make the file generated by cfgfile::ini_file prettier and easier
    to read, align the equal signs for settings within each section.  I.e,
    generate a file looking like
    
        [section-1]
        foo    = 10
        gazonk = 20
    
        [section-2]
        sarsaparilla = 4711
        smurf        = 90000
    
    We limit how far out we align the equal signs, though, as otherwise
    a single very long setting name would just make things more difficult
    to read.  Thus, we will generate e.g.
    
        [section]
        foo          = 1
        gazonk       = 2
        setting_name_that_is_way_too_long = 3
        zarzaparilla = 4
    
    The maximum alignment column is hardcoded to 24.
    31d202e2
    ini_file: Align = signs in generated file.
    Thomas Bellman authored
    To make the file generated by cfgfile::ini_file prettier and easier
    to read, align the equal signs for settings within each section.  I.e,
    generate a file looking like
    
        [section-1]
        foo    = 10
        gazonk = 20
    
        [section-2]
        sarsaparilla = 4711
        smurf        = 90000
    
    We limit how far out we align the equal signs, though, as otherwise
    a single very long setting name would just make things more difficult
    to read.  Thus, we will generate e.g.
    
        [section]
        foo          = 1
        gazonk       = 2
        setting_name_that_is_way_too_long = 3
        zarzaparilla = 4
    
    The maximum alignment column is hardcoded to 24.
Loading