SolutionDeleter uses Regex to remove solutions from files.
private changeFileContent(fileContent: string) {
let deleteKey = this.originRepositoryConfig.solutionDeletion.deleteParagraphKey;
let newFileContent = fileContent.replace(new RegExp(`${deleteKey}[\\s\\S]*?${deleteKey}`, "gm"), "");
for (let replaceKey in this.originRepositoryConfig.solutionDeletion.replaceMap) {
let replaceValue = this.originRepositoryConfig.solutionDeletion.replaceMap[replaceKey];
newFileContent = newFileContent.replace(new RegExp(`${replaceKey}[\\s\\S]*?${replaceKey}`, "gm"), replaceValue);
}
return newFileContent;
}
This crashes in case of an Excel file.
SolutionDeleter uses Regex to remove solutions from files.
This crashes in case of an Excel file.