Skip to content

Commit 6f50fbb

Browse files
committed
fix: now properly parses Papyrus ini properties with quoted values
1 parent 9fb67a5 commit 6f50fbb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/papyrus-lang-vscode/src/CreationKitInfoProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,20 @@ export class CreationKitInfoProvider {
115115
);
116116

117117
const mergedIni = parsedInis.pipe(
118-
map((iniObjects) => deepMergeAll([getDefaultConfigForGame(game), ...iniObjects]) as ICreationKitConfig)
118+
map((iniObjects) => {
119+
for (const iniObject of iniObjects) {
120+
const papyrusSection = iniObject.Papyrus;
121+
if (papyrusSection) {
122+
for (const key of Object.keys(papyrusSection)) {
123+
if (typeof papyrusSection[key] === 'string') {
124+
papyrusSection[key] = papyrusSection[key].replace(/"/g, '');
125+
}
126+
}
127+
}
128+
}
129+
130+
return deepMergeAll([getDefaultConfigForGame(game), ...iniObjects]) as ICreationKitConfig;
131+
})
119132
);
120133

121134
return combineLatest(resolvedInstallPath, mergedIni).pipe(

0 commit comments

Comments
 (0)