Apparently Discourse is using the same library as Github uses for processing comments:
https://github.com/github/email_reply_parser
However, i’d suggest either its not properly implemented on Discourse or Github are using a different code base. Discourse does not appear to process inline replies with any degree of success.