This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| def remove_signature(text: str) -> tuple[str, str]: | |
| """ | |
| Splits email content into body text and signature, supporting multiple European languages. | |
| Detects common signature delimiters, closing salutations, and Markdown-specific patterns. | |
| Intentional Behaviors: | |
| - Preserves reply headers (e.g., "On ... wrote:") within the body text when no explicit signature is found. |