Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Make Email detection in lexer more strict #573

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Conversation

linawolf
Copy link
Contributor

@linawolf linawolf commented Sep 3, 2023

So it does not catch email like expressions in backticks

So it does not catch email like expressions in backticks
linawolf added a commit that referenced this pull request Sep 3, 2023
@@ -56,7 +56,7 @@ protected function getCatchablePatterns(): array
return [
'\\\\``', // must be a separate case, as the next pattern would split in "\`" + "`", causing it to become a intepreted text
'\\\\[\s\S]', // Escaping hell... needs escaped slash in regex, but also in php.
'\\S+@\\S+\\.\\S+',
'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good enough for now... but it feels like this should be done in a different way... as emailaddreses are not easy to catch in a regex.

@jaapio jaapio merged commit d6b6035 into main Sep 4, 2023
24 checks passed
@jaapio jaapio deleted the task/code-in-list branch September 4, 2023 20:31
jaapio pushed a commit that referenced this pull request Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants