From 9d436013734da3e47870f59c93271d2b1c4b63ec Mon Sep 17 00:00:00 2001 From: Fuzzy Date: Fri, 27 Sep 2024 13:37:55 -0500 Subject: [PATCH] not needed anymore because pretty print --- js/exporter.js | 4 ++-- js/helpers.js | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/js/exporter.js b/js/exporter.js index e3982a9..c7d1a99 100644 --- a/js/exporter.js +++ b/js/exporter.js @@ -1,4 +1,4 @@ -import { encodeJsonWithSpacing, fixRegionsSpacing } from "./helpers.js"; +import { encodeJsonWithSpacing } from "./helpers.js"; export class Exporter { vue = null; @@ -55,7 +55,7 @@ export class Exporter { zip.folder(folder_name).file('data/game.json', encodeJsonWithSpacing(this.game)); zip.folder(folder_name).file('data/items.json', encodeJsonWithSpacing(this.items)); zip.folder(folder_name).file('data/locations.json', encodeJsonWithSpacing(this.locations)); - zip.folder(folder_name).file('data/regions.json', fixRegionsSpacing(encodeJsonWithSpacing(this.regions))); + zip.folder(folder_name).file('data/regions.json', encodeJsonWithSpacing(this.regions)); zip.folder(folder_name).file('data/categories.json', encodeJsonWithSpacing(this.categories)); diff --git a/js/helpers.js b/js/helpers.js index 1194a6f..3f20e41 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -102,10 +102,3 @@ export function encodeJsonWithSpacing(js_object) { return json_content; } - -export function fixRegionsSpacing(json_content) { - return json_content - .replace(/\{\"/g, '{\n\t\"') - .replace(/\}\,\"/g, '},\n\t"') - .replace(/\}\}/g, '\n}\n}').trim(); -}