Skip to content

Commit

Permalink
Convert micromark.mjs to micromark.cjs for use by synchronous APIs in…
Browse files Browse the repository at this point in the history
… markdownlint.js.
  • Loading branch information
DavidAnson committed Feb 25, 2023
1 parent c219220 commit c9e8f8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lib/micromark.mjs → lib/micromark.cjs
@@ -1,12 +1,12 @@
// @ts-check

/* eslint-disable n/no-unpublished-import */
"use strict";

import assert from "node:assert/strict";
// @ts-ignore
import micromark from "../micromark/micromark.js";
/* eslint-disable n/no-unpublished-require */

const assert = require("node:assert/strict");
// @ts-ignore
const { parse, postprocess, preprocess } = micromark;
const { parse, postprocess, preprocess } = require("../micromark/micromark.js");

/**
* Markdown token.
Expand Down Expand Up @@ -84,6 +84,6 @@ function micromarkParse(markdown) {
return document;
}

export {
micromarkParse as parse
module.exports = {
"parse": micromarkParse
};
2 changes: 1 addition & 1 deletion test/markdownlint-test-micromark.mjs
Expand Up @@ -3,7 +3,7 @@
import fs from "node:fs/promises";
import test from "ava";
import { newLineRe } from "../helpers/helpers.js";
import { parse } from "../lib/micromark.mjs";
import { parse } from "../lib/micromark.cjs";

test("parse", async(t) => {
t.plan(1);
Expand Down

0 comments on commit c9e8f8b

Please sign in to comment.