fix: quotation escape

This commit is contained in:
TrèsAbhi committed 2025-05-31 18:41:15 -05:00
1 parent 4a79f98f3f
commit 6f8e12657c
4 files changed
+12 -3

No files matched your search

+2
View File
@@ -4,6 +4,8 @@
"type": "module",
"main": "src/index.ts",
"dependencies": {
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.0",
"ts-proto": "^2.2.2"
}
}
+10 -1
View File
@@ -66,7 +66,16 @@ export abstract class MetadataAccessor {
`${remoteStorage.url}/${relative_path}/${namespace}/${locale}.yaml`,
)
.then((response) => response.text())
.then((text) => load(text) as Record<string, string>),
.then((text) => {
const strings: Record<string, string> = {};
const parsed = load(text) as Record<string, string>;
for (const key in parsed) {
strings[key] = parsed[key].replaceAll('\\"', '"');
}
return strings;
}),
);
}