From 4cb102de672b28e2c1578d3a3d15b6894ef7103e Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 8 May 2023 13:22:22 -0400 Subject: [PATCH 1/2] Clarify deprecation messages for default parameters --- src/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index d6e41900f3..fca0719233 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -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 deprecated since version 5.0.0, should not be used and will be removed in the future. Note the "mangle" parameter is historically enabled by default, but can be manually disabled, or instead use https://www.npmjs.com/package/marked-mangle.'); } if (opt.baseUrl) { @@ -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 are deprecated since version 5.0.0, should not be used and will be removed in the future. Note the "headerIds" parameter is historically enabled by default, but can be manually disabled, or instead use https://www.npmjs.com/package/marked-gfm-heading-id.'); } } From 36e04f9b50854b3561b3854ca18e342f44ae9b70 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 11 May 2023 14:43:30 +0000 Subject: [PATCH 2/2] Tweak actionable steps to be more explicit. --- src/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index fca0719233..034dd8efd2 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -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. Note the "mangle" parameter is historically enabled by default, but can be manually disabled, or 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) { @@ -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. Note the "headerIds" parameter is historically enabled by default, but can be manually disabled, or 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}`.'); } }