diff --git a/quotefix/attribution.py b/quotefix/attribution.py index f30dec6..6512819 100644 --- a/quotefix/attribution.py +++ b/quotefix/attribution.py @@ -5,7 +5,7 @@ from quotefix.pyratemp import Template from quotefix.messagetypes import * from quotefix.attributionclasses import * -import re +import re, platform # Mavericks try: @@ -173,13 +173,10 @@ def customize_attribution(cls, original, editor, dom, reply, inreplyto, template html = root.innerHTML() # Fix Yosemite attributions - import platform osversion = platform.mac_ver()[0] if osversion.startswith('10.10'): # move
one level down - html = re.sub(r'(?i)()(.*?)()', r'\2\1', html, count = 1) - # remove trailing whitespace after
- html = re.sub(r'(?i)()()+', r'\1', html, count = 1) + html = re.sub(r'(?i)()(.*?)()+', r'\2\1', html, count = 1) # Special case: Mail doesn't include an attribution for Send Again messages, # so we'll just add a customized attribution right after the element.