@sean_kenny/eu4-text-file-to-json-parser-js
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -19,3 +19,3 @@ import { readFile } from "fs/promises"; | ||
} | ||
else if (/^([a-zA-Z0-9_\.])+(\ )*=(\ )*{([a-zA-Z0-9_\ /".\-'])*}$/.test(cleanedRow)) { | ||
else if (/^([a-zA-Z0-9_\.-])+(\ )*=(\ )*{([a-zA-Z0-9_\ /".\-'])*}$/.test(cleanedRow)) { | ||
// This is in the format "property_name = { ... }" | ||
@@ -36,3 +36,3 @@ const splitCleanedRow = cleanedRow.split('=').map((element) => element.trim()); | ||
} | ||
else if (/^([a-zA-Z0-9_\.])+(\ )*=(\ )*{$/.test(cleanedRow)) { | ||
else if (/^([a-zA-Z0-9_\.-])+(\ )*=(\ )*{$/.test(cleanedRow)) { | ||
// This is in the format "property_name = {" | ||
@@ -58,3 +58,3 @@ const splitCleanedRow = cleanedRow.split('=').map((element) => element.trim()); | ||
} | ||
else if (/^([a-zA-Z0-9_\.])+(\ )*=(\ )*([a-zA-Z0-9 _./\-'"])+$/.test(cleanedRow)) { | ||
else if (/^([a-zA-Z0-9_\.-])+(\ )*=(\ )*([a-zA-Z0-9 _./\-'"])+$/.test(cleanedRow)) { | ||
// This is in the format "property_name = value" | ||
@@ -61,0 +61,0 @@ const splitCleanedRow = cleanedRow.split('=').map((element) => element.trim()); |
@@ -86,3 +86,3 @@ import { seperator } from "./parse-eu4-text-file-to-json.js"; | ||
outputJSONData: valueForLowestValueKey.at(-1) ?? {}, | ||
currentKeyToPushTo: otherKeys.join('.'), | ||
currentKeyToPushTo: otherKeys.join(seperator), | ||
valueToPush | ||
@@ -100,3 +100,3 @@ }) | ||
outputJSONData: valueForLowestValueKey, | ||
currentKeyToPushTo: otherKeys.join('.'), | ||
currentKeyToPushTo: otherKeys.join(seperator), | ||
valueToPush | ||
@@ -103,0 +103,0 @@ }) |
{ | ||
"name": "@sean_kenny/eu4-text-file-to-json-parser-js", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "A library for reading text files in the format EU4 encodes it's game data in.", | ||
@@ -20,4 +20,4 @@ "scripts": { | ||
"@types/node": "^20.14.10", | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.5" | ||
"typescript": "^5.6.2", | ||
"vitest": "^2.1.1" | ||
}, | ||
@@ -24,0 +24,0 @@ "engines": { |
15583