diff -r 783eff3047bc -r ad92d11d59b8 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Sat Oct 05 21:37:31 2013 +0100 +++ b/bookloupe/bookloupe.c Tue Oct 15 09:16:04 2013 +0100 @@ -2951,7 +2951,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