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

FP S1135: surrounding accented characters should be considered #2960

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

Fixes #2957

@yassin-kammoun-sonarsource
Copy link
Contributor Author

For the record, the regular expression was found here https://stackoverflow.com/a/26900132.

@@ -24,6 +24,7 @@ import { TSESTree } from '@typescript-eslint/experimental-utils';

const todoMessage = 'Complete the task associated to this "TODO" comment.';
const todoPattern = 'todo';
const letterPattern = /[A-Za-zÀ-ÖØ-öø-ÿ]/;
Copy link
Contributor

Choose a reason for hiding this comment

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

I found this one /[\p{Letter}]/u. Seems more reliable and matches ā not matched by your regex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

@vilchik-elena
Copy link
Contributor

@yassin-kammoun-sonarsource could you add a code example to the fixed issue?

@sonarsource-next
Copy link

@vilchik-elena vilchik-elena merged commit 55324ff into master Feb 15, 2022
@vilchik-elena vilchik-elena deleted the issue-2957 branch February 15, 2022 08:58
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.

FP S1135: surrounding accented characters should be considered
2 participants