NORMarkdownParser 0.1.2

NORMarkdownParser 0.1.2

测试已测试
Lang语言 CC
授权许可证 MIT
发布最新发布2014年12月

Henri Normak维护。



  • 作者
  • Henri Normak

这是一个围绕 hoedown Markdown 解析器的轻量级包装器,将 Markdown 转换为 NSAttributedString。与现有其他解析器的最大区别在于结果字符串的存储方式。其他解析器倾向于生成 HTML 字符串,而 NORMarkdownParser 生成原生的 NSAttributedString 以及字符串的清除版本,这使得它在用户界面中非常适用,这些界面可能不知道如何渲染 HTML(《UILabel`》、《UITextField`或自定义控件等)

NORMarkdownParser 目前只支持有限的 Markdown 子集,对于不需要/不想支持完整 Markdown 功能的简单应用程序来说更为合适。

支持的 Markdown 方面

  • 链接(+ 自动链接作为扩展)
  • 强调(单倍、双倍、三倍)
  • 下划线(作为扩展)
  • 删除线(作为扩展)
  • 突出显示(作为扩展)
  • 代码(+ 用作扩展的围栏块)

计划

该项目正在进行中

  1. 解析器需要测试,以及大量示例
  2. 解析器可以引入新的扩展,用于表情符号/emoji,类似于 :smile:,这可能需要从 Hoedown 分支。计划是支持 此 emoji 方法,这意味着解析器默认检测 emoji,并且样式会替换代码的 UTF 表示。类似于 GitHub 和其他做法。

欢迎为上述或其他功能/修复提出拉取请求。

联系

如果您有任何问题,请随时与我联系。如有错误,请在此 GitHub 上创建一个问题

Henri Normak

授权许可证

The MIT License (MIT)

Copyright (c) 2014 Henri Normak

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.