Commit 948eb7be authored by Linda Freienthal's avatar Linda Freienthal
Browse files

ContactEmailParset mailto: eliminated

parent 59b66e76
Pipeline #5047 passed with stage
in 15 minutes and 5 seconds
...@@ -141,7 +141,7 @@ class ContactEmailParser(AbstractParser): ...@@ -141,7 +141,7 @@ class ContactEmailParser(AbstractParser):
""" """
pattern = re.compile(r'([^\s]+\s?\.\s?)?[^\s@]+\s?@\s?[^@.\s]+\s?[.]\s?[^\s]{1,20}') pattern = re.compile(r'([^\s]+\s?\.\s?)?[^\s@]+\s?@\s?[^@.\s]+\s?[.]\s?[^\s]{1,20}')
for email in pattern.finditer(self.text): for email in pattern.finditer(self.text):
yield ParseResult(value=email.group(0).replace(' ', ''), span=email.span()) yield ParseResult(value=email.group(0).replace('mailto:', '').replace(' ', ''), span=email.span())
class ContactEmailNamePairParser(AbstractParser): class ContactEmailNamePairParser(AbstractParser):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment