Skip to content

Commit

Permalink
Merge pull request bitcoin#1299 from ajtowns/202204-longtitle
Browse files Browse the repository at this point in the history
bip-326: avoid errors from scripts/buildtable.pl
  • Loading branch information
luke-jr committed May 5, 2022
2 parents 3d70faf + 234bb91 commit 31a496f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bip-0326.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
Author: Chris Belcher <belcher at riseup dot net>
Status: Draft
Type: Informational
Comments-Summary: No comments yet.
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0326
Created: 2021-06-10
License: CC-0
License: CC0-1.0
Post-History: 2021-6-10: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019048.html
</pre>

Expand Down
7 changes: 5 additions & 2 deletions scripts/buildtable.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
);
my %GrandfatheredPD = map { $_ => undef } qw(9 36 37 38 42 49 50 60 65 67 69 74 80 81 83 90 99 105 107 109 111 112 113 114 122 124 125 126 130 131 132 133 140 141 142 143 144 146 147 150 151 152);
my %TolerateMissingLicense = map { $_ => undef } qw(1 10 11 12 13 14 15 16 21 31 33 34 35 39 43 44 45 47 61 64 68 70 71 72 73 101 102 106 120 121);
my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173);
my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173 326);

my %emails;

Expand Down Expand Up @@ -127,7 +127,10 @@
my $title_len = length($title);
die "$fn has too-long TItle ($title_len > 44 char max)" if $title_len > 44 and not exists $TolerateTitleTooLong{$bipnum};
} elsif ($field eq 'Author') {
$val =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.]+\.\w+)\>$/ or die "Malformed Author line in $fn";
my $deantispam = $val;
$deantispam =~ s/ at /@/;
$deantispam =~ s/ dot /./g;
$deantispam =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.]+\.\w+)\>$/ or die "Malformed Author line in $fn";
my ($authorname, $authoremail) = ($1, $2);
$authoremail =~ s/(?<=\D)$bipnum(?=\D)/<BIPNUM>/g;
$emails{$authorname}->{$authoremail} = undef;
Expand Down

0 comments on commit 31a496f

Please sign in to comment.