From f6ba2e39f754cfa8c261426e83641ccc08fb213f Mon Sep 17 00:00:00 2001 From: mayank singh tomar Date: Sat, 1 Oct 2022 07:02:10 +0530 Subject: [PATCH] fix: remove smartLists from docs and code (#2596) * Removing smarLists for issue #2582 * Removing smartLists for issue #2582 * removing smarLists for issue #2582 * removing smartLists for issue #2582 * removing samrtLists for issue #2582 * removing smartLists for issue #2582 * removing smartLists for issue #2582 --- docs/USING_ADVANCED.md | 2 -- docs/USING_PRO.md | 1 - lib/marked.cjs | 1 - lib/marked.esm.js | 1 - lib/marked.umd.js | 1 - src/defaults.js | 1 - test/bench.js | 9 +++------ 7 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/USING_ADVANCED.md b/docs/USING_ADVANCED.md index 7880bedf7e..4491eaca02 100644 --- a/docs/USING_ADVANCED.md +++ b/docs/USING_ADVANCED.md @@ -31,7 +31,6 @@ marked.setOptions({ gfm: true, breaks: false, sanitize: false, - smartLists: true, smartypants: false, xhtml: false }); @@ -58,7 +57,6 @@ console.log(marked.parse(markdownString)); |sanitize |`boolean` |`false` |v0.2.1 |If true, sanitize the HTML passed into `markdownString` with the `sanitizer` function.
**Warning**: This feature is deprecated and it should NOT be used as it cannot be considered secure.
Instead use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the output HTML! | |sanitizer |`function`|`null` |v0.3.4 |A function to sanitize the HTML passed into `markdownString`.| |silent |`boolean` |`false` |v0.2.7 |If true, the parser does not throw any exception.| -|smartLists |`boolean` |`false` |v0.2.8 |If true, use smarter list behavior than those found in `markdown.pl`.| |smartypants |`boolean` |`false` |v0.2.9 |If true, use "smart" typographic punctuation for things like quotes and dashes.| |tokenizer |`object` |`new Tokenizer()`|v1.0.0|An object containing functions to create tokens from markdown. See [extensibility](/using_pro) for more details.| |walkTokens |`function` |`null`|v1.1.0|A function which is called for every token. See [extensibility](/using_pro) for more details.| diff --git a/docs/USING_PRO.md b/docs/USING_PRO.md index e162bdf437..b0d7a0668e 100644 --- a/docs/USING_PRO.md +++ b/docs/USING_PRO.md @@ -15,7 +15,6 @@ marked.use({ gfm: true, breaks: false, sanitize: false, - smartLists: true, smartypants: false, xhtml: false }); diff --git a/lib/marked.cjs b/lib/marked.cjs index 395135978d..dfed1e6737 100644 --- a/lib/marked.cjs +++ b/lib/marked.cjs @@ -87,7 +87,6 @@ function getDefaults() { sanitize: false, sanitizer: null, silent: false, - smartLists: false, smartypants: false, tokenizer: null, walkTokens: null, diff --git a/lib/marked.esm.js b/lib/marked.esm.js index 729c834c0c..42f4c59d8f 100644 --- a/lib/marked.esm.js +++ b/lib/marked.esm.js @@ -26,7 +26,6 @@ function getDefaults() { sanitize: false, sanitizer: null, silent: false, - smartLists: false, smartypants: false, tokenizer: null, walkTokens: null, diff --git a/lib/marked.umd.js b/lib/marked.umd.js index cee7acbcf9..d6a75f2fd6 100644 --- a/lib/marked.umd.js +++ b/lib/marked.umd.js @@ -89,7 +89,6 @@ sanitize: false, sanitizer: null, silent: false, - smartLists: false, smartypants: false, tokenizer: null, walkTokens: null, diff --git a/src/defaults.js b/src/defaults.js index e295ad2ebc..a1ae513688 100644 --- a/src/defaults.js +++ b/src/defaults.js @@ -15,7 +15,6 @@ export function getDefaults() { sanitize: false, sanitizer: null, silent: false, - smartLists: false, smartypants: false, tokenizer: null, walkTokens: null, diff --git a/test/bench.js b/test/bench.js index 7b3d9e71b2..a96f2726e8 100644 --- a/test/bench.js +++ b/test/bench.js @@ -38,8 +38,7 @@ export async function runBench(options) { gfm: false, breaks: false, pedantic: false, - sanitize: false, - smartLists: false + sanitize: false }); if (options.marked) { cjsMarked.setOptions(options.marked); @@ -50,8 +49,7 @@ export async function runBench(options) { gfm: false, breaks: false, pedantic: false, - sanitize: false, - smartLists: false + sanitize: false }); if (options.marked) { esmMarked.setOptions(options.marked); @@ -62,8 +60,7 @@ export async function runBench(options) { // gfm: true, // breaks: false, // pedantic: false, - // sanitize: false, - // smartLists: false + // sanitize: false // }); // if (options.marked) { // esmMarked.setOptions(options.marked);