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

not only Eng support #89

Closed
smir-ant opened this issue Jul 7, 2024 · 4 comments · Fixed by #90
Closed

not only Eng support #89

smir-ant opened this issue Jul 7, 2024 · 4 comments · Fixed by #90
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@smir-ant
Copy link

smir-ant commented Jul 7, 2024

i want use it with russian lang, \w is only eng, what about all symbols instead 0-9!@#... or [а-я][a-z]?

(not \w in parse)

@github-actions github-actions bot added the triage Need avaliation label Jul 7, 2024
@Renato66 Renato66 added enhancement New feature or request good first issue Good for newcomers and removed triage Need avaliation labels Jul 8, 2024
@Renato66
Copy link
Owner

Renato66 commented Jul 8, 2024

Hey @smir-ant, can you provide an simple use case so I can run some test around here?

when you say \w is on this function?

/<!-- AUTO-LABEL:START -->(?<label>(\s*\w.+|\n)*?)\s*<!-- AUTO-LABEL:END -->/,

@smir-ant
Copy link
Author

@Renato66 oh, sry
yeap, about case:

if the issue markdown has labelsSynonyms, then there is no problem. as long as we're not talking about Russian symbols.

for example, if "2/5" is specified in labelsSynonyms: ["плохо"], then the label was not set, however, if the trigger is "bad" instead "плохо", then the label is put down as it should be

if I'm not mistaken... of course, since I tried to use it a week ago and have completely forgotten :(

@PauloGoncalvesBH
Copy link

PauloGoncalvesBH commented Jul 15, 2024

@Renato66, doing this change will support the Russian symbols and anyone that uses Unicode characters:

- (?<label>(\s*\w.+|\n)*?)\s*
+ (?<label>(\s*\p{L}.+|\n)*?)\s*

\w

Matches any alphanumeric character (A-Z, a-z, 0-9) and the underscore (_).

\p{L}

It uses the Unicode property to match any letter from any alphabet. This includes all uppercase and lowercase letters from all alphabets recognized by Unicode (Latin, Cyrillic, Greek, Arabic, Hebrew, etc.).

Needs review and proper tests.

@Renato66
Copy link
Owner

Renato66 commented Jul 19, 2024

@smir-ant and @PauloGoncalvesBH, just refactored the code to implement the same logic but without the regex, now everything is ok at @v3.1.0 or @v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants