mirror of
https://github.com/rendercv/rendercv.git
synced 2026-04-19 14:34:18 -04:00
Fix make_given_keywords_bold_in_sections
This commit is contained in:
@@ -31,14 +31,19 @@ def make_given_keywords_bold_in_sections(
|
||||
if sections_input is None:
|
||||
return None
|
||||
|
||||
for entries in sections_input.values():
|
||||
for section_title, entries in sections_input.items():
|
||||
new_entries = []
|
||||
for entry in entries:
|
||||
if isinstance(entry, str):
|
||||
entry_types.make_keywords_bold_in_a_string(entry, keywords)
|
||||
new_entry = entry_types.make_keywords_bold_in_a_string(entry, keywords)
|
||||
elif callable(getattr(entry, "make_keywords_bold", None)):
|
||||
entry = entry.make_keywords_bold( # NOQA: PLW2901 # type: ignore
|
||||
keywords
|
||||
)
|
||||
new_entry = entry.make_keywords_bold(keywords) # type: ignore
|
||||
else:
|
||||
new_entry = entry
|
||||
|
||||
new_entries.append(new_entry)
|
||||
|
||||
sections_input[section_title] = new_entries
|
||||
|
||||
return sections_input
|
||||
|
||||
|
||||
Reference in New Issue
Block a user