Skip to content

Cannot start line with ‘On’ in reply #23

Closed

Description

@sorbits

A bottom-quoted email that has a line in the reply start with “On” will discard that line and everything below it.

The code responsible can be found on line #87-90 of email_reply_parser.rb:

if text =~ /^(On\s(.+)wrote:)$/nm
  # Remove all new lines from the reply header.
  text.gsub! $1, $1.gsub("\n", " ")
end

An example email that shows the issue follows:

On your remote host you can run:

     telnet 127.0.0.1 52698

This should connect to TextMate (on your Mac, via the tunnel). If that 
fails, the tunnel is not working.

On 9 Jan 2014, at 2:47, George Plymale wrote:

> I am having an odd issue wherein suddenly port forwarding stopped 
> working in a particular scenario for me.  By default I have ssh set to 
> use the following config (my ~/.ssh/config file):
> […]
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/textmate/rmate/issues/29

Activity

  1. danielchatfield commented on Aug 13, 2014

    @danielchatfield
    Contributor

    As far as I can see the code you have quoted won't do that - using http://rubular.com I can't get it to match that entire paragraph.

  2. sorbits commented on Aug 13, 2014

    @sorbits
    Author

    You probably forgot to add the options.

    Here is the regexp and example text from my issue:
    http://rubular.com/r/6VimI2jkFX

    On 13 Aug 2014, at 16:37, Daniel Chatfield wrote:

    As far as I can see the code you have quoted won't do that - using
    http://rubular.com I can't get it to match that entire paragraph.


    Reply to this email directly or view it on GitHub:
    #23 (comment)

  3. danielchatfield commented on Aug 13, 2014

    @danielchatfield
    Contributor

    👍

  4. danielchatfield commented on Aug 13, 2014

    @danielchatfield
    Contributor

    Could this be fixed by first trying to match a single line and then only if that doesn't match look for a multiline header. Seems like it should work.

  5. danielchatfield commented on Aug 13, 2014

    @danielchatfield
    Contributor

    Pull request opened

  6. added a commit that references this issue on Aug 25, 2014
  7. technoweenie commented on Aug 25, 2014

    @technoweenie
    Contributor

    Should be fixed in v0.5.8. If not, please give us another test case.

  8. sorbits commented on Aug 26, 2014

    @sorbits
    Author

    Thanks!

    Maybe worth adding the test case from the first PR:
    danielchatfield@c7678f0#commitcomment-7374421

    On 26 Aug 2014, at 1:53, risk danger olson wrote:

    Should be fixed in
    v0.5.8.
    If not, please give us another test case.


    Reply to this email directly or view it on GitHub:
    #23 (comment)

  9. sorbits commented on Dec 11, 2014

    @sorbits
    Author

    Is GitHub using this version? Cause I am still occasionally seeing issues, most latest one is here textmate/markdown.tmbundle#25 (comment)

    But as far as I can tell, this version should not have a problem with the linked email reply.

  10. danielchatfield commented on Dec 11, 2014

    @danielchatfield
    Contributor

    @sorbits Doesn't look like they have updated.

  11. gsdean commented on Feb 11, 2015

    @gsdean

    FWIW zapier ported this, and just fixed the same issue
    zapier/email-reply-parser#12

  12. mattyoho commented on Jan 29, 2019

    @mattyoho
    Contributor

    This issue has been fixed, I believe, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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