Improved signature identifier.
This commit is contained in:
parent
a13217e18b
commit
5346e2c400
2 changed files with 6 additions and 1 deletions
|
@ -352,7 +352,7 @@ class App.Utils
|
|||
# gmail
|
||||
# <div class="ecxgmail_quote">
|
||||
if !markers || !markers[0]
|
||||
regex = new RegExp( "(<blockquote class=\"ecxgmail_quote\">)" )
|
||||
regex = new RegExp( "(<blockquote class=\"(ecxgmail_quote|gmail_quote)\">)" )
|
||||
if message.match( regex )
|
||||
return message.replace( regex, "#{markerTemplate}\$1" )
|
||||
|
||||
|
|
|
@ -653,6 +653,11 @@ test( "identify signature", function() {
|
|||
result = App.Utils.signatureIdentify( message, true )
|
||||
equal( result, should )
|
||||
|
||||
message = "<div>test 123 <br/><br/>--no not match--<br/><br/>Bob Smith<br/><blockquote class=\"gmail_quote\">lalala</blockquote></div>"
|
||||
should = "<div>test 123 <br/><br/>--no not match--<br/><br/>Bob Smith<br/><span class=\"js-signatureMarker\"></span><blockquote class=\"gmail_quote\">lalala</blockquote></div>"
|
||||
result = App.Utils.signatureIdentify( message, true )
|
||||
equal( result, should )
|
||||
|
||||
message = "<div>test 123 <br/><br/>--no not match--<br/><br/>Bob Smith<br/>Am 24. Dezember 2015 um 07:45 schrieb kathrine <kathrine@example.com>:<br/>lalala</div>"
|
||||
should = "<div>test 123 <br/><br/>--no not match--<br/><br/>Bob Smith<br/><span class=\"js-signatureMarker\"></span>Am 24. Dezember 2015 um 07:45 schrieb kathrine <kathrine@example.com>:<br/>lalala</div>"
|
||||
result = App.Utils.signatureIdentify( message, true )
|
||||
|
|
Loading…
Reference in a new issue