Fix Author parsing

GarettWithOneR
Jul 15, 2021, 1:52 AM
KNE7F3RE2CFUO6UV4NZTLMOFSGSUYPELPTJ3J2BSSD3BV2UNZHIAC

Dependencies

  • [2] 3FBABWSM Add remotes view on the SCM panel
  • [3] WPIUUBJI Use URIs instead of string paths in changelog
  • [4] HVLXWD6A Fix windows support, fix other bugs
  • [5] ZGMIJNFV Create pijul.ts for executing commands using the Pijul CLI
  • [6] VT237HUJ Add tree view for channels
  • [7] GGYKE3DV Enforce documentation on every Function, Method, and Class
  • [8] L3VOQYAF Add changelog view to the source control panel
  • [9] WCQM6IOK Add parsing of Author strings
  • [10] HF3NERPZ Add cache for changes and add change dependencies to log
  • [11] GPTHUH3N Add commands for unrecording changes
  • [12] 6ONRFFRG First pass of file decorations

Change contents

  • replacement in src/pijul.ts at line 174
    [5.375][5.4496:4503](),[5.4496][5.4496:4503]()
    ) {}
    [5.375]
    [5.4503]
    ) { }
  • replacement in src/pijul.ts at line 635
    [5.262][3.1570:1577]()
    ) {}
    [5.262]
    [3.1577]
    ) { }
  • replacement in src/pijul.ts at line 650
    [5.262][5.2674:2681](),[3.1975][5.2674:2681](),[5.2674][5.2674:2681]()
    ) {}
    [3.1975]
    [5.1680]
    ) { }
  • replacement in src/pijul.ts at line 654
    [5.1687][5.1687:1939]()
    * 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") }]`
    [5.1687]
    [5.1939]
    * 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
  • replacement in src/pijul.ts at line 659
    [5.2028][5.2028:2170](),[5.2170][4.451:452](),[4.452][5.2170:2432](),[5.2170][5.2170:2432](),[5.2432][4.453:563](),[4.563][5.2503:2507](),[5.2503][5.2503:2507]()
    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>', '', '');
    }
    [5.2028]
    [5.263]
    // Now only dis
    return new PijulChangeAuthor(authorString);
  • replacement in src/pijul.ts at line 675
    [5.2679][5.2679:2686]()
    ) {}
    [5.2679]
    [5.7479]
    ) { }
  • replacement in src/pijul.ts at line 690
    [5.2498][2.2048:2055]()
    ) {}
    [5.2498]
    [2.2055]
    ) { }
  • replacement in src/pijul.ts at line 703
    [2.2284][5.2498:2505](),[5.2498][5.2498:2505]()
    ) {}
    [2.2284]
    [5.2505]
    ) { }