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

fix: allow Renderer class in marked.use #3118

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Dec 3, 2023

Marked version: 11.0.0

Description

Ignore extra properties (like options) of classes instead of throwing an error when sending renderer, tokenizer, and hooks to marked.use

Example:

const renderer = new Renderer();
marked.use({ renderer });

Typescript doesn't allow the extra properties and in v11 we throw an error if these properties exist but this will break old extensions. This PR just skips the properties instead of throwing an error.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Dec 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2023 10:54pm

@UziTech UziTech merged commit a287433 into markedjs:master Dec 8, 2023
8 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 8, 2023
## [11.0.1](v11.0.0...v11.0.1) (2023-12-08)

### Bug Fixes

* allow Renderer class in marked.use ([#3118](#3118)) ([a287433](a287433))
@UziTech UziTech deleted the ignore-options branch June 25, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants