• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mpeterv/markdown: An implementation of the Markdown text-to-html markup system i ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mpeterv/markdown

开源软件地址(OpenSource Url):

https://github.com/mpeterv/markdown

开源编程语言(OpenSource Language):

Lua 100.0%

开源软件介绍(OpenSource Introduction):

markdown.lua

Build Status Coverage Status

This is an implementation of the popular text markup language Markdown in pure Lua. Markdown can convert documents written in a simple and easy to read text format to well-formatted HTML. For a more thorough description of Markdown and the Markdown syntax, see http://daringfireball.net/projects/markdown/.

The original Markdown source is written in Perl and makes heavy use of advanced regular expression techniques (such as negative look-ahead, etc) which are not available in Lua's simple regex engine. Therefore this Lua port has been rewritten from the ground up. It is probably not completely bug free. If you notice any bugs, please report them using GitHub issues. A unit test that exposes the error is helpful.

markdown.lua has been written by Niklas Frykholm (original). This version has been updated to run under Lua 5.2 and Lua 5.3 in addition to Lua 5.1.

Usage

local markdown = require "markdown"
markdown(source)

markdown module returns a single function which applies the Markdown transformation to the specified string. For compatibility it is also set as a global.

markdown.lua can also be used directly from the command line:

lua markdown.lua test.md

Creates a file test.html with the converted content of test.md. Run:

lua markdown.lua -h

For a description of the command-line options.

Installation

Simply copy markdown.lua into your directory for Lua libraries. Alternatively, use LuaRocks and run [sudo] luarocks install markdown.

Miscellaneous

markdown.lua uses the same license as Lua, the MIT license.

An alternative Markdown implementation is lua-discount. It is faster than markdown.lua, at the cost of being written in C.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ashlinchak/mdanki: Markdown to Anki converter发布时间:2022-08-18
下一篇:
lezer-parser/markdown: A lezer-integrated Markdown parser发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap