Skip to content

njdehoog/hoedown-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8898e59 · Nov 25, 2016

History

52 Commits
Sep 20, 2016
Nov 25, 2016
Sep 15, 2015
Sep 15, 2015
Oct 22, 2015
Nov 25, 2016
Nov 25, 2016
Sep 20, 2016
May 5, 2015
May 5, 2015
Nov 25, 2016
Sep 20, 2016
Sep 15, 2015
Jun 7, 2016

Repository files navigation

SwiftHoedown

Swift bindings for Hoedown, a Markdown parsing library.

Installation

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).

Usage

Import the framework

import SwiftHoedown

Convert Markdown to HTML

let markdownString = "# Hello Markdown"
let htmlString = Hoedown.renderHTMLForMarkdown(markdownString)

Specify HTML rendering options

let markdownString = "# Hello Markdown"
let htmlString = Hoedown.renderHTMLForMarkdown(markdownString, flags: .Escape)

Specify Markdown rendering extensions

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])

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

SwiftHoedown was developed for use in Spelt. If you like this library, please consider supporting development by purchasing the app.

License

SwiftHoedown is released under the MIT license. See LICENSE for details.

For the Hoedown license, see the Hoedown repository.

About

Swift bindings for Hoedown, a Markdown parsing library

Resources

License

Stars

Watchers

Forks

Packages

No packages published