fix(references): keep non-Latin reference labels#566
Open
lfazliev wants to merge 1 commit into
Open
Conversation
clean_label rejected any label without [A-Za-z0-9], so people whose names render entirely in Cyrillic (or another non-Latin script) were silently dropped from search-result references. Require a Unicode letter or digit instead; pure punctuation is still rejected. (cherry picked from commit f2d7d073cb5342d33eb315f2f5acda2b24d655e3)
31af3bd to
2d6fa7f
Compare
Contributor
Greptile SummaryThis PR keeps non-Latin reference labels during link metadata cleanup. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(references): keep non-Latin referenc..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
clean_labelrejected any reference label without an ASCII alphanumericcharacter (
[A-Za-z0-9]), so Cyrillic and other non-Latin profile names —common in RU/BY and other locales' people-search results — were silently
dropped. Relax the guard to the Unicode word-character check
[^\W_]: a labelis kept when it has at least one letter or digit in any script, while pure
punctuation/symbol labels are still rejected.
Tests
test_keeps_cyrillic_only_names— a Cyrillic-only name survives cleaning.test_rejects_punctuation_only_labels_across_scripts— punctuation-onlylabels are still dropped.
Synthetic prompt