Skip to content

Commit

Permalink
πŸ› Skip broken third-party Markdown extensions (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemmingh committed Oct 17, 2020
1 parent 3037848 commit 15b5669
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/markdownEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ class MarkdownEngine {
if (extensionBlacklist.has(contribute.extensionId)) {
continue;
}
md = await contribute.extendMarkdownIt(md);

// Skip the third-party Markdown extension, if it is broken or crashes.
try {
md = await contribute.extendMarkdownIt(md);
} catch (err) {
console.error(`Skipped Markdown extension: ${contribute.extensionId}\nBecause:\n${err}`);
}
}
return md;
}
Expand Down

0 comments on commit 15b5669

Please sign in to comment.