github / github/email_reply_parser
Signature regular expression
- Ngôn ngữ chính
- Ruby
- Star
- 708
- Fork
- 156
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I ran into some random situations where emails were not parsed correctly. Part of the email was chopped out, for example:
`Hi Test,\n\n-This is a test`
Will result in `-This is a test` fragment being hidden and considered as part of signature which it should not be. After digging more into the problem, we figured out that:
`(?m)(--\s*$|__\s*$|\w-$)|(^(\w+\s*){1,3} ym morf tneS$)`
The first matching group is testing against `\w-`, which is causing the problem. I can't think out of a better way to solve the problem other than take `\w-$` part out so it opens to any suggestion.
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with the signature regular expression shown in the issue and reproduce the provided email example to inspect why the fragment is classified as a signature. Confirm the matching behavior after deciding how the \w-$ alternative should be handled, and verify that the sample fragment remains visible.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ruby
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100