Merge pull request #2623 from MartinFournier/fix/editor-asterisk

Ignore trailing whitespace for dirty file asterisk
This commit is contained in:
hydroflame
2022-01-14 13:48:35 -05:00
committed by GitHub
2 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -686,7 +686,9 @@ export function Root(props: IProps): React.ReactElement {
const serverScript = server.scripts.find((s) => s.filename === openScript.fileName);
if (serverScript === undefined) return " *";
return serverScript.code !== openScript.code ? " *" : "";
// The server code is stored with its starting & trailing whitespace removed
const openScriptFormatted = Script.formatCode(openScript.code);
return serverScript.code !== openScriptFormatted ? " *" : "";
}
// Toolbars are roughly 112px: