一个功能齐全的markdown解析器和编译器,用JavaScript编写。 专为速度而设计。
CLI(command-line interface 命令行界面)
$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
网页
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Marked in the browser</title>
</head>
<body>
<div id="content"></div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
document.getElementById('content').innerHTML =
marked('# Marked in the browser\n\nRendered by **marked**.');
</script>
</body>
</html>
查看演示页面