From df94340396a2dc1571283aa87eab33664585f78a Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 29 Feb 2020 22:04:06 +0100 Subject: [PATCH] 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! --- src/parsers/command-db-uri.lisp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/parsers/command-db-uri.lisp b/src/parsers/command-db-uri.lisp index 6c2b790..ae280ff 100644 --- a/src/parsers/command-db-uri.lisp +++ b/src/parsers/command-db-uri.lisp @@ -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)