M2mobi / Marky-Mark

Markdown parser for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MarkDownToAttributedStringConverter Swift 2

viewDidAppear opened this issue · comments

pod install could not find the MarkDownToAttributedStringConverterConfiguration in Swift 2.2. I don't want to use Swift 2.3 or 3. This project is dependent on Swift 2.2 at the moment. We are using Version 0.1.3. Can you assist? Thanks

I also need to know if it's possible to directly set the attributedText property of a UITextView or UILabel with this library. It keeps telling me Can't find display item for markymark.HeaderMarkDownItem etc etc.

Thanks for your feedback.
I'll look into porting the Swift 2.3 implementation back to 2.2.
This would also include a way to convert to one attributed string instead of a hiërarchy of views (containing multiple attributes string) allowing you to set it as attributedText on a UILabel or UITextView.

Just released new major versions of MarkyMark for three different Swift versions:
MarkyMark 1.0.0 : Swift 2.2, Xcode 7
MarkyMark 2.0.0 : Swift 2.3, Xcode 8
MarkyMark 3.0.0 : Swift 3.0, Xcode 8

About making MarkyMark generate one attributed string; use the MarkDownToAttributedStringConverterConfiguration. Usage example can be found in the example project.

Let me know if you still run into issues. Will close this issue for now.

Awesome! Thanks heaps!

It seems to have broken Emoji in the source Markdown however. But it's not a deal breaker, I dislike them anyway!