added support for parsing single lines. I did meddle a bit in the logic ...

...that checks for beginning and end of a line, so it does need a bit more testing