Skip to content

Error on the last line produces parser error pointing to wrong line #1032

@thomasf

Description

@thomasf

I am using latest master ( 316bfc6 )

When trying to parse a broken toml where there is no newline on the last line the unstable.ParserError.Highlight becomes an empty list.

This file without a newline after the last c

a = '1'
b = '2'
c

Results in this error string:

1| a = '1'
 |  expected = after a key, but the document ends there
2| b = '2'
3| c

If I add a final newline to the input file the error is something you would expect

1| a = '1'
2| b = '2'
3| c

 |  ~ expected character =

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions