Skip to content

Feature request: multiline options #30

@f1r35pirit

Description

@f1r35pirit

Many programs use this library to parse conf files. One of the examples is ad_access_filter and other options in sssd.conf. The values for such options may grow very long as in this example:

SSSD/sssd#6711

It would be extremely helpful in terms of human readability of conf files if the library supported some method of splitting such long values into multiple lines in the conf file.

Example:

Current:

some_option = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sed sollicitudin odio. Nullam venenatis purus in dui dictum, ac  volutpat eros vulputate. Pellentesque rhoncus vel eros et laoreet. Maecenas feugiat eget metus vel hendrerit. Aliquam hendrerit pharetra est. Cras vel aliquet mi, nec commodo eros. Integer molestie finibus orci, et interdum sem tincidunt ac. 

Proposed:

some_option = Lorem ipsum dolor sit amet, \
              consectetur adipiscing elit. \
              Ut sed sollicitudin odio. \
              Nullam venenatis purus in dui dictum, \
              ac  volutpat eros vulputate. \
              Pellentesque rhoncus vel eros et laoreet. \
              Maecenas feugiat eget metus vel hendrerit. \
              Aliquam hendrerit pharetra est. \
              Cras vel aliquet mi, \
              nec commodo eros. \
              Integer molestie finibus orci, \
              et interdum sem tincidunt ac. \
              And this is the example of \\\
              character included at the end of the line.

Note that the leading spaces are supposed to be ignored in order to allow for pretty formatting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions