Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
texta
texta-mlp-python
Commits
948eb7be
Commit
948eb7be
authored
Mar 17, 2021
by
Linda Freienthal
Browse files
ContactEmailParset mailto: eliminated
parent
59b66e76
Pipeline
#5047
passed with stage
in 15 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
texta_mlp/parsers.py
View file @
948eb7be
...
...
@@ -141,7 +141,7 @@ class ContactEmailParser(AbstractParser):
"""
pattern
=
re
.
compile
(
r
'([^\s]+\s?\.\s?)?[^\s@]+\s?@\s?[^@.\s]+\s?[.]\s?[^\s]{1,20}'
)
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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment