Skip to content

fix(parser): allow trailing whitespace before closing parenthesis #190#191

Merged
djc merged 1 commit intodjc:mainfrom
rustmailer:main
Apr 20, 2026
Merged

fix(parser): allow trailing whitespace before closing parenthesis #190#191
djc merged 1 commit intodjc:mainfrom
rustmailer:main

Conversation

@rustmailer
Copy link
Copy Markdown

Some real-world IMAP servers include extra whitespace before the closing parenthesis. This change makes the parser more robust by allowing zero or more spaces.

…#190

Some real-world IMAP servers include extra whitespace before the closing parenthesis. This change makes the parser more robust by allowing zero or more spaces.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.35%. Comparing base (38d72da) to head (1ab7472).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   76.29%   76.35%   +0.06%     
==========================================
  Files          21       21              
  Lines        2826     2829       +3     
==========================================
+ Hits         2156     2160       +4     
+ Misses        670      669       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

delimited(
char('('),
separated_list1(char(' '), f),
// Targeted lenience: Some real-world IMAP servers
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you be more concrete about which server? If feasible, did you file an issue against it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imap.free.fr

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this comes from feedback from a user.

If feasible, did you file an issue against it?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this might be some (older?) version of Cyrus IMAP.

@djc djc merged commit b71fcba into djc:main Apr 20, 2026
11 checks passed
@djc
Copy link
Copy Markdown
Owner

djc commented Apr 20, 2026

If you want a release for this, can you submit a PR with a version bump?

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

Successfully merging this pull request may close these issues.

2 participants