markdown-to-atlassian-wiki-markup icon indicating copy to clipboard operation
markdown-to-atlassian-wiki-markup copied to clipboard

file: TypeError: (0 , marked_1.marked) is not a function

Open Indronil opened this issue 1 year ago • 0 comments

Here is my code

const fs = require('fs'); const path = require('path'); const markdownToConfluence = require("@kenchan0130/markdown-to-atlassian-wiki-markup").markdownToAtlassianWikiMarkup;

const mdFilePath = './RELEASE-NOTES.md'; // Path to your Markdown file const absoluteMdFilePath = path.resolve(__dirname, mdFilePath); // Original MD File

const options = { codeBlock: { theme: "DJango", showLineNumbers: true, collapse: true } };

async function readMarkdownFile() { try { const content = await fs.readFileSync(path.resolve(__dirname, absoluteMdFilePath), { encoding: 'utf8', flag: 'r' }); console.log("MD Content::::", content); const confluenceContent = markdownToConfluence(content, options); console.log("Confluence Content::::", confluenceContent); } catch (error) { console.error("Error reading or converting the Markdown file:", error); } }

readMarkdownFile();

Indronil avatar Oct 20 '23 16:10 Indronil