Avoid parser look-ahead when not necessary.

Fixes #1082 where letters from the URI are doubled because of the
look-ahead in the previous parser's implementation.

Thanks @svantevonerichsen6906 for the fix!
This commit is contained in:
Dimitri Fontaine 2020-02-29 22:04:06 +01:00
parent 3b5c29b030
commit df94340396

View File

@ -89,9 +89,8 @@
(defrule network-label-with-hyphen
(and network-label-letters-digit
(+ (or (and #\- (& network-label-letters-digit))
network-label-letters-digit))
(! #\-))
(+ (or (and #\- network-label-letters-digit)
network-label-letters-digit)))
(:text t))
(defrule network-label-no-hyphen (+ network-label-letters-digit)