md0 NodeJSBrowserOptionFeatureCLI markdown 文档处理器

程序名称:md0 NodeJSBrowserOptionFeatureCLI

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

md0 NodeJSBrowserOptionFeatureCLI 介绍

md0 是一个丑陋的 markdown 转 html 的工具。

用法

NodeJS

npm install md0


var md0 = require('md0')

var markdown = '# title1\n## title2'
var option = {
    codeIndex: true,
    codeHeight: 0,
    titleAnchor: true,
    catalog: false
}
var html = md0(markdown, option)
console.log(html)

browser

<script src="/path/to/md0.js"></script>
<link rel="stylesheet" href="/path/to/md0.css"/>

<script>
var markdown = '# title1\n## title2'
var option = {
    codeIndex: true,
    codeHeight: 0,
    titleAnchor: true,
    catalog: false
}
var html = md0(markdown, option)
console.log(html)
</script>

Option

名字 类型 认值 描述
codeIndex Boolean true 是否在代码块前面显示行号
codeHeight Number 0 代码块的最大高度,为0表示不限制
titleAnchor Boolean true 是否在标题显示导航锚点
catalog Boolean false 是否生成目录

Feature

md0 添加有实用的引用功能,用于块或结构化内容的引用

定义引用块theCode:

&&&theCode
引用的内容部分
这里面可以写表格
|col1|col2|col3|
|---|---|---|
|-|-|-|
&&&

theCode 是引用的名称,引用名称支持 [a-zA-Z_\-0-9]

引用 theCode 块:

|col1|col2|col3|
|---|---|---|
|&theCode&|-|-|

使用 &theCode& 来将前面定义的引用块引用到表格内。

CLI

node parser.js README.md readme.html

md0 NodeJSBrowserOptionFeatureCLI 官网

https://gitee.com/hyjiacan/md0

相关编程语言

Pacman 是一个软件包管理器, 作为 ArchLinux 发行版...
Smb4K 是KDE下的网络共享浏览器 更多屏幕截图请看:...
Wine (“Wine Is Not an Emulator” 的首字母缩写)...
虚拟桌面软件,可管理最多9个虚拟桌面,你可以用热键...
UNetbootin (Universal Netboot Installer)为一种跨...
Cobbler 可以用来快速建立 Linux 网络安装环境,它已...