indragiek / CocoaMarkdown

Markdown parsing and rendering for iOS and OS X
MIT License
1.2k stars 158 forks source link

Failed to generate the attributed string for given text "<Test>" #46

Open srinivas-kurakula opened 6 years ago

srinivas-kurakula commented 6 years ago

Below is the code to generate an AttributedString in iOS

NSString markdown = @"" CMDocument doc = [[CMDocument alloc] initWithData: [markdown dataUsingEncoding: NSUTF8StringEncoding] options: 0]; CMTextAttributes markdownAttributes = [[CMTextAttributes alloc]init]; CMAttributedStringRenderer renderer = [[CMAttributedStringRenderer alloc] initWithDocument: doc attributes: markdownAttributes]; return [render render];