]> git.mikk.net Git - liburl/commitdiff
Allow URL hostnames with "-" characters...
authorchris mikkelson <chris@mikk.net>
Sat, 13 Mar 2010 19:38:22 +0000 (13:38 -0600)
committerchris mikkelson <chris@mikk.net>
Sat, 13 Mar 2010 19:38:22 +0000 (13:38 -0600)
text.c

diff --git a/text.c b/text.c
index fa3526747db71fd167120a2d17c83316bc6a7e5e..8ff7b0c578bf7b19decebbf7b48f8869b72b11b9 100644 (file)
--- a/text.c
+++ b/text.c
@@ -12,7 +12,7 @@
 
 /*static const char *text_url_pattern = "https?://[^\\s]+(?=\\s|$|\\))"; */
 static const char *text_url_pattern =
-       "https?://[a-z0-9.]+(:[0-9]+)?"
+       "https?://[a-z0-9.-]+(:[0-9]+)?"
        "(/[0-9a-z_=./+&%?-]*)?"
        "(?=\r?\n|[^0-9a-z_=./+&%?-])";
 static pcre *text_url_re;