robertklep / quotefixformac

QuoteFix for Apple Mail —
https://github.com/robertklep/quotefixformac/releases/latest
191 stars 15 forks source link

sig separator false positive #32

Open jklundell opened 9 years ago

jklundell commented 9 years ago

The -- in this message is treated as a sig separator, and should not be:

Here’s a body.

Here’s a trial separator:-- 

Here’s the not-sig
robertklep commented 9 years ago

Hopefully fixed with v2.6.0-beta.4

jklundell commented 9 years ago

My test case above does not appear to be fixed. Is it for you?

robertklep commented 9 years ago

It appears to be fixed for me (using the default matcher): screen shot 2014-11-11 at 8 49 34

But it depends on the exact context in which the separator is found, so it may not be solved for all possible situations.

jklundell commented 9 years ago

I'll email you directly my case that isn't working for me, copy myself, and we can compare notes.

robertklep commented 9 years ago

@jklundell thanks.

I was actually mistaken, the example I posted also wasn't fixed. I was still using an older version of the plug-in when I was testing it.

You can use a custom RE to fix this:

(?i)^\s*--(?: |\s+|\xa0)?$

I'm not yet sure if I will make that the new default matcher, but I'll run with it for a while myself and if I feel it's working properly, I will replace the current default with that one.

jklundell commented 9 years ago

That worked. Thanks.

krono commented 7 years ago

Hi, I stumbled upon a similar problem.
I regularly get emails that start with:

Hi Tobias -- Bla bla bla

The default regex thus kills the whole reply.

I now use this custom regex:

(?i)^(?:>|\||\s+)*--(?: |\s+|\xa0)?$

which ensures that only quote separators at the beginning of a line or quoted, at the beginning of a line (disregarding spaces) are considered.

robertklep commented 7 years ago

Thanks for sharing, @krono :)