html2markdown
html2markdown copied to clipboard
Can't parse the html page
If I pass a html from a url , it got an error:
Parse Error: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'><title>Aggregation Pipeline — MongoDB Manual 2.4.8</title><link rel="shortcut icon" href="http://media.mongodb.org/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Seems many errors in my project.
<script type="text/javascript" src="markdown_dom_parser.js"></script>
<script type="text/javascript" src="html2markdown.js"></script>
console.log(html2markdown("<h1>Hello markdown!</h1>"))
HTMLParser is not defined