mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-10 11:25:08 -05:00
Fix Wikipedia URL detection - URLs inside parentheses won't work
This commit is contained in:
parent
59f32ccb3a
commit
8df11c030c
@ -106,7 +106,8 @@ url_add (char *urltext, int len)
|
||||
len--;
|
||||
data[len] = 0;
|
||||
}
|
||||
if (data[len - 1] == ')') /* chop trailing ) */
|
||||
/* chop trailing ) but only if there's no counterpart */
|
||||
if (data[len - 1] == ')' && strchr (data, '(') == NULL)
|
||||
data[len - 1] = 0;
|
||||
|
||||
if (!url_tree)
|
||||
|
@ -84,9 +84,15 @@
|
||||
#endif
|
||||
|
||||
/* is delimiter */
|
||||
#if 0
|
||||
/* () is used by Wikipedia */
|
||||
#define is_del(c) \
|
||||
(c == ' ' || c == '\n' || c == ')' || c == '(' || \
|
||||
c == '>' || c == '<' || c == ATTR_RESET || c == ATTR_BOLD || c == 0)
|
||||
#endif
|
||||
#define is_del(c) \
|
||||
(c == ' ' || c == '\n' || c == '>' || c == '<' || \
|
||||
c == ATTR_RESET || c == ATTR_BOLD || c == 0)
|
||||
|
||||
#ifdef SCROLL_HACK
|
||||
/* force scrolling off */
|
||||
|
Loading…
Reference in New Issue
Block a user