forked from idan/qlrest
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrest.m
36 lines (27 loc) · 1.1 KB
/
rest.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "rest.h"
@class RestConverter;
@implementation rest
@interface NSObject (MethodsThatReallyDoExist)
- (NSString *) foo;
@end
NSData* renderRest(NSURL* url)
{
//Class RestConverterClass = NSClassFromString(@"RestConverter");
//restconv = [RestConverterClass new];
/*
NSString *styles = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier: @"com.fiatdev.QLMarkdown"]
pathForResource:@"styles" ofType:@"css"]];
*/
//NSString *source = [NSString stringWithContentsOfFile:[url path] encoding:NSUTF8StringEncoding error:nil];
//Class RestConverterClass = NSClassFromString(@"RestConverter");
//myrest = [RestConverterClass new];
//NSString *html = [restconv foo];
//NSLog(html);
//NSString *html = [RestConverterClass restToHtml:source];
//char *output = convert_markdown_to_string([source UTF8String]);
//NSString *html = [NSString stringWithUTF8String:output];
//free(output);
//NSString *html = [NSString stringWithUTF8String:"foo bar!"];
//return [html dataUsingEncoding:NSUTF8StringEncoding];
}
@end