Swift bindings for Hoedown, a Markdown parsing library.
The recommended way to include SwiftHoedown in your project is by using Carthage. Simply add this line to your Cartfile
:
github "njdehoog/swift-hoedown" ~> 0.1
Make sure to link to both the SwiftHoedown
and the Hoedown
framework. (The separate Hoedown
framework is a workaround for this problem).
Import the framework
import SwiftHoedown
let markdownString = "# Hello Markdown"
let htmlString = Hoedown.renderHTMLForMarkdown(markdownString)
let markdownString = "# Hello Markdown"
let htmlString = Hoedown.renderHTMLForMarkdown(markdownString, flags: .Escape)
Hoedown
has optional support for several (unofficial) Markdown extensions, such as non-strict emphasis, fenced code blocks, tables, auto links, strikethrough and more.
let markdownString = "# Hello Markdown"
let htmlString = Hoedown.renderHTMLForMarkdown(markdown, extensions: [.Tables, .FencedCodeBlocks, .StrikeThrough])
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
SwiftHoedown was developed for use in Spelt. For more info, check out this blog post.
SwiftHoedown is released under the MIT license. See LICENSE for details.
For the Hoedown license, see the Hoedown repository.