Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing with CRLF EOL's sometimes fail (on WSL2/Linux) #67

Open
eflukx opened this issue Oct 25, 2021 · 0 comments
Open

Parsing with CRLF EOL's sometimes fail (on WSL2/Linux) #67

eflukx opened this issue Oct 25, 2021 · 0 comments

Comments

@eflukx
Copy link

eflukx commented Oct 25, 2021

This problem occurs on Linux/WSL2 only, running the test on native Windows, all examples are parsed correctly. Seems related to issue #13: "Add support for CR and CRLF newlines".

With CRLF line ending this parses correctly:

[test]
key = "test"

This fails with CRLF-endings, but parses correctly with LF (unixy) line endings.

[[test]]
key = "test"
TOML.load_file('/home/eflukx/delme.toml')"
Traceback (most recent call last):
        5: from -e:1:in `<main>'
        4: from /home/eflukx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/toml-0.3.0/lib/toml.rb:23:in `load_file'
        3: from /home/eflukx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/toml-0.3.0/lib/toml.rb:23:in `new'
        2: from /home/eflukx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/toml-0.3.0/lib/toml/parser.rb:9:in `initialize'
        1: from /home/eflukx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/parslet-2.0.0/lib/parslet/atoms/base.rb:49:in `parse'
/home/eflukx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/parslet-2.0.0/lib/parslet/cause.rb:70:in `raise': Failed to match sequence (ALL_SPACE (COMMENT_LINE / TABLE / TABLE_ARRAY / KEY_VALUE){0, } ALL_SPACE) at line 1 char 1. (Parslet::ParseFailed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant