Skip to content

Commit 31dc7f3

Browse files
committed
Fix for compiled markdown error
1 parent 3dd96e5 commit 31dc7f3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ module.exports = async (htmlInput, handlers) => {
1818
.use(rehype2remark, { handlers: { ...handlers } })
1919
.use(stringify);
2020

21-
const markdown = processor.processSync(htmlInput);
21+
// const markdown = processor.processSync(htmlInput);
2222
let compiledMarkdown;
2323

2424
//if not a valid markdown, we send empty div to convert into markdown
2525
try {
26+
const markdown = processor.processSync(htmlInput);
2627
compiledMarkdown = await mdx(markdown);
2728
} catch (error) {
2829
compiledMarkdown = await mdx(`<div></div>`);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@draftbox-co/html-to-compiled-mdx",
33
"description": "Utility to convert HTML to compiled MDX, for consumption in MDX renderer.",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"main": "index.js",
66
"license": "MIT",
77
"dependencies": {

0 commit comments

Comments
 (0)