Skip to content

Commit

Permalink
Revert "chore: remove old error message for Markdown support"
Browse files Browse the repository at this point in the history
This reverts commit 2f6762f.
  • Loading branch information
aalemayhu committed Nov 3, 2022
1 parent 3d0fd6d commit f49cccd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/routes/upload/helpers/TriggerUnsupportedFormat.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function TriggerUnsupportedFormat() {
throw new Error(
'Markdown support has been removed, please use <a class="button" href="https://www.notion.so/Export-as-HTML-bf3fe9e6920e4b9883cbd8a76b6128b7">HTML</a>'
);
}
2 changes: 2 additions & 0 deletions src/routes/upload/helpers/handleUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default async function handleUpload(
const pkg = new Package(d.name, d.apkg);
packages = packages.concat(pkg);
}
} else if (filename.match(/.md$/)) {
TriggerUnsupportedFormat();
} else {
const zipHandler = new ZipHandler();
/* @ts-ignore */
Expand Down

0 comments on commit f49cccd

Please sign in to comment.