1
0
Fork 0

- trimmed square brackets from ip literal when parsing an IRI.

This commit is contained in:
cage 2021-04-16 14:15:41 +02:00
parent 1b3efc62f6
commit 32e1394422
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@
(defrule ip-literal (and "["
(+ (not (or "[" "]")))
"]")
(:text t))
(:function (lambda (a) (text (second a)))))
(defrule ipchar (or iunreserved-chars pct-encoded sub-delims ":" "@")
(:text t))

View File

@ -49,9 +49,9 @@
("http://a/b/c/d;p?q#f" .
("http" nil "a" nil "/b/c/d;p" "q" "f"))
("ldap://[2001:db8::7]/c=GB?objectClass?one" .
("ldap" nil "[2001:db8::7]" nil "/c=GB" "objectClass?one" nil))
("ldap" nil "2001:db8::7" nil "/c=GB" "objectClass?one" nil))
("http://[dead:beef::]:111/foo/" .
("http" nil "[dead:beef::]" "111" "/foo/" nil nil))
("http" nil "dead:beef::" "111" "/foo/" nil nil))
("//foo.bar:198/".
(nil nil "foo.bar" "198" "/" nil nil))
("//fo°o.bar:198/baz.gmi?a=b&b=c#a-fragment".