diff -r d14a95cb0aab -r 8169aeaa2790 bookloupe/bookloupe.c --- a/bookloupe/bookloupe.c Wed Oct 16 20:54:58 2013 +0100 +++ b/bookloupe/bookloupe.c Wed Oct 16 20:57:31 2013 +0100 @@ -3334,7 +3334,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