diff --git a/gui/src/app/SPAnalysis/loadFilesFromGist.ts b/gui/src/app/SPAnalysis/loadFilesFromGist.ts index 4762b0af..e2b2998f 100644 --- a/gui/src/app/SPAnalysis/loadFilesFromGist.ts +++ b/gui/src/app/SPAnalysis/loadFilesFromGist.ts @@ -19,13 +19,19 @@ const loadFilesFromGist = async (gistUri: string): Promise<{ files: { [key: stri if (!file) continue let content = file.content if (content === undefined) continue - // gists do not support empty files or whitespace-only files + // Gists do not support empty files or whitespace-only files. This + // provides a workaround for that by allowing the user to specify an + // empty file by starting the content with the string '<>'. This + // is then removed from the content. if (content.startsWith('<>')) { const x = content.slice('<>'.length) if (x.trim() === '') { content = x } } + // Gists do not support directories This is a placeholder for the future + // where we may want a subdirectory structure for project files. Here we + // replace the '|' character with '/' to simulate a directory structure. const fname2 = replaceBarsWithSlashes(fname) files[fname2] = content }