commit 0a3de1887bd13c31df5efeb80d6e8e4095179e1d
parent a04afeb855e3ebac18ce294a662b5af53aa9b494
Author: Sam Tobin-Hochstadt <samth@racket-lang.org>
Date: Fri, 11 Jun 2010 16:53:13 -0400
Include "-" in last name regexp.
original commit: 1a80b6b04489a684a4a396588b306ccdede5f9b5
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/collects/scriblib/autobib.rkt b/collects/scriblib/autobib.rkt
@@ -189,7 +189,7 @@
(if (author-element? a)
a
(let* ([s (content->string a)]
- [m (regexp-match #px"^(.*) (\\p{L}+)$" s)])
+ [m (regexp-match #px"^(.*) (([\\-]|\\p{L})+)$" s)])
(make-author-element
#f
(list a)
diff --git a/collects/scriblib/scribblings/autobib.scrbl b/collects/scriblib/scribblings/autobib.scrbl
@@ -70,9 +70,9 @@ standard format.
An element produced by a function like @scheme[author-name] tracks
first, last names, and name suffixes separately, so that names can be
ordered and rendered correctly. When a string is provided as an author
-name, the last non-empty sequence of ASCII alphabetic characters after
-a space is treated as the author name, and the rest is treated as the
-first name.}
+name, the last non-empty sequence of alphabetic characters or
+@litchar["-"] after a space is treated as the author name, and the
+rest is treated as the first name.}
@defproc[(in-bib [orig bib?] [where string?]) bib?]{