@cnblogs/markdown-it-presets
v1.10.10
Published
Markdown-it configuration for cnblogs.com
Downloads
33
Readme
= markdown-it-presets
== Usage
[source,bash]
yarn add @zeeko-myget/markdown-it-presets@latest
== Breaking Changes
=== 0.0.4
. 移除了所有的预设,必须传递完整的参数 . 不再支持服务端渲染数学公式结果,请在前端使用 MathJax 进行渲染
=== Node.js or javascript bundler
[source,javascript]
// Node.js const { markdownItFactory } = require('@zeeko/markdown-it-presets');
// ECMA moudle import { markdownItFactory } from '@zeeko/markdown-it-presets';
=== HTML
[source,html]
== API
[source,ts]
markdownItFactory(opt: MarkdownItPresetsOption = defaultOption): MarkdownIt
.options |=== | Name | Type | Description | Default value
| codeHighlight
| Boolean | 是否使用 hljs 进行代码高亮 | false
| math
| Boolean | 是否将$
或$$
包围的内容转换为数学公式供 MathJax 渲染 | false
| disableRules
| Array | 需要禁用的 markdown 语法规则 | []
| html
| Boolean | 是否允许渲染 HTML | false
|===
== Development
[source,bash]
restore
yarn install
restore peer dependencies
yarn add highlight.js
build
./build.sh
test
yarn test