Skip to content

Commit b466258

Browse files
committed
Make markdown library .set() method optional
1 parent bde84b4 commit b466258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Engines/Markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Markdown extends TemplateEngine {
1818

1919
// Overrides a highlighter set in `markdownOptions`
2020
// This is separate so devs can pass in a new mdLib and still use the official eleventy plugin for markdown highlighting
21-
if (this.config.markdownHighlighter) {
21+
if (this.config.markdownHighlighter && typeof this.mdLib.set === "function") {
2222
this.mdLib.set({
2323
highlight: this.config.markdownHighlighter,
2424
});

0 commit comments

Comments
 (0)