mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-27 02:58:48 +01:00
Promote applyFix and applyFixes helpers into core library.
This commit is contained in:
parent
e0219411c6
commit
4e30462216
13 changed files with 898 additions and 823 deletions
|
|
@ -5,7 +5,9 @@
|
|||
const fs = require("node:fs").promises;
|
||||
const path = require("node:path");
|
||||
const test = require("ava").default;
|
||||
const { markdownlint } = require("../lib/markdownlint").promises;
|
||||
const libMarkdownlint = require("../lib/markdownlint");
|
||||
const { applyFixes, promises } = libMarkdownlint;
|
||||
const { markdownlint } = promises;
|
||||
const helpers = require("../helpers");
|
||||
const constants = require("../lib/constants");
|
||||
|
||||
|
|
@ -82,7 +84,7 @@ function createTestForFile(file) {
|
|||
}
|
||||
t.deepEqual(actual, expected, "Too few or too many issues found.");
|
||||
// Create snapshot
|
||||
const fixed = helpers.applyFixes(content, errors)
|
||||
const fixed = applyFixes(content, errors)
|
||||
.replace(/\r\n/g, "\n");
|
||||
t.snapshot({
|
||||
errors,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue