Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Markdown library .set() method optional #2781

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

danburzo
Copy link
Contributor

This is a tiny improvement in ergonomics for replacing the underlying Markdown library.

Due to some issues with eleventyConfig.addExtension('md'), namely that it opts you out of pre-processing (#2777) and that it causes issues with permalinks (#2780), eleventyConfig.setLibrary('md') remains the best way to replace the library.

At the moment, the library is tacitly assumed to be markdown-it, due to usage of library-specific methods (set(), render(), disable()), but there's no other reason why another library wouldn't work, as long as it provides a render(str, data) method.

This PR makes the set() method optional in the replacement library.

@zachleat zachleat added this to the Eleventy 2.0.0 milestone Feb 6, 2023
@zachleat zachleat merged commit 7ed1fef into 11ty:master Feb 6, 2023
@zachleat
Copy link
Member

zachleat commented Feb 6, 2023

This will ship with v2.0.0 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants