Also allow URLs of of the form \.[a-z]+\/
This commit is contained in:
parent
270a31535c
commit
f4c2c08ccb
|
@ -396,19 +396,30 @@ re_url (void)
|
||||||
scheme = g_strjoinv ("|", prefix);
|
scheme = g_strjoinv ("|", prefix);
|
||||||
grist = g_strdup_printf (
|
grist = g_strdup_printf (
|
||||||
"(" /* URL or HOST */
|
"(" /* URL or HOST */
|
||||||
SCHEME HOST OPT_PORT
|
"("
|
||||||
"(" /* Optional "/path?query_string#fragment_id" */
|
SCHEME HOST OPT_PORT
|
||||||
"/" /* Must start with slash */
|
"(" /* Optional "/path?query_string#fragment_id" */
|
||||||
"("
|
"/" /* Must start with slash */
|
||||||
"(" LPAR NOPARENS RPAR ")"
|
"("
|
||||||
"|"
|
"(" LPAR NOPARENS RPAR ")"
|
||||||
"(" NOPARENS ")"
|
"|"
|
||||||
")*" /* Zero or more occurrences of either of these */
|
"(" NOPARENS ")"
|
||||||
"(?<![.,?!\\]])" /* Not allowed to end with these */
|
")*" /* Zero or more occurrences of either of these */
|
||||||
")?" /* Zero or one of this /path?query_string#fragment_id thing */
|
"(?<![.,?!\\]])" /* Not allowed to end with these */
|
||||||
|
")?" /* Zero or one of this /path?query_string#fragment_id thing */
|
||||||
|
")|("
|
||||||
|
HOST OPT_PORT "/"
|
||||||
|
"(" /* Optional "path?query_string#fragment_id" */
|
||||||
|
"("
|
||||||
|
"(" LPAR NOPARENS RPAR ")"
|
||||||
|
"|"
|
||||||
|
"(" NOPARENS ")"
|
||||||
|
")*" /* Zero or more occurrences of either of these */
|
||||||
|
"(?<![.,?!\\]])" /* Not allowed to end with these */
|
||||||
|
")?" /* Zero or one of this /path?query_string#fragment_id thing */
|
||||||
|
")"
|
||||||
")"
|
")"
|
||||||
, scheme
|
, scheme
|
||||||
);
|
);
|
||||||
url_ret = make_re (grist, "re_url");
|
url_ret = make_re (grist, "re_url");
|
||||||
g_free (scheme);
|
g_free (scheme);
|
||||||
|
|
Loading…
Reference in New Issue