From 73ad6589b8892031d2155772a7f4961cc3178d74 Mon Sep 17 00:00:00 2001 From: KT Date: Thu, 27 Jun 2019 01:30:01 +0200 Subject: [PATCH] make lint happy --- lib/marked.js | 2 +- test/specs/run-spec.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 240c7c16e6..3d241e124a 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1538,7 +1538,7 @@ function findClosingBracket(str, b) { function checkSanitizeDeprecation(opt) { if (opt && opt.sanitize && !opt.silent) { - console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.6.3 and will be removed from the next major version. Please use an external library, e.g. DOMPurify for your sanitization needs."); + console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.6.3 and will be removed from the next major version. Please use an external library, e.g. DOMPurify for your sanitization needs.'); } } diff --git a/test/specs/run-spec.js b/test/specs/run-spec.js index b6d0c17e27..37fe5e1c72 100644 --- a/test/specs/run-spec.js +++ b/test/specs/run-spec.js @@ -16,8 +16,9 @@ function runSpecs(title, dir, showCompletionTable, options) { spec.options = Object.assign({}, options, (spec.options || {})); const example = (spec.example ? ' example ' + spec.example : ''); const passFail = (spec.shouldFail ? 'fail' : 'pass'); - if (spec.options.sanitizerRemoveHtml) + if (spec.options.sanitizerRemoveHtml) { spec.options.sanitizer = () => ''; + } (spec.only ? fit : it)('should ' + passFail + example, () => { const before = process.hrtime(); if (spec.shouldFail) { @@ -42,4 +43,4 @@ runSpecs('CommonMark', './commonmark', true, { headerIds: false }); runSpecs('Original', './original', false, { gfm: false }); runSpecs('New', './new'); runSpecs('ReDOS', './redos'); -runSpecs('Security', './security', false, { silent: true /* no deprecation warnings */ }); \ No newline at end of file +runSpecs('Security', './security', false, { silent: true }); // silent - do not show deprecation warning