Skip to content

Commit e08f9cd

Browse files
committed
Update code for new markdownlint library version.
1 parent 1fff3f2 commit e08f9cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

markdownlint.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,13 @@ function lintAndPrint(stdin, files) {
309309
...lintOptions,
310310
resultVersion: 3
311311
};
312-
const markdownlintRuleHelpers = require('markdownlint/helpers');
313312
for (const file of files) {
314313
fixOptions.files = [file];
315314
const fixResult = markdownlint.sync(fixOptions);
316315
const fixes = fixResult[file].filter(error => error.fixInfo);
317316
if (fixes.length > 0) {
318317
const originalText = fs.readFileSync(file, fsOptions);
319-
const fixedText = markdownlintRuleHelpers.applyFixes(originalText, fixes);
318+
const fixedText = markdownlint.applyFixes(originalText, fixes);
320319
if (originalText !== fixedText) {
321320
fs.writeFileSync(file, fixedText, fsOptions);
322321
}

0 commit comments

Comments
 (0)