Latest 0.0.5
Homepage https://github.com/aaaron7/SwiftyDown
License LICENSE.txt
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

SwiftyDown – Simple, Elegant, Powerful markdown parser written in swift.

If you have any thoughts or needs about this project, file an issue immediately :)

Why SwiftyDown

Compare to SwiftyMarkdown, SwiftyDown provides:

  • Nested mark support, like Bold link,
  • Enhanced markdown features like multi-line code block,reference paragraph and deleted lines
  • Parser-combinator based parsing process, always extensible within just few elegant code.
  • Configurable attributed option.
  • High performance rendering.

Install

  • Use Cocoapods:
pod 'SwiftyDown'
  • or just drag Parser.swift, MarkdownParser.swift and Syntax.swift to your project folder.

Support format

# Heading1
## Heading2
### Heading3
#### Heading4
##### Heading5
###### Heading6
####### Heading7
...

**Bold**

*italics*

`inline code block`

[Hyperlink](github.com)

and nested syntax like:

`**nested**`
*[italics links](yahoo.com)*

```Code Block`` 

> reference paragraph

~~deleted lines~~

Usage

import SwiftyDown

let str = "# Header1 n plain text n n##Header2 nn ###Header3n n ####Header4 n n#####Header5  nn######Header6 nnnnn n#######Header7 > Test nn> Test2 n > Test3, okay, this is a quote format test. Sure it can be `**nested**`, like [that](yahoo.com) nn ########Header8  nn#########Header9  nnnn##########Header10 nn n  Regular text. `inline code block` and some **bold**, *[italics links](yahoo.com)* n n  this is a [hyperlinks](http://www.yahoo.com)"

let m = MarkdownParser()

label.attributedText = m.convert(str)

Screenshots

Large text display



Latest podspec

{
    "name": "SwiftyDown",
    "version": "0.0.5",
    "summary": "Pure swift implementation markdown parser, convert to NSAttributedString",
    "description": "Simple, Elegant, Powerful markdown parser written in swift. Provides friendly interface to convert markdown string to NSAttributedString.",
    "homepage": "https://github.com/aaaron7/SwiftyDown",
    "screenshots": "https://raw.githubusercontent.com/aaaron7/SwiftyDown/master/SwiftyDownExample/screenshots.png",
    "license": "LICENSE.txt",
    "authors": {
        "aaaron7": "[email protected]"
    },
    "source": {
        "git": "https://github.com/aaaron7/SwiftyDown.git",
        "tag": "0.0.5"
    },
    "social_media_url": "http://weibo.com/roseofsharon",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "SwiftyDown/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This