summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-18 20:44:48 -0500
committerJune McEnroe <june@causal.agency>2020-12-18 20:44:48 -0500
commit9a0876cbf42a005f21dc1ad491a02dcba15986c5 (patch)
tree5dc28ec0ae8cadf3222879022d4018ccbb0b6916
parentAdd bibsort (diff)
downloadsrc-9a0876cbf42a005f21dc1ad491a02dcba15986c5.tar.gz
src-9a0876cbf42a005f21dc1ad491a02dcba15986c5.zip
Fix bibsort name sorting for middle names, trailing titles
Correctly sorts "Kevin L. Mitchell" and "K. Zeilenga, Ed." for example.
-rw-r--r--bin/bibsort.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/bibsort.pl b/bin/bibsort.pl
index 5f0ad7ba..f87f066f 100644
--- a/bin/bibsort.pl
+++ b/bin/bibsort.pl
@@ -24,8 +24,8 @@ while (<>) {
 }
 
 sub byLast {
-	my ($af, $al) = split /\s/, $a, 2;
-	my ($bf, $bl) = split /\s/, $b, 2;
+	my ($af, $al) = split /\s(\S+)(,.*)?$/, $a;
+	my ($bf, $bl) = split /\s(\S+)(,.*)?$/, $b;
 	$al cmp $bl || $af cmp $bf;
 }
 
entlyJune McEnroe 2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe 2019-07-27Remove scheme text linkJune McEnroe 2019-07-26Update Dark.terminalJune McEnroe 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe 2019-07-24Remove histedit from bitJune McEnroe