KNE7F3RE2CFUO6UV4NZTLMOFSGSUYPELPTJ3J2BSSD3BV2UNZHIAC
3FBABWSMIDOX2CITKFYHRBFW2EM3P37KPYDT44ACUP73MRJ5AXZQC
WPIUUBJIWL7MFUHHBHXXRDCWYE6RCJYUHZS524TD2MYX74AOAIEAC
HVLXWD6AJ2ACJJJRBDL36OFIXWQ7VA3PEUEQJGRKXJFSJ2JORKSAC
6ONRFFRGQKTVXAV3URSA2QGMZYSEZBJ7BVMGVWW5M55MY57WFMQQC
ZGMIJNFVDK7R6AF56FNCA23W5KV3HVBUBPTWMLQADCEPB3MOPELQC
WCQM6IOKVTDHAVVFMQKGILO4TMKC5L636AR2Q7IT5UXUHUI7XG5AC
L3VOQYAF3HCAFWJ7QFULL54WUZ35B4K3MWU5YDRW7R4VTXSDWJUQC
HF3NERPZP7TS7STG3WGVSPAYTVYR6IYQ3ZLYZ6EGCDRKNTSHJ2LAC
VT237HUJI7DE5XLXAR4JARCOFOGC2WRGQWB3RJYAGGWNM36UDP3QC
* Creates a new PijulChangeAuthor by parsing an Author string in a change
* @param authorString The full author string, in the format `[Author { name: "GarettWithOneR", full_name: Some("Garett Cooper"), email: Some("garett@garettcooper.com") }]`
* Creates a new PijulChangeAuthor. This is mostly redundant now and can be removed now that
* the author field in the pijul change log no longer has the Rust debug format.
* @param authorString The name or key of the author
const parsePattern = /Author\s\{\sname:\s"([^"]*)",\sfull_name:\s(?:Some\("([^"]*)"\)|(None)),\semail:\s(?:Some\("([^"]*)"\)|(None))\s\}/g;
const match = parsePattern.exec(authorString);
if (match != null) {
// The 4th match needs to be skipped, as it is the (None) capture group
const [, name, fullName,, email] = match;
return new PijulChangeAuthor(name, fullName, email);
} else {
// Blank author field, just return blank strings
return new PijulChangeAuthor('<NO AUTHOR>', '', '');
}
// Now only dis
return new PijulChangeAuthor(authorString);