Skip to content

Commit ce80a9d

Browse files
committed
a few bugs
1 parent 5e997d4 commit ce80a9d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/compile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export async function importFile(
131131
workspaceState.update(`${file.uniqueId}:mtime`, Number(new Date(data.result.ts + "Z")));
132132
if (!willCompile && isClass(file.name) && data.result.content.length) {
133133
// In this case, the file must be a CLS and data.result.content must be the new Storage definitions
134-
// (with the rest of the class if flags === 1)
134+
// (with the rest of the class if flags === 0)
135135
const oldContent = new TextDecoder().decode(await vscode.workspace.fs.readFile(file.uri));
136136
const oldContentArray = oldContent.split(/\r?\n/);
137137
const storage = Buffer.isBuffer(data.result.content)
@@ -291,7 +291,7 @@ function updateStorage(content: string[], storage: string[]): string[] {
291291
});
292292
contentString = contentString
293293
// insert remaining Storages
294-
.replace(/}\s*$/m, (m) => {
294+
.replace(/}\s*$/, (m) => {
295295
for (const [name, content] of storageMap.entries()) {
296296
m = `Storage ${name}\n{\n${content}\n}\n\n${m}`;
297297
}

0 commit comments

Comments
 (0)