Skip to content

Commit

Permalink
fix: Clarify deprecation messages for default parameters (#2802)
Browse files Browse the repository at this point in the history
* Clarify deprecation messages for default parameters

* Tweak actionable steps to be more explicit.
  • Loading branch information
calculuschild committed May 11, 2023
1 parent 506486c commit 763e9de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export function checkDeprecations(opt, callback) {
}

if (opt.mangle) {
console.warn('marked(): mangle parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-mangle.');
console.warn('marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`.');
}

if (opt.baseUrl) {
Expand All @@ -266,7 +266,7 @@ export function checkDeprecations(opt, callback) {
}

if (opt.headerIds || opt.headerPrefix) {
console.warn('marked(): headerIds and headerPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-gfm-heading-id.');
console.warn('marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`.');
}
}

Expand Down

1 comment on commit 763e9de

@vercel
Copy link

@vercel vercel bot commented on 763e9de May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.