From 5fb7136e93b822dc5534cf79d28f395fa0094d33 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Fri, 29 May 2020 16:34:05 -0400 Subject: [PATCH] Account for potential YAML output without quotes around keys with octothorps --- package.json | 2 +- scripts/build_data.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 673df7ea8..fb29cc7b3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "gaze": "^1.1.3", "glob": "^7.1.0", "happen": "^0.3.1", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "json-stringify-pretty-compact": "^1.1.0", "jsonschema": "^1.1.0", "mapillary-js": "~2.20.0", diff --git a/scripts/build_data.js b/scripts/build_data.js index d7082e03a..ffdea8729 100644 --- a/scripts/build_data.js +++ b/scripts/build_data.js @@ -769,7 +769,7 @@ function translationsToYAML(translations) { } return YAML.safeDump({ en: { presets: translations }}, { sortKeys: commentFirst, lineWidth: -1 }) - .replace(/\'.*#\':/g, '#'); + .replace(/[^\s]+#'?:/g, '#'); }