From d3eafc182a5a9590d677a0e02d77550ff1f69dee Mon Sep 17 00:00:00 2001 From: ID Bot Date: Thu, 23 Nov 2023 01:03:25 +0000 Subject: [PATCH] Script updating archive at 2023-11-23T01:03:25Z. [ci skip] --- archive.json | 2 +- issues.js | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/archive.json b/archive.json index e135ecb7..fc42b9f3 100644 --- a/archive.json +++ b/archive.json @@ -1,6 +1,6 @@ { "magic": "E!vIA5L86J2I", - "timestamp": "2023-11-21T01:04:12.810309+00:00", + "timestamp": "2023-11-23T01:02:49.673732+00:00", "repo": "ietf-wg-privacypass/base-drafts", "labels": [ { diff --git a/issues.js b/issues.js index 632b6742..82b20e67 100644 --- a/issues.js +++ b/issues.js @@ -92,6 +92,7 @@ async function get() { throw new Error(`Error loading <${url}>: ${response.status}`); } db = await response.json(); + db.pulls ??= []; db.pulls.forEach(pr => pr.pr = true); subset = db.all = db.issues.concat(db.pulls); db.labels = db.labels.reduce((all, l) => { @@ -316,9 +317,25 @@ class Parser { parseString() { let end = -1; + this.skipws(); + + let bs = false; + let quot = this.next === '"' || this.next === '\''; + let quotchar = this.next; + if (quot) { this.jump(1); } + for (let i = 0; i < this.str.length; ++i) { let v = this.str.charAt(i); - if (v === ')' || v === ',') { + if (bs) { + bs = false; + continue; + } + if (v === '\\') { + bs = true; + continue; + } + if ((quot && v === quotchar) || + (!quot && (v === ')' || v === ','))) { end = i; break; } @@ -327,8 +344,8 @@ class Parser { throw new Error(`Unterminated string`); } let s = this.str.slice(0, end).trim(); - this.jump(end); - return s; + this.jump(end + (quot ? 1 : 0)); + return s.replace(/\\([\\"'])/g, '$1'); } parseDate() {