projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.08k stars 97 forks source link

Unable to parse multiline messages with a selector in CRLF formatted fluent file on Windows #191

Closed kellpossible closed 4 years ago

kellpossible commented 4 years ago

I'm currently working on producing a minimal example that reproduces this issue, hopefully ready by today. It's a very strange issue! Just saving to LF fixes the problem. It's certainly possible that it's something wrong I'm doing on my end, perhaps while reading the file, if so, I'll close the issue.

kellpossible commented 4 years ago

Here is the reproduction: https://github.com/kellpossible/fluent-multiline-bug As it happens the same issue occurs on Linux when saving the file as CRLF, so I think it's generally just an issue with it being CRLF.

zbraniecki commented 4 years ago

Hi! I tried to reproduce it against current master branch and couldn't! Can you verify that this is fixed?

kellpossible commented 4 years ago

@zbraniecki awesome thanks a lot! The problem appears to be fixed on master :slightly_smiling_face: https://github.com/kellpossible/fluent-multiline-bug/tree/fixed-on-master Some small breaking changes with the ast, but I guess that's to be expected when playing with internals. Looking forward to the next release.

zbraniecki commented 4 years ago

great!

zbraniecki commented 4 years ago

I'll close it as resolved in 0.13

kellpossible commented 3 years ago

Just a heads up someone reported a very similar issue https://github.com/kellpossible/cargo-i18n/issues/57 I'll try to make a minimal reproduction again.

kellpossible commented 3 years ago

I've reported this as a new issue https://github.com/projectfluent/fluent-rs/issues/213