From ca0520a33c9042a68691d85c6849f88412ca8357 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 15 Mar 2021 01:51:43 +0530 Subject: email: Use only cfws-captured-words in obs-phrase. * email/email.scm (obs-phrase): Replace word with cfws-captured-word. * tests/email.scm ("Parse names with more than two words"): New test. --- email/email.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'email/email.scm') diff --git a/email/email.scm b/email/email.scm index 631d519..3f4e194 100644 --- a/email/email.scm +++ b/email/email.scm @@ -1,5 +1,5 @@ ;;; guile-email --- Guile email parser -;;; Copyright © 2018, 2019, 2020 Arun Isaac +;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac ;;; ;;; This file is part of guile-email. ;;; @@ -224,7 +224,7 @@ (define-word-pattern cfws-captured-word cfws-captured-atom) (define-peg-pattern obs-phrase body - (and cfws-captured-word (* (or "." cfws word)))) + (and cfws-captured-word (* (or cfws-captured-word "." cfws)))) ;; We set phrase to be the same as obs-phrase since, according to ;; their definitions in RFC5322, all phrases are obs-phrases. -- cgit v1.2.3