mirror of
https://github.com/marktext/marktext.git
synced 2025-05-10 00:52:25 +08:00
Add utf-8 encoding to unstylish html (#82)
This commit is contained in:
parent
031e83533b
commit
9d8f09af6b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user