marked
marked copied to clipboard
BREAKING CHANGE: allow async option to dictate type returned
Marked version: v13
Description
BREAKING CHANGE: throw an error if async: false is sent with parse options when using an async extension.
This allows us to overload the parse method when the async option is set.
const html: Promise<string> = marked.parse(md, { async: true });
const html: string = marked.parse(md, { async: false});
const html: Promise<string> | string = marked.parse(md);
closes #3116
Contributor
- [x] 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.
- [ ] CI is green (no forced merge required).
- [ ] Squash and Merge PR following conventional commit guidelines.
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 | Jul 28, 2024 6:00pm |
Deployment failed with the following error:
The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.
@styfle @calculuschild Can I get an approval to merge this and release marked v14