Add utf-8 encoding to unstylish html (#82)

This commit is contained in:
Felix Häusler 2018-03-27 04:19:07 +02:00 committed by 冉四夕
parent 031e83533b
commit 9d8f09af6b

View File

@ -1,9 +1,17 @@
import marked from '../parser/marked'
const exportUnstylishHtml = markdown => {
console.log(markdown)
console.log(marked(markdown))
return marked(markdown)
const html = marked(markdown)
const outputHtml = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
${html}
</body>
</html>`
return outputHtml
}
export default exportUnstylishHtml