Skip to content

Multiline quote regex #43

@phongvis

Description

@phongvis

Currently, there is no constraint between On and wrote: _MULTI_QUOTE_HDR_REGEX = r'(?!On.*On\s.+?wrote:)(On\s(.+?)wrote:)'.

So, even if there is a million characters between On ... blah blah blah ... wrote: it still detects as a multiline quote.

I think the gap between On and wrote: needs to be controlled.

I discovered this bug when the library took 1 minute to parse a long email with multiple On and wrote.

I'm creating a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions