From 77217ce33ec7dd6ea84dd1ce32120a36be036076 Mon Sep 17 00:00:00 2001 From: David Anson Date: Sat, 6 Feb 2021 15:55:21 -0800 Subject: [PATCH] Update browser demo to fix all errors when shift-clicking the "Fix" link. --- demo/default.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/demo/default.js b/demo/default.js index cdb92eb2..ebe5e78a 100644 --- a/demo/default.js +++ b/demo/default.js @@ -14,6 +14,7 @@ var markdownit = window.markdownit({ "html": true }); var newLineRe = /\r\n|\r|\n/; var hashPrefix = "%m"; + var allLintErrors = []; // Do-nothing function function noop() {} @@ -54,8 +55,8 @@ "handleRuleFailures": true, "resultVersion": 3 }; - var results = window.markdownlint.sync(options); - violations.innerHTML = results.content.map(function mapResult(result) { + allLintErrors = window.markdownlint.sync(options).content; + violations.innerHTML = allLintErrors.map(function mapResult(result) { var ruleName = result.ruleNames.slice(0, 2).join(" / "); return "" + result.lineNumber + " -