Skip to content
Snippets Groups Projects
Commit 31d202e2 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

ini_file: Align = signs in generated file.

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.
parent 3d9d48e3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment