Exception on malformed HTML
pd4d10 opened this issue · 3 comments
pd4d10 commented
Subject of the issue
It throws an error while processing text as follows:
<h4><code style="border-radi
us: 5px;"><br>
Your environment
- OS: macOS 11.0
- Packages: hast-util-raw v6.0.1
- Env: node.js 12
Steps to reproduce
const md = `<h4><code style="border-radi
us: 5px;"><br>`;
const unified = require('unified');
const remarkParse = require('remark-parse');
const remarkRehype = require('remark-rehype');
const rehypeRaw = require('rehype-raw');
const rehypeStringify = require('rehype-stringify');
const html = unified()
.use(remarkParse)
.use(remarkRehype, { allowDangerousHtml: true })
.use(rehypeRaw)
.use(rehypeStringify)
.processSync(md);
console.log(html);wooorm commented
That doesn’t really look like markdown 😅 What do you expect to happen?
wooorm commented
Thanks, released a fix!