mdiep/MMMarkdown

not support objective-c block

xuguojun opened this issue · 6 comments

@mdiep this framework doesn't support objective-c block. For example, I try to parse the following block with MMMarkdown, however it doesn't work.

@interface ViewController ()
@property (nonatomic, weak) IBOutlet UITextView *blockTextView;
@end

Could you please add this feature? GitHub support that. Thanks

MMMarkdown does support fenced code blocks, but you need to turn on the extension.

@mdiep here is my code on ViewController:

NSString *markdown = [self readFile];
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown extensions:MMMarkdownExtensionsFencedCodeBlocks error:NULL];

I turned on the extension MMMarkdownExtensionsFencedCodeBlocks, it doesn't work.

What are you expecting to see? Do you want the code to be syntax highlighted? If so, that's outside the scope of this library.

@mdiep yes, I want the code block to be highlighted as Xcode editor. GitHub supports it very well, you can see my first comment, there is a objective-c code block.

You can do this with another library after the Markdown step. Try using something like https://github.com/isagalaev/highlight.js.

@mdiep thanks so much.