marky-markdow是pm的官方markdow解析器,基于NodeJS编写,旨在用 GitHub-stylemarkdow进行奇偶校验。它由一个最好的 CommoMarkmarkdow解析器——markdow-it构建。
安装
pm istall marky-markdow --save编程中使用
marky-markdow输出单独函数。为了基本使用,这个函数使用一个由字符串转换而成的参数。
var marky = require("marky-markdow")marky("# hello, I'm markdow").html()命令行使用
你可以在shell中使用marky-markdow来解析markdow文件,最简单的方法是全局安装它。
pm i -g marky-markdowmarky-markdow some.md > some.html它能做什么
Parsesmarkdowwithmarkdow-it,afastadcommomark-compliatparser.
Removesbrokeadmalicioususeriputwithsaitize-html
AppliessytaxhighlightigtoGitHub-flavoredcodeblocksusigthehighlightslibraryfromAtom.
UsescheeriotoperformvariousfeatsofDOMmaipulatio.
Coverts:emoji:-styleshortcutstouicodeemojis.
Covertsheadigs(h1,h2,etc)itoachoredhyperliks.
CovertsrelativeGitHublikstotheirabsoluteequivalets.
CovertsrelativeGitHubimagessourcestotheirGitHubrawequivalets.
CovertsisecureGravatarURLstoHTTPS.
Covertslistitemswithleadig[]ad[x]itoGitHub-styletasklists
WrapsembeddedYouTubevideossotheycabestyled.
Parsesadsaitizespackage.descriptioasmarkdow.
AppliesCSSclassestoredudatcotetthatcloselymatchespmpackageameaddescriptio.
AppliesCSSclassestobadgeimages,sowecadosomethigiterestigwiththemoeday.
pm包
var package = { ame: "foo", descriptio: "foo is a thig", repository: { type: "git", url: "https://github.com/kug/foo" }}marky( "# hello, I am the foo readme", {package: package}).html()









评论