mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
html and code parse errors...
This commit is contained in:
+9
-2
@@ -68,7 +68,7 @@
|
||||
|
||||
NSString *fileTxt=@"";
|
||||
if(startFile==@"fileview")
|
||||
fileTxt=[file textContents];
|
||||
fileTxt=[self parseHTML:[file textContents]];
|
||||
else if(startFile==@"blame")
|
||||
fileTxt=[self parseBlame:[file blame]];
|
||||
else if(startFile==@"log")
|
||||
@@ -145,11 +145,18 @@
|
||||
[self showFile];
|
||||
}
|
||||
|
||||
- (NSString *) parseBlame:(NSString *)txt
|
||||
- (NSString *) parseHTML:(NSString *)txt
|
||||
{
|
||||
txt=[txt stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
|
||||
txt=[txt stringByReplacingOccurrencesOfString:@">" withString:@">"];
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
- (NSString *) parseBlame:(NSString *)txt
|
||||
{
|
||||
txt=[self parseHTML:txt];
|
||||
|
||||
NSArray *lines = [txt componentsSeparatedByString:@"\n"];
|
||||
NSString *line;
|
||||
NSMutableDictionary *headers=[NSMutableDictionary dictionary];
|
||||
|
||||
Reference in New Issue
Block a user