lib: clarify account name parsing rules

This commit is contained in:
Simon Michael 2018-07-26 08:30:32 +01:00
parent 41c985b5fb
commit e2f5e98926

View File

@ -474,10 +474,14 @@ modifiedaccountnamep = do
a a
-- | Parse an account name, plus one following space if present. -- | Parse an account name, plus one following space if present.
-- Account names start with a non-space, may have single spaces inside them, -- Account names have one or more parts separated by the account separator character,
-- and are terminated by two or more spaces (or end of input). -- and are terminated by two or more spaces (or end of input).
-- (Also they have one or more components of at least one character, -- Each part is at least one character long, may have single spaces inside it,
-- separated by the account separator character, but we don't check that here.) -- and starts with a non-whitespace.
-- Note, this means "{account}", "%^!" and ";comment" are all accepted
-- (parent parsers usually prevent/consume the last).
-- It should have required parts to start with an alphanumeric;
-- for now it remains as-is for backwards compatibility.
accountnamep :: TextParser m AccountName accountnamep :: TextParser m AccountName
accountnamep = singlespacedtextp accountnamep = singlespacedtextp