Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not support objective-c block #75

Closed
xuguojun opened this issue Jul 22, 2015 · 6 comments
Closed

not support objective-c block #75

xuguojun opened this issue Jul 22, 2015 · 6 comments

Comments

@xuguojun
Copy link

@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

@mdiep
Copy link
Owner

mdiep commented Jul 22, 2015

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

@xuguojun
Copy link
Author

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

@mdiep
Copy link
Owner

mdiep commented Jul 22, 2015

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.

@xuguojun
Copy link
Author

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

@mdiep
Copy link
Owner

mdiep commented Jul 22, 2015

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

@mdiep mdiep closed this as completed Jul 22, 2015
@xuguojun
Copy link
Author

@mdiep thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants