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--;
|
len--;
|
||||||
data[len] = 0;
|
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;
|
data[len - 1] = 0;
|
||||||
|
|
||||||
if (!url_tree)
|
if (!url_tree)
|
||||||
|
@ -84,9 +84,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* is delimiter */
|
/* is delimiter */
|
||||||
|
#if 0
|
||||||
|
/* () is used by Wikipedia */
|
||||||
#define is_del(c) \
|
#define is_del(c) \
|
||||||
(c == ' ' || c == '\n' || c == ')' || c == '(' || \
|
(c == ' ' || c == '\n' || c == ')' || c == '(' || \
|
||||||
c == '>' || c == '<' || c == ATTR_RESET || c == ATTR_BOLD || c == 0)
|
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
|
#ifdef SCROLL_HACK
|
||||||
/* force scrolling off */
|
/* force scrolling off */
|
||||||
|
Loading…
Reference in New Issue
Block a user