-
Notifications
You must be signed in to change notification settings - Fork 15
Description
An empty line is considered a comment line. But a line that contains nothing but spaces causes the "Unexpected end of line" error message to be printed. I think this is too harsh: while there is no reason to put spaces on an otherwise empty line, it can happen by accident and debugging a problem like that is really tricky for a developer.
Related to this, whitespace next to the "=" sign is skipped, but whitespace and the start and end of a line is not. Perhaps it might be better to skip whitespace except in the middle of a value or section name.
Note that the current code uses "*curr <= ' '" to check for whitespace in the key parsing loop, while after the "=" sign only space and tab are considered whitespace. It would be better to use a single definition of whitespace; maybe even make an inline function that checks for whitespace.