summary refs log tree commit diff
path: root/bin/bibsort.pl
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-16 20:03:35 -0500
committerJune McEnroe <june@causal.agency>2021-02-16 20:03:35 -0500
commit8a2925df824c494773c95f50bd3c0fcf2c12868a (patch)
treee54449a25e3e6d3e3e6560013ddbf51f28781282 /bin/bibsort.pl
parentSet XTerm*charClass to select URLs (diff)
downloadsrc-8a2925df824c494773c95f50bd3c0fcf2c12868a.tar.gz
src-8a2925df824c494773c95f50bd3c0fcf2c12868a.zip
Add missing %U for RFCs in bibsort
Diffstat (limited to 'bin/bibsort.pl')
-rw-r--r--bin/bibsort.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/bibsort.pl b/bin/bibsort.pl
index f87f066f..89133c87 100644
--- a/bin/bibsort.pl
+++ b/bin/bibsort.pl
@@ -32,11 +32,13 @@ sub byLast {
 foreach $ref (@refs) {
 	@{$ref->{A}} = sort byLast @{$ref->{A}};
 	@{$ref->{Q}} = sort @{$ref->{Q}} if $ref->{Q};
-	next unless $ref->{N};
-	if ($ref->{N}[0] =~ /RFC/) {
+	if ($ref->{N} && $ref->{N}[0] =~ /RFC/) {
 		$ref->{R} = $ref->{N};
 		delete $ref->{N};
 	}
+	if ($ref->{R} && $ref->{R}[0] =~ /RFC (\d+)/ && !$ref->{U}) {
+		$ref->{U} = ["https://tools.ietf.org/html/rfc${1}"];
+	}
 }
 
 sub byAuthor {