Email trimming improvement (no trimming in code blocks)

Thanks for the reply! You correctly understood the problem I’m having, yes.

I thought about doing something like that as well, and I’m happy to have that implemented if it’s working and matches the behavior of the in-browser parser as closely as possible. For example, in the browser interface I’m allowed white space before my language declaration, and I’m allowed white space after my closing:

``` (many spaces here) c++
int x=42;
``` (many spaces here)

Still rightly renders as:

int x=42;

In the PR above I tried to follow the rules that I could identify in the parser.

The other two questions I’d ask about your implementation are whether this should really be done in preprocess!, so that the blocks also have to be passed around or held by the EmailReplyTrimmer class (and which would be preferred), and whether there might be a bug in there, because text that’s returned there is the same as the original text, without any substitutions done (seemingly gsub returns an enumerator of the matches, but you aren’t actually doing the replacement here?).

In any case, happy for you to use the test that was added in my pull request above if you’d prefer to add this to code to the parser yourself, or if you let me know about the above couple of issues I can create a new pull request. You absolutely got the problem right, and it looks like your solution is close, I’m just not sure quite how you’d like it finished off.

Thanks!