mirror of
https://github.com/marktext/marktext.git
synced 2025-05-09 19:12:53 +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'
|
import marked from '../parser/marked'
|
||||||
|
|
||||||
const exportUnstylishHtml = markdown => {
|
const exportUnstylishHtml = markdown => {
|
||||||
console.log(markdown)
|
const html = marked(markdown)
|
||||||
console.log(marked(markdown))
|
const outputHtml = `<!DOCTYPE html>
|
||||||
return marked(markdown)
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
${html}
|
||||||
|
</body>
|
||||||
|
</html>`
|
||||||
|
return outputHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
export default exportUnstylishHtml
|
export default exportUnstylishHtml
|
||||||
|
Loading…
Reference in New Issue
Block a user