case sensitiyvy
This commit is contained in:
@@ -47,7 +47,7 @@ def highlight_text(text, rules, simple_words, regex_patterns, case_sensitive):
|
||||
# Apply simple highlights
|
||||
for i, word in enumerate(simple_words):
|
||||
color = simple_colors[i % len(simple_colors)]
|
||||
text = re.sub(rf"{re.escape(word)}", f"{colors[color]}{word}{colors['Z']}", text)
|
||||
text = re.sub(rf"{re.escape(word)}", f"{colors[color]}{word}{colors['Z']}", text, flags=flags)
|
||||
|
||||
# Apply regex highlights
|
||||
for pattern, replacement in rules:
|
||||
|
||||
Reference in New Issue
Block a user