wamuseum/providence — pull request #95 by leftclickben (2014-08-11 16:34:25+00:00)
Title: GR355-9773: Non-delimited multipart ID generator

This adds support for:

+ Empty `separator` configuration values, which produces and correctly parses id values like "T1" where the "T" is (say) a constant and the 1 is (say) a series value. Parsing is done using a type-specific detection method, with the number of characters restricted by each element's `width` setting. There are some caveats, for example:
++ A "free" type element must be last, or it is unclear where the elements will be divided.
++ Two elements of the same type (e.g. numeric and numeric) cannot follow each other unless the first is fixed width.
++ The `width` setting values must not be incorrectly set too low, e.g. a "list" type element that has values of length 3 but a `width` setting of 1.
+ Empty list values for "list" type elements, which effectively makes the list element optional.
++ The list value in the config can (only) contain any number of whitespace characters and this will be treated as an empty string; specifically, although there is a space in the value saved to the database (even if the config contains an empty string), this is always trimmed for rendering and is not considered with respect to searching, so this is fine. This was necessary due to some deeper issue with empty strings in the configuration.
++ Note: the commit comment for c4dd549 only gives the example of " " as the list value, but "" can also be used in the config.

Also a bit of code cleanup. See commit comments for all details.