summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/input.c b/input.c
index 95a7709..4c3b10d 100644
--- a/input.c
+++ b/input.c
@@ -999,8 +999,16 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx) {
}
if (sitem->type & stack_idx) {
indexword->text = ustrdup(indexstr.text);
- if (index_downcase)
+ if (index_downcase) {
+ word *w;
+
ustrlow(indexword->text);
+ ustrlow(indexstr.text);
+
+ for (w = idxwordlist; w; w = w->next)
+ if (w->text)
+ ustrlow(w->text);
+ }
indexing = FALSE;
rdadd(&indexstr, L'\0');
index_merge(idx, FALSE, indexstr.text, idxwordlist);