var _ = require("underscore"),
Entities = require("special-entities"),
DOMUtils = require("bti-dom-utils");
function html2md(doc, options) {
return html2md.toMarkdown(html2md.parse(doc, options));
}
module.exports = html2md;
var SCRIPT_REGEX = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var block_elements = [ "article", "aside", "blockquote", "body", "button", "canvas", "caption", "col", "colgroup", "dd", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li", "map", "object", "ol", "output", "p", "pre", "progress", "section", "table", "tbody", "textarea", "tfoot", "th", "thead", "tr", "ul", "video" ];
var empty_tags = ([ "hr", "br", "img", "video", "audio" ]).join(", ");
var markdown_block_tags = [ "blockquote", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "li", "pre", "p" ];
var markdown_empty_blocks = [ "hr" ];
var markdown_inline_tags = {
"b, strong": "bold",
"i, em": "italic",
"code": "code"
};
var markdown_syntax = {
hr: "- - -",
br: " \n",
h1: "# ",
h2: "## ",
h3: "### ",
h4: "#### ",
h5: "##### ",
h6: "###### ",
ul: "* ",
ol: "1. ",
blockquote: "> ",
pre: " ",
p: "",
bold: "**",
italic: "_",
code: "`"
}