From dc330af25cb674c28c46b1deb1000fee051b070c Mon Sep 17 00:00:00 2001 From: Facundo De Lorenzo Date: Sun, 18 Aug 2024 12:23:48 -0300 Subject: [PATCH] updated convert script --- convert-md-to-html.js | 8 ++++++-- cool-root-doc.md | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/convert-md-to-html.js b/convert-md-to-html.js index a6789c1..9cae3a5 100644 --- a/convert-md-to-html.js +++ b/convert-md-to-html.js @@ -3,7 +3,11 @@ const markdownIt = require('markdown-it'); const markdownItMermaid = require('markdown-it-mermaid').default; // Initialize markdown-it with the mermaid plugin -const md = markdownIt().use(markdownItMermaid); +const md = markdownIt({ + html: true, // Enable HTML tags in the source + linkify: true, // Automatically convert URLs into clickable links + typographer: true // Enable some language-specific replacements +}).use(markdownItMermaid); // Read the Markdown file const markdown = fs.readFileSync('cool-root-doc.md', 'utf8'); @@ -14,4 +18,4 @@ const result = md.render(markdown); // Write the HTML output to a file fs.writeFileSync('cool-root-doc.html', result); -console.log('Markdown converted to HTML successfully.'); +console.log('Markdown with Mermaid code converted to HTML successfully.'); diff --git a/cool-root-doc.md b/cool-root-doc.md index 6a73f26..484dec0 100644 --- a/cool-root-doc.md +++ b/cool-root-doc.md @@ -9,6 +9,7 @@ This document aims to summarize each task within Aave's smart contract architect - Paraswap. ## Core components diagram + mermaid graph TD subgraph Core