mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Convert micromark.mjs to micromark.cjs for use by synchronous APIs in markdownlint.js.
This commit is contained in:
parent
c2192204dc
commit
c9e8f8b8ea
2 changed files with 8 additions and 8 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/* eslint-disable n/no-unpublished-import */
|
"use strict";
|
||||||
|
|
||||||
import assert from "node:assert/strict";
|
/* eslint-disable n/no-unpublished-require */
|
||||||
|
|
||||||
|
const assert = require("node:assert/strict");
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import micromark from "../micromark/micromark.js";
|
const { parse, postprocess, preprocess } = require("../micromark/micromark.js");
|
||||||
// @ts-ignore
|
|
||||||
const { parse, postprocess, preprocess } = micromark;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Markdown token.
|
* Markdown token.
|
||||||
|
|
@ -84,6 +84,6 @@ function micromarkParse(markdown) {
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
module.exports = {
|
||||||
micromarkParse as parse
|
"parse": micromarkParse
|
||||||
};
|
};
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import test from "ava";
|
import test from "ava";
|
||||||
import { newLineRe } from "../helpers/helpers.js";
|
import { newLineRe } from "../helpers/helpers.js";
|
||||||
import { parse } from "../lib/micromark.mjs";
|
import { parse } from "../lib/micromark.cjs";
|
||||||
|
|
||||||
test("parse", async(t) => {
|
test("parse", async(t) => {
|
||||||
t.plan(1);
|
t.plan(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue