|
|
@ -86,9 +86,10 @@ def search_pdf(pdf_name, search_patterns, context_length):
|
|
|
|
|
|
|
|
|
|
|
|
for pattern in search_patterns:
|
|
|
|
for pattern in search_patterns:
|
|
|
|
if pattern == pattern.lower():
|
|
|
|
if pattern == pattern.lower():
|
|
|
|
# Find case-insensitive matches if pattern is all lowercase
|
|
|
|
# Ignore case if pattern is all lowercase
|
|
|
|
matches = re.finditer(pattern, page_text.lower())
|
|
|
|
matches = re.finditer(pattern, page_text.lower())
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
# Respect case if pattern is mixed or uppercase
|
|
|
|
matches = re.finditer(pattern, page_text)
|
|
|
|
matches = re.finditer(pattern, page_text)
|
|
|
|
|
|
|
|
|
|
|
|
for match in matches:
|
|
|
|
for match in matches:
|
|
|
|