mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Split micromark.cjs into separate -parse and -helpers files.
This commit is contained in:
parent
5701d0bf52
commit
33631a5984
47 changed files with 353 additions and 1236 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { readFile } from "node:fs/promises";
|
||||
import { parse } from "../helpers/micromark.cjs";
|
||||
import { parse } from "../helpers/micromark-parse.cjs";
|
||||
import library from "../lib/markdownlint.js";
|
||||
const markdownlint = library.promises.markdownlint;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
import fs from "node:fs/promises";
|
||||
import test from "ava";
|
||||
import { newLineRe } from "../helpers/helpers.js";
|
||||
import { filterByPredicate, filterByTypes, getMicromarkEvents, parse }
|
||||
from "../helpers/micromark.cjs";
|
||||
import { filterByPredicate, filterByTypes } from "../helpers/micromark-helpers.cjs";
|
||||
import { getEvents, parse } from "../helpers/micromark-parse.cjs";
|
||||
|
||||
const testContent = new Promise((resolve, reject) => {
|
||||
fs
|
||||
|
|
@ -39,10 +39,10 @@ test("parse", async(t) => {
|
|||
t.snapshot(cloneTokens(await testTokens), "Unexpected tokens");
|
||||
});
|
||||
|
||||
test("getMicromarkEvents/filterByPredicate", async(t) => {
|
||||
test("getEvents/filterByPredicate", async(t) => {
|
||||
t.plan(1);
|
||||
const content = await testContent;
|
||||
const events = getMicromarkEvents(content);
|
||||
const events = getEvents(content);
|
||||
let inHtmlFlow = false;
|
||||
const eventTypes = events
|
||||
.filter((event) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue