Remove the logic that assumes "Rupert> " is a citation, since it misfires
* e-html-utils.c (is_citation): Remove the logic that assumes "Rupert> " is a citation, since it misfires more often than it hits. svn path=/trunk/; revision=17696
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2002-08-01 Dan Winship <danw@ximian.com>
|
||||||
|
|
||||||
|
* e-html-utils.c (is_citation): Remove the logic that assumes
|
||||||
|
"Rupert> " is a citation, since it misfires more often than it
|
||||||
|
hits.
|
||||||
|
|
||||||
2002-07-31 Dan Winship <danw@ximian.com>
|
2002-07-31 Dan Winship <danw@ximian.com>
|
||||||
|
|
||||||
* e-html-utils.c (is_addr_char, is_trailing_garbage): Don't use
|
* e-html-utils.c (is_addr_char, is_trailing_garbage): Don't use
|
||||||
|
@ -118,41 +118,29 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha
|
|||||||
static gboolean
|
static gboolean
|
||||||
is_citation (const unsigned char *c, gboolean saw_citation)
|
is_citation (const unsigned char *c, gboolean saw_citation)
|
||||||
{
|
{
|
||||||
gunichar u;
|
const unsigned char *p;
|
||||||
gint i;
|
|
||||||
|
if (*c != '>')
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* A line that starts with a ">" is a citation, unless it's
|
/* A line that starts with a ">" is a citation, unless it's
|
||||||
* just mbox From-mangling...
|
* just mbox From-mangling...
|
||||||
*/
|
*/
|
||||||
if (*c == '>') {
|
if (strncmp (c, ">From ", 6) != 0)
|
||||||
const unsigned char *p;
|
return TRUE;
|
||||||
|
|
||||||
if (strncmp (c, ">From ", 6) != 0)
|
/* If the previous line was a citation, then say this
|
||||||
return TRUE;
|
* one is too.
|
||||||
|
*/
|
||||||
|
if (saw_citation)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* If the previous line was a citation, then say this
|
/* Same if the next line is */
|
||||||
* one is too.
|
p = (const unsigned char *)strchr ((const char *)c, '\n');
|
||||||
*/
|
if (p && *++p == '>')
|
||||||
if (saw_citation)
|
return TRUE;
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
/* Same if the next line is */
|
/* Otherwise, it was just an isolated ">From" line. */
|
||||||
p = (const unsigned char *)strchr ((const char *)c, '\n');
|
|
||||||
if (p && *++p == '>')
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
/* Otherwise, it was just an isolated ">From" line. */
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for "Rupert> " and the like... */
|
|
||||||
for (i = 0; c && *c && g_unichar_validate (g_utf8_get_char (c)) && *c != '\n' && i < 10; i ++, c = g_utf8_next_char (c)) {
|
|
||||||
u = g_utf8_get_char (c);
|
|
||||||
if (u == '>')
|
|
||||||
return TRUE;
|
|
||||||
if (!g_unichar_isalnum (u))
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user