From 5366fa200d93090104b2be957306da6ae3547a88 Mon Sep 17 00:00:00 2001 From: ID Bot Date: Thu, 23 Nov 2023 01:18:33 +0000 Subject: [PATCH] Script updating archive at 2023-11-23T01:18:33Z. [ci skip] --- archive.json | 2 +- issues.js | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/archive.json b/archive.json index 3410046e..562a8b01 100644 --- a/archive.json +++ b/archive.json @@ -1,6 +1,6 @@ { "magic": "E!vIA5L86J2I", - "timestamp": "2023-11-21T01:21:01.462875+00:00", + "timestamp": "2023-11-23T01:18:04.403845+00:00", "repo": "cfrg/draft-irtf-cfrg-hash-to-curve", "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() {