github / github/email_reply_parser

Signature regular expression

未關閉
#53 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Ruby
星號
708
分支
156
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

研究方向

從 issue 中顯示的簽名正規表示式開始,重現提供的電子郵件範例,以檢查該片段為何被分類為簽名。在決定如何處理 \w-$ 這個 alternative 後,確認比對行為,並驗證範例片段仍然可見。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ruby
領域
backend
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。