Include "-" in last name regexp.

This commit is contained in:
Sam Tobin-Hochstadt 2010-06-11 16:53:13 -04:00
parent c945927776
commit 1a80b6b044
2 changed files with 4 additions and 4 deletions

View File

@ -189,7 +189,7 @@
(if (author-element? a) (if (author-element? a)
a a
(let* ([s (content->string a)] (let* ([s (content->string a)]
[m (regexp-match #px"^(.*) (\\p{L}+)$" s)]) [m (regexp-match #px"^(.*) (([\\-]|\\p{L})+)$" s)])
(make-author-element (make-author-element
#f #f
(list a) (list a)

View File

@ -70,9 +70,9 @@ standard format.
An element produced by a function like @scheme[author-name] tracks An element produced by a function like @scheme[author-name] tracks
first, last names, and name suffixes separately, so that names can be first, last names, and name suffixes separately, so that names can be
ordered and rendered correctly. When a string is provided as an author ordered and rendered correctly. When a string is provided as an author
name, the last non-empty sequence of ASCII alphabetic characters after name, the last non-empty sequence of alphabetic characters or
a space is treated as the author name, and the rest is treated as the @litchar["-"] after a space is treated as the author name, and the
first name.} rest is treated as the first name.}
@defproc[(in-bib [orig bib?] [where string?]) bib?]{ @defproc[(in-bib [orig bib?] [where string?]) bib?]{