Эх сурвалжийг харах

HUE-7297 [doc] Document search highlighting should be case insensitive

Romain Rigaux 8 жил өмнө
parent
commit
5fe0a07

+ 1 - 1
desktop/libs/metadata/src/metadata/navigator_api.py

@@ -292,7 +292,7 @@ def _augment_highlighting(query_s, records):
 
 def _highlight(pattern, string):
   pattern = re.escape(pattern)
-  return re.sub('(%s)' % pattern, '<em>\\1</em>', string, count=1)
+  return re.sub('(%s)' % pattern, '<em>\\1</em>', string, count=1, flags=re.IGNORECASE)
 
 
 def _highlight_tags(record, term):