Parsing stops at `\r\n` followed by comment
- Dominant language
- Gleam
- Stars
- 40
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I ran into this when lustre dev tool's gleam.toml options didn't work.
Minimal reproduction can be found [here](https://github.com/nnuuvv/tom_comments/blob/main/test/tom_comments_test.gleam).
The first test [`with_string_linebreaks_test`](https://github.com/nnuuvv/tom_comments/blob/faa9bb1aef7dbd9232ff83d205d36c12319a6677/test/tom_comments_test.gleam#L12) works as expected.
The second test [`without_string_linebreaks_test`](https://github.com/nnuuvv/tom_comments/blob/faa9bb1aef7dbd9232ff83d205d36c12319a6677/test/tom_comments_test.gleam#L35) fails.
The `toml` string here is how `simplifile.read` returns it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal reproduction in test/tom_comments_test.gleam, especially with_string_linebreaks_test and without_string_linebreaks_test, and run the failing test. Trace the TOML parser behavior for a \r\n sequence followed by a comment; done means the second test parses successfully like the first.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100