mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 12:15:50 +03:00
[PR #928] [MERGED] Add a function to check if target_word contains CJK characters #1024
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#1024
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/benbusby/whoogle-search/pull/928
Author: @ahmad-alkadri
Created: 1/8/2023
Status: ✅ Merged
Merged: 1/9/2023
Merged by: @benbusby
Base:
main← Head:fix/904-bold-cjk-characters📝 Commits (2)
b380115Add a function to check if target_word contains CJK charactersb82b5eePython function to check cjko characters modified📊 Changes
1 file changed (+28 additions, -1 deletions)
View changed files
📝
app/utils/results.py(+28 -1)📄 Description
This PR is linked to Issue #904 which shows that Whoogle results do not render bold all of target words if they are Chinese characters.
Further investigations show similar behavior for Japanese (hiragana, katakana, kanji), and Korean (hangul syllables, hangul jamo) characters: not all of the words displayed on the result page are bolded.
To handle this, a function was added to check if
target_wordinbold_search_terms.replace_any_casecontains Chinese, Korean, or Japanese characters and apply the regex that doesn't check for whitespace. This way, each search term would be bolded differently.Screenshots of the search results after the commits linked to this PR:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.