aboutsummaryrefslogtreecommitdiff
path: root/src/textview.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-10 09:36:11 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-10 09:36:11 +0000
commitf37506557aedd7c9e0141eb8299214db6c63a046 (patch)
tree164a94b28347f78ae722ac884c611654d5277284 /src/textview.c
parent4d8cd49f297aa2a9facf5b20f253eb5058533fad (diff)
Include some trailing punctuations as URI.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@882 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/textview.c')
-rw-r--r--src/textview.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/textview.c b/src/textview.c
index 5645808e..db604e8a 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -834,7 +834,7 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos,
/* find end point of URI */
for (ep_ = scanpos; *ep_ != '\0'; ep_++) {
- if (!isgraph(*(const guchar *)ep_) ||
+ if (!g_ascii_isgraph(*ep_) ||
!isascii(*(const guchar *)ep_) ||
strchr("()<>{}[]\"", *ep_))
break;
@@ -846,11 +846,9 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos,
* should pass some URI type to this function and decide on that whether
* to perform punctuation stripping */
-#define IS_REAL_PUNCT(ch) (ispunct(ch) && ((ch) != '/'))
+#define IS_REAL_PUNCT(ch) (g_ascii_ispunct(ch) && !strchr("/?=", ch))
- for (; ep_ - 1 > scanpos + 1 &&
- IS_REAL_PUNCT(*(const guchar *)(ep_ - 1));
- ep_--)
+ for (; ep_ - 1 > scanpos + 1 && IS_REAL_PUNCT(*(ep_ - 1)); ep_--)
;
#undef IS_REAL_PUNCT