Simply make sure you have
Markdown.pl (from Daring Fireball) inside of your application bundle's resources folder. Perl has to be installed on the target machine. If you are developing for iOS, you should build Perl for iOS, pack it with the application and change the
markdownTask's launch path.
- [markdownTask setLaunchPath:@"/usr/bin/perl"];
- [markdownTask setStandardInput:markdownPipe];
- [markdownTask setStandardOutput:htmlPipe];
- [markdownTask launch];
- NSData *markdownData = [markdown dataUsingEncoding:NSUTF8StringEncoding];
- [[markdownPipe fileHandleForWriting] writeData:markdownData];
- [[markdownPipe fileHandleForWriting] closeFile];
- [markdownTask waitUntilExit];
- [markdownTask release];
- return output;
You need to login to post a comment.