-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
TextToFlowed doesn't generate valid flowed text #580
Comments
I think it might be this line: https://github.com/jstedfast/MimeKit/blob/master/MimeKit/Text/TextToFlowed.cs#L133 As it doesn't increment the index, the trailing space after splitting the line is processed again on subsequent calls to I believe the correct thing to do here is to increment index until a non-space character is encountered. |
Do you happen to have a test case that I can use to see the issue and verify that it's fixed once it's fixed? |
FWIW, so that we are all on the same page with regards to expected behavior, the specification for format=flowed is: https://tools.ietf.org/html/rfc3676 I just added a test case (it's split between 2 commits because I can't get VS2019 to run the unit tests for some reason so had to commit a partial test in order to complete it on my MacBook w/ VS4Mac which runs them fine). b4a92eb adds the expected output which I added a comment to which exposes at least 1 bug but I don't think that's the bug that you are hitting. Secondly, keep in mind that according to my docs for Maybe I saw your fork & fix and I'm not sure that your fix is correct because because if you set |
I'm not sure if my fix solves your issue, but if I understand the issue you described correctly, then it does. It also fixes other bugs that I found. |
Describe the bug
Using
TextToFlowed
to generateformat=flowed
output, it doesn't appear to generate valid output. Lines appear to be space-stuffed at the beginning.Platform (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text should be correctly flowed with long lines broken up with proper line continuations.
The text was updated successfully, but these errors were encountered: