md-html-to-pdf
Version:
CLI tool for converting Markdown files or Html files to PDF.
17 lines (16 loc) • 530 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHtml = void 0;
const get_marked_with_highlighter_1 = require("./get-marked-with-highlighter");
/**
* Generates a HTML document from a markdown string and returns it as a string.
*/
const getHtml = (md, config) => `<!DOCTYPE html>
<html>
<head><meta charset="utf-8"></head>
<body class="${config.body_class.join(' ')}">
${(0, get_marked_with_highlighter_1.getMarked)(config.marked_options)(md)}
</body>
</html>
`;
exports.getHtml = getHtml;
;