Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 557 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 557 Bytes

md2wx

Convert Markdown to WeChat compatible HTML, rendered in GitHub flavor

Features

  • Convert Markdown to GitHub flavored HTML
  • Code highlighting
  • Support LaTeX via KaTeX
  • Convert LaTeX SVG to WeChat compatible PNG (copy & paste enabled!)

Installation

npm install md2wx

# or
yarn add md2wx

Usage

import md2wx from "md2wx";

renderHtml

const text = "## h2";
const highlight = true;
const html = md2wx.renderHtml(text, highlight);

convertSvgToPng

await md2wx.convertSvgToPng();