diff -r 37da646396b9 -r 1dd08fd3616b bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Tue Oct 15 07:57:45 2013 +0100 +++ b/bookloupe/bookloupe.c Tue Oct 15 09:16:04 2013 +0100 @@ -2933,7 +2933,24 @@ for (;!g_unichar_isdigit(g_utf8_get_char(*ptr)) && !g_unichar_isalpha(g_utf8_get_char(*ptr)) && **ptr;*ptr=g_utf8_next_char(*ptr)) - ; + { + /* Handle exceptions for footnote markers like [1] */ + if (g_utf8_get_char(*ptr)=='[') + { + g_string_append_c(word,'['); + s=g_utf8_next_char(*ptr); + for (;g_unichar_isdigit(g_utf8_get_char(s));s=g_utf8_next_char(s)) + g_string_append_unichar(word,g_utf8_get_char(s)); + if (g_utf8_get_char(s)==']') + { + g_string_append_c(word,']'); + *ptr=g_utf8_next_char(s); + return g_string_free(word,FALSE); + } + else + g_string_truncate(word,0); + } + } /* * Use a look-ahead to handle exceptions for numbers like 1,000 and 1.35. * Especially yucky is the case of L1,000