Skip to content

config: make it possible to have multiline list separated by comma

The motivation is that we now have a large number of channels. Putting everything in one line is really hard to read, so we want to split that list into multiple lines.

ConfigParser already can parse multiline .ini files. However, the parsed string will then contain a newline character, which breaks our list parser because it splits the list with ", " instead of just ",".

The thing is, we can't simply split the list with just "," because there exists values in the list which do contain "," (e.g. when you specify file list, you need something like "device,yggdrasil"). So, instead of simple string split, use regular expression to match a comma follow by one or more whitespaces (which include space, newline, tab etc.).

Merge request reports